Skip to content

Instantly share code, notes, and snippets.

@Musinux
Last active April 14, 2026 14:34
Show Gist options
  • Select an option

  • Save Musinux/8e6c4752ed3c143d49764311a504c1e9 to your computer and use it in GitHub Desktop.

Select an option

Save Musinux/8e6c4752ed3c143d49764311a504c1e9 to your computer and use it in GitHub Desktop.
VNC xstartup for unity WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE
#!/bin/bash
# WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE
sudo apt-get install vnc4server ubuntu-desktop
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
#!/bin/sh
# WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE
# 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 &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
@noelshin

noelshin commented Mar 7, 2018

Copy link
Copy Markdown

Thanks! I fixed an error.

@foodtooth

Copy link
Copy Markdown

This will start gnome desktop. Where is unity?

@paulwaldmann

paulwaldmann commented Apr 17, 2018

Copy link
Copy Markdown

Unity not showing up.
rrlwr

Should be like this:

1643-vnc-ubuntu-3_small

Unity plugin enabled in CCSM. Any Ideas?

@electropolis

Copy link
Copy Markdown

yeah exactly that's not the correct unity

@albertbu

albertbu commented Aug 2, 2018

Copy link
Copy Markdown

Folks sorry for the silly question
Where to put the xstartup file ?

@ciel77

ciel77 commented Aug 15, 2018

Copy link
Copy Markdown

xstartup is at ~/.vnc/xstartup

@EnterQuery

Copy link
Copy Markdown

Hi, I only get a file explorer window, nothing else. Any ideas? Thanks!
screenshot 5

@scanlegentil

scanlegentil commented Sep 25, 2018

Copy link
Copy Markdown

Hi, I only get a file explorer window, nothing else. Any ideas? Thanks!

Verify you installed all listed packages .

@peter279k

Copy link
Copy Markdown

@NorseGopher, I got the same problem, too. It doesn't present the correct Unity desktop environment session...

@snoudin

snoudin commented Jul 18, 2020

Copy link
Copy Markdown

Hi, I only get a file explorer window, nothing else. Any ideas? Thanks!
screenshot 5

same problem with installed packages...

@d9j

d9j commented Mar 29, 2021

Copy link
Copy Markdown

this config wont start the unity it starts gnome environment and some ui dependent apps wont work properly or simply will crash!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment