Showing posts with label vnc. Show all posts
Showing posts with label vnc. Show all posts

Wednesday, October 12, 2016

Blank Screen with VNCServers on CentOS 6

I was getting a blank screen when I do a launch vncserver session and my /home/user1/.vnc/xstartup
is like this:
#!/bin/sh

[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

After I remodify the xstartup, it WORKED!
#!/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" &
gnome-session &

Thursday, April 18, 2013

Starting VNC server: no displays configured on CentOS 6

One of the issue I faced when starting VNC for the first time can be found at Unable to launch VNCServer due to fontpath issues on CentOS 6

Another issue I faced when starting up ie
# service vncserver restart 

You might see this error
Starting VNC server: no displays configured  on CentOS 6

To solve the issues, you have to look at the CentOS Howto for VNC (Virtual Networking Computing)
The portion that helped me was
.....
.....
Edit /etc/sysconfig/vncservers, and add the following to the end of the file.

VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 640x480"
VNCSERVERARGS[3]="-geometry 800x600"
.....
.....

After editing the vncserver, start the vncserver. You should eliminate the error
# service vncserver start 

Tuesday, April 2, 2013

Unable to launch VNCServer due to fontpath issues on CentOS 6

When trying out VNCServer on both CentOS 6.2 and CentOS 6.3

$ vncserver 

WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.

/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: 
pixman_composite_trapezoids
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: 
pixman_composite_trapezoids

The solution is to Install / Update
  1. The Pixel manipulation library development package (pixman, pixman-devel)
  2. X font handling library for server (libXfont) 
 Interestingly, the default installation of X Windows misses out these packages

# yum install pixman pixman-devel libXfont

Sunday, December 9, 2012

Black Screen when reconnecting back to old VNC Server when hostname was changed

When I was reconnecting to an old VNC session, I got a black screen and the screen was unresponsive. There was no way to get back to the contents in the screen. Prior to the reconnecting, the hostname on the VNC Server was changed.

VNC uses hostname and the session id for the identification of the session. You can take a look at the contents at ~/.vnc/

$ ls ~/.vnc/

headnode-h00.mycluster.sg:33.pid
headnode-h00.mycluster.sg:33.log
headnode-h00.mycluster.sg:40.pid
headnode-h00.mycluster.sg:40.log
headnode-h00.mycluster.sg:42.log

To get back to any session, and assuming your VNC Server and network are accounted for and has connection, then you have to check the hostname of the server has not been accidentally changed.

$ hostname

headnode-h00.mycluster.sg
If hostname is changed,do read the blog entries 
  1. Changing the hostname on CentOS 
  2. Another look at Changing hostname for CentOS 

Thursday, September 27, 2012

Qsub and Interactive X Windows on CentOS

If you are using torque as a submission agent and wish to use interactive windows for your allocated node. You can use

Step 1:
Launch vncserver on the head node. For more information how to Using VNC Server on CentOS with Windows VNC Viewer

Step 2: Make sure you have configure the server allow ssh forwarding. At /etc/ssh/sshd_config
...
X11Forwarding yes
X11UseLocalhost yes
...
Restart the sshd services.
# service sshd restart


Step 3: Use the qsub command to launch interactive and. The "-X"
$ qsub -q myqueue -l nodes=1:ppn=8 -I -X


Wednesday, August 29, 2012

Persistent VNC Session for users for CentOS

If you are intending to setup a persistent VNC Session for selected users, you can edit the global settings at /etc/sysconfig/vncservers.

# vim /etc/sysconfig/vncservers 

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see this URL:
# http://kbase.redhat.com/faq/docs/DOC-7028

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.

# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

VNCSERVERS="2:user1"
VNCSERVERS="3:user2"
VNCSERVERARGS[2]="-geometry 1280x800 -depth 16"
VNCSERVERARGS[3]="-geometry 1024x768"

Once done, you just restart the vncserver services
# service vncserver restart

Tuesday, July 10, 2012

An error occurred while loading or saving configuration information for gnome-settings-daemon

When an account is deleted and a new account is created from the system with the same username, the GConf configuration system may fail to handle configuration for the gnome-settings-daemon etc

The error will look like

An error occurred while loading or saving configuration information for gnome-settings-daemon. Some of your configuration settings may not work properly.

You might lose a couple of icons as well and the screen seems unusable

To solve this issue, you might have to remove the user's gconf-username directory found in the /tmp
# rm -rf /tmp/gconfd-session/

If you are using the xrdp, do
# service xrdp restart

Similarly. if you are using vnc, remember to kill your older session and create a new session one

For more information, do look at

What can I do if I get 'An error occurred while loading or saving configuration information for gnome-settings-daemon' when I run a GNOME session?

Monday, February 6, 2012

vncserver for CentOS 6

To do a installation of tigervnc for the CentOS 6, just do
# yum install vnc-server