Skip to content

Instantly share code, notes, and snippets.

@pierew
Last active August 29, 2015 14:17
Show Gist options
  • Save pierew/3103f98e1acf218f2f3c to your computer and use it in GitHub Desktop.
Save pierew/3103f98e1acf218f2f3c to your computer and use it in GitHub Desktop.
A Script to Install Minimal X server and open Cockpit on Boot
echo "Install Minimal X Environment & Midori & PWGen"
yum groups install -y base-x
yum install -y unclutter openbox lightdm midori xterm
clear
echo "Configure RC.Local"
touch /etc/rc.d/rc.local
echo '#!/bin/bash' >> /etc/rc.d/rc.local
echo 'lightdm' >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
echo "Configure LightDM"
sed 's/#autologin-user=/autologin-user=console/g' -i /etc/lightdm/lightdm.conf
sed 's/# autologin-user =/autologin-user = console #/g' -i /etc/lightdm/lightdm.conf
sed 's/#autologin-user-timeout=0/autologin-user-timeout=0/g' -i /etc/lightdm/lightdm.conf
sed 's/# autologin-user-timeout =/autologin-user-timeout = 0 #/g' -i /etc/lightdm/lightdm.conf
echo "Add & Configure Console User"
useradd -m console
echo "Configure openBox of 'console'"
mkdir /home/console/.config
mkdir /home/console/.config/openbox
touch /home/console/.config/openbox/autostart
echo "midori -e Fullscreen -a http://localhost:9090" >> /home/console/.config/openbox/autostart
echo "Configure Midori of 'console'"
mkdir /home/console/.config/midori
wget https://gist.github.com/pierew/3103f98e1acf218f2f3c/raw/74ca16dc1cd650cd81b61c4fea59e98186332319/midoriconfig -O /home/console/.config/midori/config
chown console -R /home/console/
chgrp console -R /home/console/
clear
echo Clear UP Environment
yum remove -y pwgen
clear
echo "FINISHED!"
echo "The Server need a Reboot!"
echo "Please login first time in Console with your Password after Reboot"
passwd console
[settings]
default-encoding=ISO-8859-1
enable-developer-extras=true
enable-site-specific-quirks=true
enable-webgl=true
enable-javascript=true
default-charset=ISO-8859-1
location-entry-search=https://duckduckgo.com/?q=%s
toolbar-items=TabNew,Back,NextForward,ReloadStop,BookmarkAdd,Location,Search,Trash,CompactMenu
homepage=http://localhost:9090
tabhome=about:dial
download-folder=/home/console/
toolbar-style=MIDORI_TOOLBAR_ICONS
load-on-startup=MIDORI_STARTUP_HOMEPAGE
identify-as=MIDORI_IDENT_FIREFOX
user-agent=Mozilla/5.0 (X11; Linux; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Midori/0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment