VNC server

ABrady xunil at kc.rr.com
Thu Nov 11 05:47:56 UTC 2004


On Wed, 10 Nov 2004 16:56:02 -0800
Michael Scully <agentscully at flexiblestrategies.com> wrote:

> Greetings:
> 
> 	I use VNC server to do remote administration of my client's
> 	machines
> over a VPN tunnel.  It has been great for that.  But I have a desktop
> user who would like to access their Linux desktop from home.  I can
> setup different vnc sessions with the line in
> /etc/sysconfig/vncservers that reads as follows:
> 
> VNCSERVERS="1:root 2:ruby"
> 
> Once I have created the necessary files entries under /home/ruby/.vnc/
> a service vncserver restart will create both a root session 1 and a
> ruby session 2.  So far, so good.
> 
> 	The problem I have with the service launched vncserver is that
> 	if
> you log out of the session, you can't restart it.  You can get
> connected again, but there is no presentation manager running on it -
> it's just a blank screen.
> 
> 	The xstartup file within the .vnc directory looks as follows:
> 
> #!/bin/sh
> 
> # Uncomment the following two lines for normal desktop:
> unset SESSION_MANAGER
> exec /etc/X11/xinit/xinitrc
> 
> [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
> xsetroot -solid grey
> vncconfig -iconic &
> xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
> twm &
> 
> 
> 	Is there a way to configure the session to restart if it's
> 	logged
> out?  What am I missing?
> 
> Scully

I just toyed with it several times and can't find a direct solution.
There are only 3 ways I can see to solve it:

1. Tell the user to never log out of the session. They can kill the
vncviewer window without causing any problems. Then they can always come
back and play with it some more later. Logging out kills everything
attached to the session, but it leaves Xvnc running. That makes it
answer requests for connection. But the session, though active, has had
the desktop logged off. Using it this way might need to have the session
shared by default if they would like to go away, reconnect later and
have everything as they left it.

2. Run a session inside of screen. I don't run Redhat or Fedora these
days and don't know if screen is installed (I still hang on to the
mailing list for legacy reasons: I'm too lazy to unsubscribe). But it's
easy enough to find the source to compile it. In any case, I haven't
tried this. I saw it as a suggestion on a google search. Depending on
your situation, this may not be feasible. But it might be worth a try.

3. Let the user ssh into the machine and start a session manually as
needed. Don't start it at boot, but let them start it, kill it, restart
it as they need it.

Personally, I'd go with option 1. That doesn't require any sort of
reconfiguration. Just the breaking of an unnecessary bad habit on the
part of the person needing access.

-- 
Microsoft: The company that made online banking dangerous.




More information about the redhat-list mailing list