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.
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.
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).
I think you can follow the CentOSHowto instruction. To change screen resolution setting, edit /etc/sysconfig/vncservers.
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