(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 26 Nov 2020, 08:56
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to exit script after opening with "xterm -hold -e"?
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
Semme


Joined: 07 Aug 2011
Posts: 8427
Location: World_Hub

PostPosted: Tue 30 Jun 2020, 19:15    Post subject:  How to exit script after opening with "xterm -hold -e"?  

OK, my script suppresses everything except what I want - asking for my passphrase.

What does it need to exit after feeding it my passphrase?

Maybe this should be one of those "if" / "else" deals?
Code:
#!/bin/sh
xterm -hold -e [passphrase_command]

TIA

Last edited by Semme on Wed 01 Jul 2020, 05:40; edited 1 time in total
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Tue 30 Jun 2020, 22:23    Post subject:  

break is used to end a loop, can it be included here?
I made a note some time ago of a link to an example that use a key input to break, see example 4 here:
https://linuxhint.com/bash_wait_keypress/
Also some reading here:
https://linuxize.com/post/bash-break-continue/

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 8427
Location: World_Hub

PostPosted: Wed 01 Jul 2020, 05:44    Post subject:
Subject description: [SOLVED]
 

Olaf, thanks. Offhand I wasn't familiar with those methods.

Turns out all it took to get the desired result was to relocate my "hold" argument.

_________________
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Wed 01 Jul 2020, 12:02    Post subject:  

It usually ends good, after some brainwork! Very Happy
BTW; the Xterm man page is so massive, that you have to read it a few times to take it all in! Good work!

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Wed 01 Jul 2020, 20:02    Post subject:  

tallboy wrote:
BTW; the Xterm man page is so massive, that you have to read it a few times to take it all in! Good work!
Read what for? Which Puppy contains xterm?
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 2075
Location: not Bulgaria

PostPosted: Wed 01 Jul 2020, 23:49    Post subject:  

MochiMoppel wrote:
tallboy wrote:
BTW; the Xterm man page is so massive, that you have to read it a few times to take it all in! Good work!
Read what for? Which Puppy contains xterm?


The original post did not say it was for any (or any pristine) Puppy.

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Thu 02 Jul 2020, 01:28    Post subject:  

MochiMoppel, the first uncommented word in the script is xterm.
The options:
Quote:
-hold
Turn on the hold resource, i.e., xterm will not immediately destroy its window when the shell command completes. It will wait until you use the window manager to destroy/kill the window, or if you use the menu entries that send a signal, e.g., HUP or KILL.

Quote:
-e program [ arguments ... ]
This option specifies the program (and its command line arguments) to be run in the xterm window. It also sets the window title and icon name to be the basename of the program being executed if neither -T nor -n are given on the command line. This must be the last option on the command line.

I used xterm for several years, at the uni where RedHat Enterprise was the distro in use.

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Thu 02 Jul 2020, 02:46    Post subject:  

tallboy wrote:
MochiMoppel, the first uncommented word in the script is xterm.
What you see is not always what you get.

My point is that in most Puppies xterm is the name of an odd script, that - when you use the -hold option - creates another script that eventually passes all arguments to urxvt. This seemingly obsolete script is still part of woofCE where someone in 2017 even took the trouble to make minor changes. No comments as to why the changes were made or why this script is still useful. In Bionicpup64 xterm is a simple symlink to urxvt.

I have never seen a genuine xterm in any Puppy, and if someone sees a need to compile and install the real thing I would be interested to know why. Maybe there are useful gems in there that are worth to be discovered.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Thu 02 Jul 2020, 12:46    Post subject:  

I have tried other terminal emulators, but I prefer the urxvt myself. Xterm had it's limitations.
MochiMoppel wrote:
Maybe there are useful gems in there that are worth to be discovered.
No. Laughing
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0442s ][ Queries: 11 (0.0062s) ][ GZIP on ]