Thursday, February 16, 2017

Fixing Linux Mint Cinnamon Hangs

Every once in a while, my GUI on Linux Mint hangs. The mouse moves, but that's it. Here's the only way I found to get things back up as they were (without losing all of your open windows and applications).

1. Get a terminal (Ctrl + Alt + F2 or similar).
2. Kill all cinnamon processes (killall -HUP cinnamon)
3. Go back to your GUI (Ctrl + Alt + F8).

After a few seconds or minutes, you'll get all your stuff back.

Thursday, February 9, 2017

Configure CentOS 6 VNC Server

One of the first things I like to do when provisioning a CentOS 6 server with a desktop GUI is to configure remote desktop; but the standard/included server (vino) only works when a user is already logged in. I want to usually be able to log-in remotely (in other words, have my VNC session log me in to a machine that has no users logged-in).

First, install and enable the VNC server:
# yum install tigervnc-server
# yum install xorg-x11-fonts-Type1
# chkconfig vncserver on
Set VNC password for your user:
# su - USER
# vncpasswd
# exit
Add the following lines to the following file:
# vim /etc/sysconfig/vncservers 
VNCSERVERS="1:USER"
VNCSERVERARGS[1]="-geometry 800x600"
Add port 5900 (TCP and UDP) to your firewall allow rules (I just did this graphically at the machine's physical terminal, but you can use iptables in the CLI).

See if VNC server comes up:
# service vncserver restart
Edit the user's vnc configuration to replace the "twm &" line with the following:
# service vncserver stop
# vim /home/USER/.vnc/xstartup 
exec gnome-session &
Test VNC server startup again:
# service vncserver restart
At this point, you should be able to point a VNC client at your machine, and you will automatically be logged-in. Note, it usually takes a little time... up to a minute or so, typically.