I found this thread via googling. This seems to be a gnome bug that
didn't exist in previous versions. I invoked it when upgrading boxes
from fedora 7 to fedora 10. I do not run Ubuntu, as I've been a Fedora
user since 1.0, and prior to that (mid-nineties) I used slackware when I
wasn't compiling my own.... ( I've run enough distros for one
lifetime...)

This seems to have something to do with the SSH server-side closing before the 
launched gnome program has a chance to open the display. So for example if I 
launch -- via 'ssh -f -n -Y' -- a gnome program with redirected stdout to 
>/tmp/foo gets the following message:
> golem-ROOT-25-/var/log> ty /tmp/foo 
> Cannot open display: 
> Run '/usr/bin/gnome-terminal --help' to see a full list of available command 
> line options.

Removing the redirect starts up the program just fine, however, the
client-side console from which SSH was launched remains visible.

Since the problem was closing the SSH session before the X display could
be launched, the solution was to add sleep(1) which allows the display
connection to be established, and then the SSH-session closes.

Adding sleep(1) allows the scripts I use to launch gnome-terminals from
windows to work again:

e.g. for a remote session with forwarded/encrypted X connection:
............
@echo off
REM \cygwin\bin\ssh.exe -f n...@192.168.0.9 "/usr/bin/xterm -display 
gnuveau:0.0 >& /dev/null < /dev/null &"

\cygwin\bin\ssh.exe -f n...@192.168.0.9 "/usr/bin/gnome-terminal 
--display=gnuveau:0.0 >& /dev/null < /dev/null & ; exec sleep 1"
............
Local connection w/o encrypted X session:
............
@echo off
REM \cygwin\bin\ssh.exe -f n...@192.168.0.9 "/usr/bin/xterm -display 
gnuveau:0.0 >& /dev/null < /dev/null &"

\cygwin\bin\ssh.exe -f n...@192.168.0.9 "/usr/bin/gnome-terminal
--display=gnuveau:0.0 >& /dev/null < /dev/null & ; exec sleep 1"

N.B.: i use '>&' because i use tcsh shell. Bash users should use the
usual "2>&1" before redirecting to stdout.

-- 
ssh -X and run gnome apps then exit problem
https://bugs.launchpad.net/bugs/144638
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to