blob: a338005a2554808aa2fdf2b76dccb29f8246c4f1 [file] [log] [blame]
Jonathan Hartb1e22112015-03-31 16:42:03 -07001#!/bin/bash
2# desktop-setup.sh
3#
4# Sets up a desktop environment for the ONOS tutorials.
5
6# Remove kernel boot options that will prevent the gui from running
7sudo sed -i s/text// /etc/default/grub
8sudo sed -i s/ipv6.disable=1// /etc/default/grub
9sudo update-grub
10
11sudo apt-get install -y xorg lxde systemd-shim
12
13#TODO: add backgrounds folder
14sudo mkdir -p /usr/share/backgrounds
15#TODO: change background
16# Remove wallpaper, change background color
17sudo sed -i 's/wallpaper_mode=1/wallpaper_mode=0/g' /usr/share/lxde/pcmanfm/LXDE.conf
18sudo sed -i 's/desktop_bg=#000000/desktop_bg=#104187/g' /usr/share/lxde/pcmanfm/LXDE.conf
19
20sudo sed -i 's/lang=1/lang=0/g' /etc/lxdm/default.conf
21sudo sed -i 's/bottom_pane=1/bottom_pane=0/g' /etc/lxdm/default.conf
22sudo sed -i 's/disable=0/disable=1/g' /etc/lxdm/default.conf
23
24# Allow VM to be rebooted from GUI
25echo "session required pam_systemd.so" | sudo tee --append /etc/pam.d/lxdm
26
27wget -O onos.png "https://gerrit.onosproject.org/gitweb?p=onos-vm.git;a=blob_plain;hb=refs/heads/onos-tutorial;f=onos.png"
28sudo cp onos.png /usr/share/backgrounds/default.png
29
30# Change LXTerminal default colors
31sudo sed -i 's/bgcolor=#000000000000/bgcolor=#ffffffffffff/g' /usr/share/lxterminal/lxterminal.conf
32sudo sed -i 's/fgcolor=#aaaaaaaaaaaa/fgcolor=#000000000000/g' /usr/share/lxterminal/lxterminal.conf
33
34# Disable screensaver
35sudo sed -i '/screensaver/d' /etc/xdg/lxsession/LXDE/autostart
36cat > /home/mininet/.xsessionrc << EOF
37# disable screensaver
38xset s off
39# disable dpms (standby)
40xset -dpms
41EOF