On Fri, 2005-11-11 at 13:12 -0700, Ashley M. Kirchner wrote: > After over a decade of running text-only servers, and thanks to > William Hooper yesterday with his help on getting one of my systems > upgraded, I now have a dedicated X-server machine. Gnome's running nice > and cozy. I have to say, I'm impressed, very impressed. I even went as > far as having VNC display my desktop on my Windows workstation so I can > always get to that server. > > But now I have some questions: > > In order for VNC to connect and work, I have to be logged in on the > server console. Once I log out, it also kills the VNC connection and I > can't get on anymore. So, is there some way to setup VNC so that I > don't have to be logged onto the server? In other words, leave the > server console logged out (sitting at the login screen) and be able to > remotely connect through VNC, log in and work remotely? If you load the "vnc" module in the X configuration, then you share the main display. Whatever shows up on the primary screen on the Linux box shows up in your VNC viewer window. Add the line: Load "vnc" to the 'Section "Module"' part of /etc/X11/xorg.conf file, and restart X. > Second, since I refuse to log in as root, specially when I'm doing > it remotely, this raises some issues. For example, when I need to edit > system files, say /etc/hosts, I can't do it. When I launch gedit and > open that file, it tells me the file is read-only because I'm not the > owner. The correct action of course, however there's no way for me to > allow gedit to edit that file by means of additional credentials. Even > if I authenticate as root (by launching some system related > configuration) it still won't let me edit system files (while logged in > as a regular user.) So again, how can I get past this? I don't want to > have to open a terminal window and using sudo or su to get to root just > to edit the file ... in a text window. Otherwise why have X installed, eh? Well, I tunnel VNC through ssh, so stuff is encrypted. You log in as the normal user, then "sudo vi /etc/hosts" or whatever to get done what you want. To use VNC ssh tunneling, create your ssh password file, then add: Option "passwordfile" "/path/to/ssh/passwd/file" to the "Section 'Screen'" part of /etc/X11/xorg.conf and restart X. You'll need a VNC viewer that understands tunneling. Under Linux, "vncviewer -via gateway hostname" works, where "gateway" is the host name of the machine running sshd. sshd and the display is on the same machine in my case, so "vncviewer -via prophead prophead" gets me to my display. ---------------------------------------------------------------------- - Rick Stevens, Senior Systems Engineer rstevens@xxxxxxxxxxxxxxx - - VitalStream, Inc. http://www.vitalstream.com - - - - Consciousness: that annoying time between naps. - ----------------------------------------------------------------------