LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   VNC start without a monitor attached (https://www.linuxquestions.org/questions/red-hat-31/vnc-start-without-a-monitor-attached-804856/)

AndyR 04-28-2010 08:28 PM

VNC start without a monitor attached
 
I'm fairly new to RHEL but my boss has asked me to set him up a machine with RHEL 5.3 for some performance testing. He wants to access via VNC which isn't a problem as I've got that sorted.

Problem is, the PC is sitting in the computer room with just the power and lan connections, no monitor etc. When I boot the PC with a monitor attached you can VNC into the server, but if I boot it without a monitor attached, VNC doesn't work?

Any ideas how to get it so it always works when a monitor is not attached?

I used this guide to get it setup in the first place - http://linuxpakistan.net/forum/viewtopic.php?p=44996

Thanks,

Andy

troop 04-28-2010 11:21 PM

it's very easy.
via ssh:
# yum install vnc-server.i386
# vncserver

AndyR 04-28-2010 11:43 PM

Quote:

Originally Posted by troop (Post 3951347)
it's very easy.
via ssh:
# yum install vnc-server.i386
# vncserver


Thanks but I've already done that, but once I boot it without a monitor VNC doesn't work. I try starting it via SSH but still nothing.

If I boot it with a monitor attached it works fine.

I've managed to get it working by editing /etc/sysconfig/vncservers with

VNCSERVERS="1:user1 2:user2"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 640x480"

but what I wanted was the full login screen to so can chop and change between any users.

Thanks anyway.

DrLove73 04-29-2010 12:18 AM

You can also set up so that you log via VNC server as regular user (not root) if you create another instance of vncserver specially for that user.

- edit /etc/sysconfig/vncservers. There is example inside. Read about options for vncserver to se what does what (-localhost comes to mind).
- Setting 'VNCSERVERS="5:username"' will make it listen on 5905 port only for that user, make sure firewall is open.
- edit /home/username/.vnc/xstartup and un-comment "#unset SESSION_MANAGER" and "exec /etc/......"
- Restart vncserver, log in from console/GUI as that user and set vncpassword for that user (it's separate from others) and I think it should work.

I think this should be it. You can do this for multiple users and use that, or any other server/PC as practically thin client server (broadly understood) to keep old PC clients in use and cut costs. Just take note of regular user access to system files (read-only but still...)

EDIT: you can create simple bash script with "case" menu that will allow users to choose desired user and set vnc port accordingly then run vnc client connection. Distribute this on your client PC's and you are set to go.


All times are GMT -5. The time now is 08:53 AM.