So I'm back out to work after a nice vacation, so I should have seen this coming, right?
When attempting to connect to my VNC Server from my client, a nice error message popped up.
Unable to connect to server.
I managed to ssh into the server, but the VNC Server refused to restart:
[myuser@xxxxxx tmp]# service vncserver restart
Shutting down VNC server: 3:myuser [FAILED]
Starting VNC server: 3:myuser
Warning: xxx.xxx.xxx:3 is taken because of /tmp/.X3-lock
Remove this file if there is no X server xxx.xxx.xxx.xxx:3
A VNC server is already running as :3 [FAILED]
Long story short, I had to delete the lockfile and socket in order to be able restart the VNC Server.
0. Login as root/sudo
1. Remove lock file and socket
rm -rf /tmp/.X3-lock
rm -rf /tmp/.X11-unix/X3
2. Restart vnc service
service vncserver restart
Content moved to tucuche-consulting.com as of April 2019
Showing posts with label VNC. Show all posts
Showing posts with label VNC. Show all posts
Thursday, January 2, 2014
Monday, September 17, 2012
Installation of VNC Server on CentOS 5.x
I honestly thought I documented this already, but I searched the blog and was unable to locate it.
This covers installation and quick configuration of VNC on a server, in the event that Desktop access is needed on a remote server. In some cases, the CLI is not enough, and I've found this very useful.
On to the entry:
1. Login as root (or su)
2. Install required packages:
yum -y install vnc-server
3. Secure the VNC server:
vncpasswd
Set mypassword
cd ~/.vnc
ls
the passwd folder should be listed
4. Configure the server:
nano /etc/sysconfig/vncservers
add to end of file:
5. Start the VNC service and configure service to autostart on boot:
service vncserver start
chkconfig vncserver on
6. Further configuration:
cd ~/.vnc
nano xstartup
add under the line "# Add the foll..."
Service vncserver restart
8. Configure firewall to allow VNC server traffic
system-config-securitylevel-tui
add 5903:tcp to exceptions list
9. Open VNC client from remote peer and connect to VNC Server:
server: 192.168.x.x:3
username myusername
password: mypassword (as set in Step 3)
finito
-noveck
This covers installation and quick configuration of VNC on a server, in the event that Desktop access is needed on a remote server. In some cases, the CLI is not enough, and I've found this very useful.
On to the entry:
1. Login as root (or su)
2. Install required packages:
yum -y install vnc-server
3. Secure the VNC server:
vncpasswd
Set mypassword
cd ~/.vnc
ls
the passwd folder should be listed
4. Configure the server:
nano /etc/sysconfig/vncservers
add to end of file:
VNCSERVERS="3:myusername"
VNCSERVERARGS [3] = "-geometry 1024x768"
5. Start the VNC service and configure service to autostart on boot:
service vncserver start
chkconfig vncserver on
6. Further configuration:
cd ~/.vnc
nano xstartup
add under the line "# Add the foll..."
(while true ; do xterm ; done) &remove comments(#) from
#unset SESSION_MANAGER7. Restart the vnc service
#exec /etc/x11/xinit/xinitrc
Service vncserver restart
8. Configure firewall to allow VNC server traffic
system-config-securitylevel-tui
add 5903:tcp to exceptions list
9. Open VNC client from remote peer and connect to VNC Server:
server: 192.168.x.x:3
username myusername
password: mypassword (as set in Step 3)
finito
-noveck
Labels:
CentOS,
VNC,
vnc-client,
vnc-server
Subscribe to:
Posts (Atom)