haniganwork at earthlink.net
Fri Apr 12 01:29:39 UTC 2013
On 04/11/2013 04:25 PM, Tony Arnold wrote:
> On 11/04/13 20:25, Linda wrote:
>> I am playing around with X11 forwarding.
>> When I use ssh -X and I am done and exit if I have displayed a remote graphical program instead of exit giving me logout then connection closed then a prompt on the local machine I get a response of logout but no connection closed and have to enter ctrl C to return to the prompt
>> I notice the same behavior with Xming and Putty from windows, ie not a clean exit so you have to manually close putty. Just wondering what I need to do to properly close everything when running remote X applications over ssh or putty.
> It sounds like your graphical program has not exited and so the
> connection does not get closed. How are you invoking the program? Are
> you putting an & at the end of the command to run it in the background?
> $ xclock &
Actually it is running a text based C++ program that
invokes Thunderbird from the command line within the
program, It is a semi automated Mass mailing, takes a csv
file, with customer name, business name, and email, combines
with a text file that holds the body of an email, and
accepts variables to set a common subject line and
attachement. It then opens the composition window of
thunderbird filling in the email address, greeting, etc lets
you double check it and send, then brings up the window for
the next line of the csv file until you reach the end of the
file. The email composition window closes when you send,
and control returns to the C++ program but since I don't
really understand how the Xforwarding works It is very
likely that even though it looks like it has closed and has
moved on to the next line of the loop it is really still
I actually have users accessing it from elsewhere via
teamviewer but the linux version is beta and last I knew
still did not work properly for remote access so I'm jumping
through hoops so it can be acceessed and ran via Windows.
While I was at it, I figured I could quit making people in
the office physically move to run it and let them run it via
ssh with X11 forwarding.
As long as killing putty and the ssh -X command in the
terminal window kills anything that is left open I guess it
isn't a major problem, but it would be nice to understand
the process well enough to be able to have clean exits.
Years ago I bought The Joy of X by Niall Mansfield and never
got around to reading it. Although totally out of date,
perhaps I should take time to read it now to better
understand the process.
Why does the graphical window need to run in the background?
Just thinking about future uses. Normally all of my commands
are called via menus if they have to be called differently
when accessed via ssh -X than when accessed directly from
the server is there a way to know if a user has logged in
via ssh so they can be given a different menu?
More information about the ubuntu-users