Skip to content

Instantly share code, notes, and snippets.

@nablaa
Last active December 25, 2015 19:19
Show Gist options
  • Save nablaa/7026746 to your computer and use it in GitHub Desktop.
Save nablaa/7026746 to your computer and use it in GitHub Desktop.
Script to configure new fresh Xubuntu install. Installs dotfiles and sets up XMonad Xsession.
#!/bin/bash
set -e
set -u
echo "Make sure you have Xubuntu 12.04 LTS or newer installed"
echo "Updating system"
sudo apt-get update
sudo apt-get dist-upgrade
echo "Installing packages"
sudo apt-get install vim xmobar xmonad git etckeeper zsh xterm dmenu trayer feh xcompmgr rxvt-unicode-256color
echo "Installing dotfiles"
cd $HOME
git clone https://github.com/nablaa/dotfiles.git
cd dotfiles
./install.sh
vim +PluginInstall +qall
echo "Configuring etckeeper"
sudo sed -i s/VCS=\"bzr\"/VCS=\"git\"/g /etc/etckeeper/etckeeper.conf
echo "Initializing etckeeper"
sudo etckeeper init
echo "Changing default shell to zsh"
chsh -s /bin/zsh
echo "Creating custom X session entry to LightDM"
cat << EOF | sudo tee /usr/share/xsessions/custom.desktop
[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession
EOF
echo "Creating custom X session for the user"
cd $HOME
ln -s .xinitrc .xsession
echo "All done. Log off and login with custom Xsession"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment