how to run xterm with nested bash shells, or screen nested inside bash

2013-08-31 Thread Zenaan Harkness
From an existing plain xterm, I want this command:
uxterm -e /bin/bash -c /usr/bin/screen

or eg:
uxterm -e /bin/bash -c /bin/sh

To result in a nested shell. Basically I want my xterms to open by
default with a screen session (which works fine), but I want to be
able to log out of screen with CTRL-D, and be left with plain bash in
my uxterm.

Is this possible?

(For those who might be caught unawares, if you start with an xterm
with nested screen session, and try to open an xterm with its own
screen, at least in my setup, the new xterm does not open, instead I
get a new screen window/tab in my current xterm. But this is by
the by - just in case someone gets bitten by this. I believe it's a
limitation in screen or tty, not sure.)

TIA
Zenaan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOsGNSQ=8xF0NM-HjocxKkpwZ9B=yl0pgo4web1y1tbq0rj...@mail.gmail.com



Re: how to run xterm with nested bash shells, or screen nested inside bash

2013-08-31 Thread Claudius Hubig
Dear Zenaan,

Zenaan Harkness wrote:
 From an existing plain xterm, I want this command:
 uxterm -e /bin/bash -c /usr/bin/screen
 
 or eg:
 uxterm -e /bin/bash -c /bin/sh
 
 To result in a nested shell. Basically I want my xterms to open by
 default with a screen session (which works fine), but I want to be
 able to log out of screen with CTRL-D, and be left with plain bash in
 my uxterm.
 
 Is this possible?

I’m not quite sure I understood what you want to achieve, but here we
go: I tried with xfce4-terminal, but that should mostly behave the
same as uxterm. Essentially, there are two problems to solve here:

a) xfce4-terminal -e /bin/bash -c /usr/bin/mc

is read as the -c option by the terminal, not the shell. We need 

$ xfce4-terminal -e /bin/bash -c /usr/bin/mc

to pass -c to bash rather than xfce4-terminal.

b) Furthermore, bash appears to have no option not to exit after the
command passed via -c exits. However:

$ xfce4-terminal -e /bin/bash -c \/usr/bin/mc  /bin/sh\

runs /bin/sh after /usr/bin/mc exits sucessfully (use ; instead of 
to ignore return codes).

HTH  Best,

Claudius
-- 
Please don’t CC me.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130831195250.38084...@ares.m.archwiz.org



Re: how to run xterm with nested bash shells, or screen nested inside bash

2013-08-31 Thread Zenaan Harkness
On 9/1/13, Claudius Hubig debian_1...@chubig.net wrote:
 Dear Zenaan,

 Zenaan Harkness wrote:
 From an existing plain xterm, I want this command:
 uxterm -e /bin/bash -c /usr/bin/screen

 or eg:
 uxterm -e /bin/bash -c /bin/sh

 To result in a nested shell. Basically I want my xterms to open by
 default with a screen session (which works fine), but I want to be
 able to log out of screen with CTRL-D, and be left with plain bash in
 my uxterm.

 Is this possible?
...
 However:

 $ xfce4-terminal -e /bin/bash -c \/usr/bin/mc  /bin/sh\

 runs /bin/sh after /usr/bin/mc exits sucessfully (use ; instead of 
 to ignore return codes).

Perfect. Thank you so much
Zenaan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caosgnsrkmi42p-wa0xa9_wlchmu44qieu6a+dtzkph4ui6n...@mail.gmail.com