VNC
Virtual Network Computing (VNC) has some new features under CentOS 7. Some of these features may cause issues for you so this page explains how to fix some common problems:
- VNC Slow Interaction: Desktop Managers
- VNC Background Distortion
- VNC: Customizing GNOME Desktop Manager
- VNC: Black Screen
VNC Slow Interaction: Desktop Managers
Linux uses a piece of software called a desktop manager to draw the graphics (e.g. desktop, icons, windows, etc.) to your screen. The SCC by default uses the GNOME Desktop Manager but some users have experienced lag when using the mouse or keyboard or when dragging windows across the screen in VNC. To fix this, you can switch to the lighter XFCE Desktop Manager .
Switching to the XFCE Desktop Manager on the SCC
First close all currently running VNC sessions:
scc1% vncserver -list
TigerVNC server sessions:
X DISPLAY # PROCESS ID
:25 69855
scc1% vncserver -kill :25
Then create the configuration file that will activate the XFCE Desktop Manager for VNC sessions:
scc1% echo 'exec startxfce4' > ~/.Xclients
scc1% chmod +x ~/.Xclients
Now, every time you run vncstart
, a lighter, faster desktop manager will be loaded by VNC which may speed up your session.
To return to the GNOME Desktop Manager, simply remove the file ~/.Xclients.
VNC Background Distortion
VNC Viewer from Real VNC may distort the graphics. To fix this:
1) Open VNC Viewer
3) Select the VNC session with the distorted graphics
2) Navigate to File
3) Click Properties…
4) Navigate to the Options Tab
5) Under General in Picture quality, change ‘Auto’ to ‘High‘
VNC: Customizing the GNOME Desktop Manager
Large Icons
The default GNOME Desktop Manager for VNC on the SCC may draw large icons to your desktop which can be distracting if you have a number of items in your ~/Desktop
directory. This can be adjusted by starting a VNC session, opening the terminal in that VNC session, and running:
scc1% gsettings set org.gnome.nautilus.icon-view default-zoom-level small
Large Title Bars
If having large title bars on your windows in VNC bothers you, you can include the following in the file ~/.config/gtk-3.0/gtk.css
/* shrink headerbars (don't forget semicolons after each property) */
headerbar {
min-height: 0px;
padding-left: 2px; /* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
background-color: #2d2d2d;
}
headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin-top: 0px; /* same as headerbar side padding for nicer proportions */
margin-bottom: 0px;
}
/* shrink ssd titlebars */
.default-decoration {
min-height: 0; /* let the entry and button drive the titlebar size */
padding: 0px;
background-color: #2d2d2d;
}
.default-decoration .titlebutton {
min-height: 0px; /* tweak these two props to reduce button size */
min-width: 0px;
}
window.ssd headerbar.titlebar {
padding-top: 3px;
padding-bottom: 3px;
min-height: 0;
}
window.ssd headerbar.titlebar button.titlebutton {
padding-top: 3px;
padding-bottom:3px;
min-height: 0;
}
VNC: Black Screen
If you encounter a black screen when entering VNC, you should try the following:
- Reinstall your
~/.vnc
directory. Be sure to close any existing VNC sessions first and reset your VNC password afterwards:$ vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID X DISPLAY # PROCESS ID :16 166059 $ vncserver -kill :16 $ rm -r ~/.vnc $ vncpasswd $ vncstart
- If you had previously customized your
~/.bashrc
and~/.bash_profile
be to clean these files and confirm that you are not loading any modules on startup, e.g anaconda, python, etc.