Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On CENTOS I went to System - Preferences and then Remote Desktop. There I checked "Allow other users to view" and "Allow other users to control". The same dialog box said "Users can view your desktop using....." vncviewer name.server:0. Using UltraVNC from a Windows computer I type that but I get connection refused.

I also tried to edit /.vnc/xstartup The directory is there but not the file.

I want to create a desktop with a specific resolution and it to be persistent or permanent even if I restart the server.

share|improve this question

4 Answers 4

up vote 1 down vote accepted

You can do this but it requires work with inetd or xinetd (or whatever flavor of superserver is installed).

The crux is a command line switch, -inetd, that tells the VNC server to accept attachments from your (x)inetd service. Combine this with some examples and you should be able to get an idea about what is possible. Another part of this is the -query localhost switch which causes your VNC setup to contact the display manager (GDM in your case)...which means, when you connect via VNC, you'll get a GDM prompt. Makes it much nicer than trying to set up a built-in VNC password.

If you decide to make this a permanent feature, do not forget to turn off the built-in desktop sharing as it will develop a port conflict (your existing xinetd superserver will be listening to that port for new connections).

share|improve this answer

Check your firewall settings, it's probably blocking the port for the remote viewer. In this case, you need port 5900 open.

As for persistence across reboots, you should be able to get most of it by setting up your session to remember what applications you had open when you log out. It won't be as good as something like a Hibernate, but that should get you most of the way there.

share|improve this answer
    
The quick-fix for checking if there's a firewall blocking it on the linux end is to just run /etc/init.d/iptables stop –  nos Aug 1 '09 at 23:48
    
actually, 'service iptables stop' is better on a RHEL/CentOS system, as it sets up the environment for the init script better. –  Ophidian Aug 2 '09 at 0:50

I think you can follow the CentOSHowto instruction. To change screen resolution setting, edit /etc/sysconfig/vncservers.

share|improve this answer

Try to start your vncserver using this script.

If you want to start default window manager uncomment first two lines.

[wojtek@pc_dom ~]$ cat .vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.