added in the startup script for vnc
authorChris Koeritz <fred@gruntose.com>
Tue, 7 Nov 2017 14:19:35 +0000 (09:19 -0500)
committerChris Koeritz <fred@gruntose.com>
Tue, 7 Nov 2017 14:19:35 +0000 (09:19 -0500)
need vncserver in /etc/init.d for the thing to be started automatically.
the xstartup file should be in ~/.vnc for the user hosting vnc.

experiments/home-.vnc/xstartup.001 [new file with mode: 0755]
experiments/home-.vnc/xstartup.002 [new file with mode: 0755]
experiments/home-.vnc/xstartup.003 [new file with mode: 0755]
experiments/init.d/vncserver [new file with mode: 0755]
experiments/xstartup.001 [deleted file]
experiments/xstartup.002 [deleted file]
experiments/xstartup.003 [deleted file]

diff --git a/experiments/home-.vnc/xstartup.001 b/experiments/home-.vnc/xstartup.001
new file mode 100755 (executable)
index 0000000..40b174b
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# set up gnome desktop environment for vnc.
+
+# references:
+#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
+#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
+#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
+#   https://ubuntuforums.org/showthread.php?t=1903220
+#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
+
+[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
+[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
+
+xsetroot -solid darkgreen
+vncconfig -iconic &
+
+#######
+gnome-session --session=ubuntu &
+#valid values for session that we've seen:
+# ubuntu
+# gnome
+# 2d-gnome (?)
+# unity
+#######
+
+x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
+
+#######
+# are these alternatives also?
+x-session-manager &
+#x-window-manager &
+#######
+
+# we don't see this running at home, but it sure seems needed on vmbuilder.
+gnome-panel &
+
+#gnome-settings-daemon &
+#gnome-shell &
+
+#######
+# one or the other of the window managers here.
+#hmmm: but mutter doesn't work at all.
+metacity &
+#mutter &
+#######
+
+nautilus &
+
diff --git a/experiments/home-.vnc/xstartup.002 b/experiments/home-.vnc/xstartup.002
new file mode 100755 (executable)
index 0000000..1df643d
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# set up gnome desktop environment for vnc.
+
+# references:
+#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
+#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
+#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
+#   https://ubuntuforums.org/showthread.php?t=1903220
+#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
+
+[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
+[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
+
+xsetroot -solid darkgreen
+vncconfig -iconic &
+
+#######
+gnome-session --session=ubuntu &
+#valid values for session that we've seen:
+# ubuntu
+# gnome
+# 2d-gnome (?)
+# unity
+#######
+
+x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
+
+#######
+# are these alternatives also?
+x-session-manager &
+#x-window-manager &
+#######
+
+gnome-terminal-server &
+
+# we don't see this running at home, but it sure seems needed on vmbuilder.
+gnome-panel &
+
+#gnome-settings-daemon &
+#gnome-shell &
+
+#######
+# one or the other of the window managers here.
+#hmmm: but mutter doesn't work at all.
+metacity &
+#mutter --replace &
+#######
+
+nautilus &
+
+# experimental additions since still getting lots of weird isssues:
+indicator-multiload &
+compiz &
+gnome-keyring-daemon &
+ibus-daemon &
+zeitgeist-daemon &
+
+# just nice to have started already.
+kwalletd &
+
+
+
diff --git a/experiments/home-.vnc/xstartup.003 b/experiments/home-.vnc/xstartup.003
new file mode 100755 (executable)
index 0000000..d2a2667
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+# set up gnome desktop environment for vnc.
+
+# references:
+#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
+#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
+#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
+#   https://ubuntuforums.org/showthread.php?t=1903220
+#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
+
+############################
+
+# boilerplate that people seem to agree on.
+
+[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
+[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
+
+xsetroot -solid darkgreen
+vncconfig -iconic &
+
+############################
+
+# the chaos zone.  all of these are still being tested.
+
+#######
+gnome-session --session=ubuntu &
+#valid values for session that we've seen:
+# ubuntu
+# gnome
+# 2d-gnome (?)
+# unity
+#######
+
+#######
+# are these alternatives also?
+x-session-manager &
+#x-window-manager &
+#######
+
+gnome-terminal-server &
+
+# we don't see this running at home, but it sure seems needed on vmbuilder.
+gnome-panel &
+
+# no longer exists?
+#gnome-settings-daemon &
+
+# do we need this?
+#gnome-shell &
+
+#######
+# one or the other of the window managers here.
+#hmmm: but mutter doesn't work at all.
+metacity &
+#mutter --replace &
+#######
+
+# this just brings up an initial file exploring window, although at one point i needed to
+# have nautilus running to see icons on the desktop.
+####right now there are no visible icons on the desktop, so is it failing?
+nautilus &
+
+############################
+
+# experimental additions since still getting lots of weird isssues:
+indicator-multiload &
+gnome-keyring-daemon &
+ibus-daemon &
+zeitgeist-daemon &
+
+############################
+
+# these processes are just nice to have started already.
+#
+# you know you were going to want them.
+
+# password tools from kde.
+kwalletd &
+
+############################
+
+# limbo of useless boneheads.
+#
+# these things just don't seem to work.
+
+# this never ever shows up.
+#x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
+
+############################
+
+# ------------------------------
+# "&@}*(@^!$)_-{%:</~`|#=;" !!!!
+# dungeon of pain and suffering.
+# "&@}*(@^!$)_-{%:</~`|#=;" !!!!
+# ------------------------------
+#
+# adding these in just makes things go splatfooey.
+
+# compiz causes xterm to no longer be a distinct window, which is how things were
+# originally before i started fixing them.
+#compiz &
+
+############################
+
diff --git a/experiments/init.d/vncserver b/experiments/init.d/vncserver
new file mode 100755 (executable)
index 0000000..2b6e6dd
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+PATH="$PATH:/usr/bin/"
+export USER="fred"
+DISPLAY="1"
+DEPTH="16"
+GEOMETRY="1024x768"
+OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
+. /lib/lsb/init-functions
+
+case "$1" in
+start)
+log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
+su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
+;;
+
+stop)
+log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
+su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
+;;
+
+restart)
+$0 stop
+$0 start
+;;
+esac
+exit 0
+
diff --git a/experiments/xstartup.001 b/experiments/xstartup.001
deleted file mode 100755 (executable)
index 40b174b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-# set up gnome desktop environment for vnc.
-
-# references:
-#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
-#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
-#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
-#   https://ubuntuforums.org/showthread.php?t=1903220
-#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
-
-[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
-[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
-
-xsetroot -solid darkgreen
-vncconfig -iconic &
-
-#######
-gnome-session --session=ubuntu &
-#valid values for session that we've seen:
-# ubuntu
-# gnome
-# 2d-gnome (?)
-# unity
-#######
-
-x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
-
-#######
-# are these alternatives also?
-x-session-manager &
-#x-window-manager &
-#######
-
-# we don't see this running at home, but it sure seems needed on vmbuilder.
-gnome-panel &
-
-#gnome-settings-daemon &
-#gnome-shell &
-
-#######
-# one or the other of the window managers here.
-#hmmm: but mutter doesn't work at all.
-metacity &
-#mutter &
-#######
-
-nautilus &
-
diff --git a/experiments/xstartup.002 b/experiments/xstartup.002
deleted file mode 100755 (executable)
index 1df643d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-# set up gnome desktop environment for vnc.
-
-# references:
-#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
-#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
-#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
-#   https://ubuntuforums.org/showthread.php?t=1903220
-#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
-
-[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
-[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
-
-xsetroot -solid darkgreen
-vncconfig -iconic &
-
-#######
-gnome-session --session=ubuntu &
-#valid values for session that we've seen:
-# ubuntu
-# gnome
-# 2d-gnome (?)
-# unity
-#######
-
-x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
-
-#######
-# are these alternatives also?
-x-session-manager &
-#x-window-manager &
-#######
-
-gnome-terminal-server &
-
-# we don't see this running at home, but it sure seems needed on vmbuilder.
-gnome-panel &
-
-#gnome-settings-daemon &
-#gnome-shell &
-
-#######
-# one or the other of the window managers here.
-#hmmm: but mutter doesn't work at all.
-metacity &
-#mutter --replace &
-#######
-
-nautilus &
-
-# experimental additions since still getting lots of weird isssues:
-indicator-multiload &
-compiz &
-gnome-keyring-daemon &
-ibus-daemon &
-zeitgeist-daemon &
-
-# just nice to have started already.
-kwalletd &
-
-
-
diff --git a/experiments/xstartup.003 b/experiments/xstartup.003
deleted file mode 100755 (executable)
index d2a2667..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-# set up gnome desktop environment for vnc.
-
-# references:
-#   https://www.digitalocean.com/community/tutorials/how-to-setup-vnc-for-ubuntu-12
-#   https://www.digitalocean.com/community/questions/how-to-install-ubuntu-desktop-and-vnc
-#   https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Configuring_a_VNC_Server.html
-#   https://ubuntuforums.org/showthread.php?t=1903220
-#   https://askubuntu.com/questions/800302/vncserver-grey-screen-ubuntu-16-04-lts
-
-############################
-
-# boilerplate that people seem to agree on.
-
-[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
-[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
-
-xsetroot -solid darkgreen
-vncconfig -iconic &
-
-############################
-
-# the chaos zone.  all of these are still being tested.
-
-#######
-gnome-session --session=ubuntu &
-#valid values for session that we've seen:
-# ubuntu
-# gnome
-# 2d-gnome (?)
-# unity
-#######
-
-#######
-# are these alternatives also?
-x-session-manager &
-#x-window-manager &
-#######
-
-gnome-terminal-server &
-
-# we don't see this running at home, but it sure seems needed on vmbuilder.
-gnome-panel &
-
-# no longer exists?
-#gnome-settings-daemon &
-
-# do we need this?
-#gnome-shell &
-
-#######
-# one or the other of the window managers here.
-#hmmm: but mutter doesn't work at all.
-metacity &
-#mutter --replace &
-#######
-
-# this just brings up an initial file exploring window, although at one point i needed to
-# have nautilus running to see icons on the desktop.
-####right now there are no visible icons on the desktop, so is it failing?
-nautilus &
-
-############################
-
-# experimental additions since still getting lots of weird isssues:
-indicator-multiload &
-gnome-keyring-daemon &
-ibus-daemon &
-zeitgeist-daemon &
-
-############################
-
-# these processes are just nice to have started already.
-#
-# you know you were going to want them.
-
-# password tools from kde.
-kwalletd &
-
-############################
-
-# limbo of useless boneheads.
-#
-# these things just don't seem to work.
-
-# this never ever shows up.
-#x-terminal-emulator -geometry 100x32 -ls -title "$VNCDESKTOP Desktop" &
-
-############################
-
-# ------------------------------
-# "&@}*(@^!$)_-{%:</~`|#=;" !!!!
-# dungeon of pain and suffering.
-# "&@}*(@^!$)_-{%:</~`|#=;" !!!!
-# ------------------------------
-#
-# adding these in just makes things go splatfooey.
-
-# compiz causes xterm to no longer be a distinct window, which is how things were
-# originally before i started fixing them.
-#compiz &
-
-############################
-