A little trouble starting (X-) Programs over ssh...

Christian Baer christian.baer at uni-dortmund.de
Sun Jan 21 01:01:46 UTC 2007

Good evening peeps!

This probably isn't a real FreeBSD-issue itself, but it doesn't really
fit any other topic that has a newsgroup out there, so please bear with
me here!

What I have done:
I've installed an X-server (XMing) on a Windows-XP box and connect via
PuTTY to a FreeBSD box (Sun U60). I have configured the X-server to
allow clients to connect from the IP of the FreeBSD-box. One of the
commands I want to use (for example) is 'konqueror -display winbox:0 &'.
Now that works fine, so it seems I got it right up to here. In case that
wasn't clear so far: I am not using X-forwarding over ssh. So I don't
need the ssh session to run the X-application.

Since I don't always want to habe terminal windows hanging around and
typing in the commands like that is a little boring, I wanted to automate
that a little. I could do that by adding a command to run directly in
PuTTY or by using plink. I tried both and neither got the desired

If I use PuTTY the terminal window opens for a few seconds and then
closes again. I get to see a few messages from the konqueror but the
browser's window never appears on my desktop. If I use the exact command
line in an open ssh session, konqueror starts and I can do what I like
with it. If I close the ssh session I started the browser from nothing
happens, meaning, it doesn't close. I can just go on surfing.

Quite the reverse happens if I user plink to start konqueror. I get a
command line window and see the messages of konqueror starting up.
Unlike when using PuTTY I get a browser window and it stays too. The
command line window which was the result of plink starting doesn't
disappear though. It stays right where it is, maybe displaying the odd
message or another from konqueror. Pressing ctrl-c closes the window
(obviously there is now a clean exit somewhere) while leaving konqueror
running. I have tried using the -batch and -s options and others to try
to get the window to close *after* the application was actually started.
With no success (so far).

And this is just the part I don't get. When using PuTTY there seems to
be some sort of clean exit, because otherwise the window wouldn't close.
Why doesn't plink get the same clean exit? If there is a clean exit, why
does it come too soon - if that is the case here? Why does the
application break off its launch?

What I basicly want is to start an application with a shortcut without
making every one of them have two windows (one for the app itself and
one for the terminal session). Is there any way of doing this?


More information about the freebsd-questions mailing list