Skip to content

Instantly share code, notes, and snippets.

@enakai00
Created September 5, 2012 12:26
Show Gist options
  • Save enakai00/3635874 to your computer and use it in GitHub Desktop.
Save enakai00/3635874 to your computer and use it in GitHub Desktop.
Setting up VNC Desktop for RHEL6
#!/bin/sh -x
yum groupinstall -y "Desktop" \
"General Purpose Desktop" \
"X Window System" \
"Desktop Platform"
yum install tigervnc-server firefox
chkconfig NetworkManager off
service NetworkManager stop
useradd enakai
su - enakai -c "vncpasswd"
if ! grep "99:enakai" /etc/sysconfig/vncservers; then
cat <<'EOF' >> /etc/sysconfig/vncservers
VNCSERVERS="99:enakai"
VNCSERVERARGS[99]="-geometry 1024x768"
EOF
fi
sed -i".orig" -e 's/id:3:initdefault:/id:5:initdefault:/' /etc/inittab
chkconfig vncserver on
service vncserver start
init 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment