Taking Control of Your Computer: Ubuntu Minimal Install with Openbox

Note: This was originally posted on the Vexing Rebel Facebook page here. One addition has been made… the Xfce4 Settings Manager (installs as “xfce4-settings”, run with “xfce4-settings-manager”). This addition has been added to the instructions and the script text.

The best way to be secure on your computer is to control what is installed on it. For the most control, I would suggest starting off with an Ubuntu Minimal Install and build upon that.

I chose Ubuntu because it (and its derivatives… like Linux Mint) are (in my opinion) the most user friendly Linux distros out there. It is very easy to get support from the forums; the repositories contain most of the useful software; new repositories/PPA’s are easy to add; you can install via .deb files (akin to M$ .exe/.msi files); you can easily create the flavor you want, AND they offer a Minimal Install disk containing a very base system you can build on.

The Minimal Install does not put ANYTHING on the disk but what is required to boot and use the base system. There are no music players, office suites, picture viewers, etc… Heck, there isn’t even a desktop or graphical login. It is command line only. HOWEVER, this can EASILY be changed. You add what you want.

I have spent the last couple of weeks compiling this information, testing it out, etc. and have decided to put it all together as a *buntu Minimal Install Guide. Why the “*” in front of “buntu”? Because you can turn the Minimal Install into any flavor of “buntu” you want. You can create a “homebrew”, Xubuntu, Lubuntu, Kubuntu, Openbox, etc.

For this guide, I am going to show you how to do an Openbox (Openbuntu?) with (mostly) Xfce support. If you want something else, this guide will still be of use to you, and then you can alter what I have listed below in the customization section.

Creating the base system:

1. Download the Ubuntu minimal install disk here: http://tinyurl.com/ygawub
2. Either burn the ISO to disk, or use Unetbootin to create a bootable USB thumbdrive.
3. Make sure your computer is connected to the Internet via an ethernet cable.
4. Boot to the minimal install disk and choose “Install”. Note: the “Tab” key will cycle through answers, and “Enter” will select the answer you have highlighted. In some areas you can use the left/right arrow keys to choose between “Yes”, “No”, and “Go Back”.
5. Choose your language, territory, and keyboard layout at the prompts.
6. Name your computer.
7. Choose the Mirror (simply select your country if possible).
8. Set proxy (or leave blank if none are needed).
9. This is a net install, so it will then begin downloading components to install.
10. Fill in the name you want to use.
11. Choose your user name. For security purposes, you can choose a user name other than your first name. Think about it, half of logging into your computer is knowing the user name. The other half, of course, is knowing the password.
12. Choose your password. I like to make my passwords something I can remember, but are not easy to guess or emulate. For example, I might pick a phrase like: “I hate Mondays”, but will change it so that, even if someone knows you hate Mondays, they will have a hard time figuring out how you did your password. “I hate Mondays” can turn into “Ih@3m0nd&z”. This way you are using (no repeat) numbers, letters, symbols, and capitalization for your password.
13. You are then given a choice to encrypt your Home directory. I would say yes… this way, if anyone boots to a live CD on your system; takes your drive; etc. they will not be able to access your files in your Home Folder without finding a way to decrypt it.
14. Confirm or change your timezone.
NOTE: At this point, prior to moving on, you may remove your USB thumbdrive. The reason you may wish to do this, is because there are occasions in which Grub gets written to the thumbdrive instead of the hard drive. If you hit enter and moved on to “Partition Disks”, you can “Go Back” to the timezone, remove your USB thumbdrive, and proceed. If you continued the installation with the USB thumbdrive still connected, and Grub was written to the USB thumbdrive… don’t worry, it is an easy fix that will be listed in “Troubleshooting” at the end of this Guide.
15. Partition Disks: Unless you have other plans, I would choose “Guided – use entire disk and set up encrypted LVM”. This will encrypt the installation and require a passphrase in order to boot the computer.
16. It will then ask you to select the disk (usually there is only one choice… unless you left in your USB thumbstick). You will then need to confirm the changes to be made.
17. If you chose encrypted LVM, you will now need to provide a passphrase. I would do this in a similar fashion as I suggested with the password above.
18. You will then be asked to change or confirm the amount to use for the guided partition. I would just select continue (unless you have other plans).
19. You will then be asked to confirm the changes to be made.
20. It will then download and install the basic system. A list of the packages that will be installed can be found here: http://tinyurl.com/lqyputm (this is for version 14.04).
21. You will now need to choose how you want to manage upgrades to the system. I would NOT choose Landscape. Landscape is a proprietary web service. I generally choose “Install security updates automatically”, but you don’t have to.
22. Next you will be asked to make a software selection. Here you can choose to install a full system, server, etc. The idea here is to do an install you fully control, so DO NOT SELECT ANYTHING. Just skip it (choose “Continue”), and move on.
23. You will then be asked to install the Grub Boot Loader to the MBR. Make sure it does not write to the USB thumbdrive (if you did not remove it), and choose “yes”. If it accidentally writes to the USB thumbdrive, we can fix it in the troubleshooting section.
24. You will then be asked to confirm the UTC clock settings.
25. You will then be prompted to remove any installation media and reboot.

Customizing the Installation:
Here is where we are going to make your system shine the way you want it. Here you can create the desktop you want with the programs you want. As stated earlier, I will be setting up an Openbox system with (mostly) Xfce support. You can alter this as you get to the appropriate parts of this customization.

After rebooting, You will be brought to the command line login prompt. Put in your credentials and log in. At this point you have a couple of option on how you wish to proceed.

You can:
a. Hand type in all of the commands.
b. Run a script. (I will provide a way for you to get a script in the script section)
c. Copy and paste the commands.

The problem with options “b” and “c” above, is that you have no ability at this point to access a text file or script. In order to do this, you are going to have to mount a USB thumbdrive. The trick at this point though is… it will not auto-mount. No worries. If you want to mount a USB thumbdrive, do the following:
1. Plug in the USB thumbdrive.
2. Type in the command sudo fdisk -l Note: You are looking for a partition like “/dev/sdb1”, remember what it is called (most likely “/dev/sdb1”).
3. Create a mount point: sudo mkdir /media/usb
4. Mount the USB thumbdirve: sudo mount /dev/sdb1 /media/usb
5. Change to the USB directory: cd /media/usb
6. You can now list the files contained there by typing in: ls
7. You can now run any “sh” script with the command: sh filename.sh (replacing “filename” with the name of your .sh file.
8. If you choose the copy/paste method, you may run into some issues… however, “nano” is installed by default. To edit a text file, you would use the command “nano filename” (without the quotes, replacing “filename” with the name of the file).
9. When you are done with the USB thumbstick, you can unmount it with the command: sudo umount /media/usb

Note: your best bet is to use a pre-made script (discussed in the Script section).

Here is the step-by-step commands we are going to use (refer to the Script section for automating this process):

Note: There are a couple of ways you can install from the command line. Each one has its lovers and haters. Each one has its perks and disadvantages. They are as follows:
1. sudo apt-get install –install-recommends packagename
This installs a package and all of its recommends. This may install a large amount of files, some of which you may not need.
2. sudo apt-get install –no-install-recommends packagename
This installs the bare essentials of a package. It is a lighter install, but the program may not have the functionality you expect. You can see what requirements/recommends a package may be missing by using the command: apt-cache show packagename
3. sudo apt-get install packagename
This is the standard method of installing packages, suggested packages will be listed, but not installed.

For this guide, I am going to simple use the command: sudo apt-get install packagename. If you wish to do otherwise, you are free to do so.

Customizing the System (Part 1):
The packages you decide to use can be based upon your desire for security, minimal footprint (uses less computer resources), etc. I am choosing these packages due to functionality, small footprint, customization abilities, and security.
1. We are going to update and upgrade the installation:
sudo apt-get -y –force-yes update
sudo apt-get -y –force-yes upgrade
2. We will add mouse support; the ability to add PPA’s; numlock control; and a basic text editor.
sudo apt-get install gpm software-properties-common leafpad numlockx
3. Adding tools to be able to compile from source:
sudo apt-get install build-essential checkinstall libgtk2.0-dev libmenu-cache-dev
4. Install the Graphics Stack:
sudo apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils libgtk-3-bin x11-session-utils
5. Allowing for the auto-mounting of USB and other devices. The file manager Thunar (added in a moment) will aid in this process:
sudo apt-get install gvfs gvfs-backends policykit-1
6. Install sound:
sudo apt-get install gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad pulseaudio gstreamer0.10-pulseaudio pavucontrol volti
7. Install Networking:
sudo apt-get install wireless-tools wpasupplicant bluez bluez-alsa bluez-gstreamer bluez-audio bluez-utils comgt indicator-application wicd-gtk
8. Install Print Capabilities:
sudo apt-get install –install-recommends cups-bsd cups-driver-gutenprint cups-pdf cups-pk-helper printer-driver-hpcups printer-driver-postscript-hp python-cups python-cupshelpers system-config-printer-gnome
9. Install the Desktop Manager:
sudo apt-get install openbox obconf obmenu menu xfce4-terminal xfce4-panel conky curl lm-sensors hddtemp xfce4-notifyd xfce4-appfinder gmrun menulibre xfdesktop4 xdotool xfce4-goodies xfce4-weather-plugin update-notifier xfce4-settings

Note: xfdesktop4 is used if you desire a standard desktop with icons. If you use the standard desktop you will lose the ability to right-click for the Openbox Menu, but you will have icons and a standard-style desktop. The ability to access the Openbox Menu can be achieved in other ways (including a menu button on the panel if you desire). If you choose NOT to use the standard desktop, you will have a more standard Openbox environment. The choice to use xfdestop4 will come later in the customization process.
10. Install a Desktop Manager. This is the graphical login screen. You can choose many flavors (XDM, LightDM, etc.). Here we are using XDM. I am including Qiv so that you can easily change the background image in XDM (I’ll show you how later).
sudo apt-get install xdm qiv
11. Install a File Manger:
sudo apt-get install thunar thunar-volman thunar-archive-plugin thunar-media-tags-plugin lxappearance tumbler
12. Install Package Managers:
sudo apt-get install aptitude synaptic gdebi
13. Install Power Managerment:
sudo apt-get install xfce4-power-manager xfce4-sensors-plugin gnome-system-monitor
14. At this point there are a couple of Repositories that need to be added so that you can install a couple of the programs listed below:
sudo apt-add-repository -y ppa:danielrichter2007/grub-customizer
sudo apt-add-repository -y ppa:stefansundin/truecrypt
sudo apt-add-repository -y ppa:pinta-maintainers/pinta-daily
sudo apt-add-repository -y ppa:pipelight/stable
sudo apt-add-repository -y ppa:linrunner/tlp
15. We are going to do a basic update:
sudo apt-get -y –force-yes update
sudo apt-get -y –force-yes upgrade
16. Install some utilities:
sudo apt-get install seahorse galculator gucharmap gparted gpicview gthumb fonts-liberation fonts-droid tango-icon-theme catfish xfce4-screenshooter rsync grsync gksu gufw gmountiso nitrogen
17. Install an Archive Manager and compression utilities:
sudo apt-get install unace rar unrar p7zip zip unzip p7zip-full p7zip-rar sharutils uudeview mpack arj cabextract file-roller
18. Install a music player, advanced text editor, spreadsheet, PDF viewer, browser, codecs, etc. If these programs are not to your liking, you can easily (for example) replace gnumeric for libreoffice-calc or abiword for libreoffice-writer. Some people want to use sylpheed (and bogofilter) in place of thunderbird; deluge instead of transmission; audacious instead of exaile; and so on.
sudo apt-get install libreoffice-calc libreoffice-pdfimport libreoffice-writer libreoffice-gtk thunderbird filezilla firefox firefox-locale-en flashplugin-installer evince transmission truecrypt keepassx xfburn audacity exaile guvcview puddletag soundconverter vlc ogmrip handbrake unetbootin pinta pipelight-multi tlp tlp-rdw grub-customizer libdvdread4 libavcodec-extra ubuntu-restricted-extras ttf-mscorefonts-installer

Note: Truecrypt was discontinued by the original author for (what I believe to be) dubious reasons. It is being maintained by the PPA we added above. Truecrypt is being re-written and re-branded as CipherShed. See more information here: https://ciphershed.org/
19. You will be asked by wicd to add users to the netdev group. Press the “Space Bar” to select your user, “Tab” to select “ok”, then hit “Enter”.
20. We now need to clean up our installation:
sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove
21. Reboot the computer, and then we will continue with Customizing the System (Part 2):
sudo ‘shutdown -r now’

Customizing the System (Part 2):
At this point, you should be booting up to an XDM graphical log in screen. Put in your user name and hit “Enter”; then do the same with your password.

Upon logging in, you will find you are now at a dark-gray/black screen with nothing but a mouse cursor to keep you company. Don’t panic… this is a basic, plain vanilla, Openbox setting. We are going to add our toppings of choice shortly.

Note: Right-clicking will bring up a menu to make selections from. Using Alt-Tab you can cycle through minimized windows if necessary.

We are still going to be doing most of our work via the terminal, but now it will be easier to copy and paste if you want. To paste in the terminal, middle-click your mouse and your copied material will paste in the terminal; or you can right-click and choose “paste”. You can cycle through old commands using the up arrow key. The command “clear” will clear the screen.

1. The first thing you will see (if you encrypted your install) will be a dialog urging you to record your passphrase. This will be an encryption code, and not the actual passphrase itself. Take care of this as you desire. Instructions are on the dialog box.
2. We need to enable and activate a few things:
If you have a laptop:
sudo tlp start (this will help with battery issues)

sudo /usr/share/doc/libdvdread4/install-css.sh (for DVD playback)

For watching Netflix with your browser (you will also need to do something to the browser, but we will get into that later):
sudo pipelight-plugin –enable silverlight
sudo pipelight-plugin –enable widevine
3. We need to make a few new directories:
mkdir ~/.fonts (you can copy any additional fonts you want here)
mkdir ~/ -p .config/openbox (this is where you will store and edit configuration files for Openbox)
sudo mkdir -p /root/backgrounds (this will be for your XDM background image)
4. Now we need to copy a few files:
cp /etc/conky/conky.conf ~/.conkyrc (this is to customize conky)
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml (this is to edit the right-click Openbox menu)
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml (this is to edit Openbox functionality and looks)
5. We need to create an autostart file for Openbox. This will be the file used to cause programs (like conky, panels, desktops, etc.) to launch when Openbox loads.
touch ~/.config/openbox/autostart
6. Now we need to fill in autostart information (whatever you don’t want to load, you can either NOT add to the autostart file, or you can comment out the line by putting a “#” (without the quotes) in front of it. You can do this by using the command: “sudo leafpad ~/.config/openbox/autostart” (without the quotes). Example: To stop the numlock from being always on, you can change “numlockx &” to “#numlockx &”.
echo “# These programs will run after Openbox has started” >> ~/.config/openbox/autostart
echo “numlockx &” >> ~/.config/openbox/autostart
echo “xfce4-panel &” >> ~/.config/openbox/autostart
echo “xfce4-power-manager &” >> ~/.config/openbox/autostart
echo “nitrogen –restore &” >> ~/.config/openbox/autostart
echo “(sleep 3s && volti) &” >> ~/.config/openbox/autostart
echo “(sleep 5s && conky) &” >> ~/.config/openbox/autostart
echo “xfdesktop &” >> ~/.config/openbox/autostart

Note: “xfdesktop &” will cause the dark-gray/black area to become a normal desktop capable of holding icons, etc. The Openbox Menu will not be available via right-click if you choose to use this. We can get the Openbox Menu by other means which will be discussed later.
7. We can now turn Numlock on:
echo “[ -x /usr/bin/numlockx ] && /usr/bin/numlockx on” | sudo tee -a /etc/X11/xdm/Xsetup
8. log off or reboot to see the changes, and then we will continue:
log off: openbox –exit
reboot: sudo ‘shutdown -r now’
9. If you chose to have a regular desktop, upon first login after it is activated, you will be greeted by a dialog asking about a panel. The default panel is populated, but can be customized or deleted.
10. There will be missing icons, and things may not look right, but we will fix that.
At the terminal (or from the Applications Menu, choose “Run Program”):
lxappearance
You can then choose the tab “Icon Theme”, and select Humanity (or another one of your choosing). Now most of your icons should appear and look decent.
11. Wicd and wireless. If you have a laptop, or are otherwise using a wireless connection, we need to configure this now.
In terminal (or Run Application): wicd-gtk
This will bring up the Wicd gui interface. Put in the needed details. This usually goes pretty smooth, but not always. Be patient, but if this gives you any issues, you may need to reboot the computer and come back and try again. Any major wireless issues will require some research and is outside the scope of this guide.

Note: At some point you will be asked for a keyring password. If you put in a password, it will ask you every time for verification before it will load the network interface. If you leave the fields blank and hit enter, you will be less secure but you will not be nagged for the password… it is up to you.

Note: After you get your wireless working properly, you can disconnect the wired connection. Upon doing this, some people experience an issue during reboot in regards to “locating network” and it may take a while to reboot. This can be fixed by doing the following:
sudo leafpad /etc/network/interfaces
Comment out (#) all of the items except “auto lo” and “iface lo inet loopback”
This should resolve the issue.
12. The first time you bring up Firefox, it will set up the silverlight/widevine plugins we installed earlier. After this is done, you will be able to use Firefox.

In order to use Netflix, you will need a “User Agent” add-on to fool Netflix into thinking you are running a Windows computer. Firefox will then be ready to go.

Note: Firefox is highly configurable and has tons of add-ons you can utilize. You can find more information here: http://tinyurl.com/md7dpvb and here: http://tinyurl.com/8swbh

I also utilize these (in the URL bar, put in about:config):
Open search results in a a new tab:
browser.search.openintab = true

Spell check all boxes:
layout.spellcheckDefault = 2

browser.urlbar.clickSelectsAll = true
browser.urlbar.doubleClickSelectsAll = true

browser.newtab.url (set url)
browser.startup.homepage (set url)
13. Add a dynamic menu to the Openbox Menu. The one complaint about the Openbox Menu is that when you install/remove programs, the Openbox Menu does not reflect the changes. This has been somewhat alleviated with the use of the “Debian” menu item, but it has its limitations as well. There is a cure for this, and it is called “openbox-menu”. You can find out more information here: http://tinyurl.com/pysf9k8.

a. Download the latest file here: http://tinyurl.com/nlp3opy
b. Untar (extract) the files: (you will need to be in the directory the file downloaded to… usually “Downloads”)
tar -xjvf openbox-menu-.tar.bz2
cd openbox-menu-
make
c. copy the openbox-menu binary to ~/.config/openbox/
cp openbox-menu ~/.config/openbox/
d. leafpad ~/.config/openbox/menu.xml

Note: You can also use a gui menu editor by typing in the command “obmenu” (without the quotes) and place the quoted information found below in the appropriate boxes (disregard the quotes if you use the gui method).

Place the following text where you want the menu to go:

Note: Replace the word “USER” with your user name. Remember case matters. Linux sees “User” and “USER” as two different things. I normally put this right above the Debian menu, right below the line “This requires the presence of the ‘menu’ package to work” Note: you can replace “xfce-applications.menu” with whatever menu you want. The menus are found in /etc/xdg/menus/
14. Add the Openbox Menu to the panel and with use of the “Super” (Windows) key (via Keybinding).
a. Create a launcher by right-clicking on the panel, choosing “Panel” and “Add New Items”.
b. A new launcher will appear on the panel. Right-click on it and choose “Properties”.
c. Click the icon on the right side of a page with a green + sign. It is right below the large green + sign.
d. Name it what you want (I often call it “Xfce Menu”), and put in the command: xdotool key super
e. You can click the Icon: “No Icon” button and select an icon if you desire.
f. Click “Create”

Note: You are going to have to create a custom keybinding and have it activated before the panel menu or super key will work.
15. Add custom keybindings:
leafpad ~/.config/openbox/rc.xml

Place the following text below the lines: C-g

root-menu

root-menu

Note: Once you save the document, you can type in the command “openbox –restart” to see the changes reflected.

Note: You can create keybindings for other handy items by using these commands:
Raise Volume: amixer -D pulse set Master 1%+ unmute
Lower Volume: amixer -D pulse set Master 1%- unmute
Toggle Mute: amixer -D pulse set Master Playback Switch toggle
Run a program: gmrun
Terminal: xfce4-terminal
Shutdown: gksudo ‘shutdown -h now’
Reboot: gksudo ‘shutdown -r now’
Log Out: openbox –exit
System Monitor: gnome-system-monitor
File Manager: thunar
16. Edit the XDM Background Image:
a. Take the image you want, and rename it to a single word (“wallpaper” is good) + the extension. For example: “My favorite picture.jpg” can become “wallpaper.jpg”
b. Open thunar as root: “sudo thunar” and then copy the image to /root/backgrounds
c. sudo leafpad /etc/X11/xdm/Xsetup
add the line “/usr/bin/qiv -zr /root/backgrounds/wallpaper.jpg” (without quotes)

Or you can copy and paste the following line in Terminal:
echo ”
#Background Image
/usr/bin/qiv -zr /root/backgrounds/wallpaper.jpg” | sudo tee -a /etc/X11/xdm/Xsetup

Note: If you wish to change the image, all you have to do now is rename the old image “wallpaper2” and name the new image “wallpaper”. This way you don’t have to keep editing the Xsetup file.
17. You can change the XDM greeting if you desire:
sudo leafpad /etc/X11/xdm/Xresources
change the line “xlogin*greeting: Welcome at CLIENTHOST”
to “xlogin*greeting: [Whatever you want]”

Note: Mine currently says “Abandon All Hope Ye Who Enter Here”
18. You can change the XDM login fail message:
sudo leafpad /etc/X11/xdm/Xresources
Change: xlogin*fail: Log in failed
To: xlogin*fail: [Whatever you want]

Note: Mine currently says “You [bleeped] up! Try again.” A fun one would be “The authorities have been alerted! Remain calm and do not flee.”
19. If you hate the XDM logo, you can comment it out (or possibly change it):
sudo leafpad /etc/X11/xdm/Xresources
Look for the line similar to “xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/ubuntu.xpm”. Put a “#” (without the quotes) in front of it.
20. Edit Conky:
leafpad ~/.conkyrc
There are a lot of interesting ways to do it. The Internet is full of scripts people have written. For starters, try these links: http://tinyurl.com/35f8px and http://tinyurl.com/yp8y76
21. From this point on, what you do is up to you. Have fun!

Note: You can get a list of all the packages installed on your system by using the command:
dpkg –get-selections > list.txt
The file “list.txt” will be in your Home folder.

Note: You can see hidden files and folders by pressing Control+H while in Thunar (File Manager); Control+H a second time, and it will go back to normal view.

Troubleshooting:
Things rarely go 100% smooth and easy. If you run into a few problems that may occur during installation, hopefully these tips can help you out.

Problem: You accidentally installed Grub on the USB thumbdrive and now you cannot boot into Linux.
Solution: Plug your USB thumbdrive back in, boot the computer, and then remove the USB thumbdrive.
Open a Terminal: sudo grub-install /dev/sda
Reboot the computer and all should be well.

Problem: When you unplug your wired Ethernet cable, the computer takes a long time to boot due to a “locating network” issue.
Solution: This can be fixed by doing the following:
sudo leafpad /etc/network/interfaces
Comment out (#) all of the items except “auto lo” and “iface lo inet loopback”
This should resolve the issue.

Problem: The sound doesn’t seem to work.
Possible Solution 1: In Terminal: pavucontrol
or from the Xfce Menu: Multimedia/PulseAudio Volume Control
Make sure all settings are correct and nothing is muted.
Possible Solution 2: Remove PulseAudio
sudo apt-get autoremove pulseaudio pavucontrol
sudo apt-get install gnome-alsamixer
Reboot the computer

If you do “Possible Solution 2”, the commands for the volume controls (for keybindings) are as follows:
Volume Up: amixer set Master 1%+
Volume Down: amixer set Master 1%+
Volume Mute/Unmute: amixer set Master toggle

Note: If this does not fix the problem, the problem is beyond the scope of this guide and will have to be researched.

Problem: Conky doesn’t start, or starts and then is taken down when the desktop loads.
Solution: This is often caused by Conky loading before the desktop. Simply change the delay for Conky’s start by changing the line in ~/.config/openbox/autostart from “(sleep 5s && conky) &” to “(sleep 15s && conky) &” (without the quotes)

Problem: You are having issues setting up a Printer.
Solution: In Firefox, go to http://localhost:631/ and choose “adding printers and classes” and then select “add printers”. You may need to install drivers, which is beyond the scope of this guide.

Note: If you are not allowed to log in to localhost:631, go into terminal and enter “sudo killall cupsd”. Cups will then automatically restart and you will be able to log in.

Scripts:
Even though I have an IT background, I am an extreme noob when it comes to writing Linux scripts. Bash/SH Scripts are akin to M$ Batch Files. The pound sign/hashtag (#) is used for comments.

If you desire to trust what I have written here, you can create a file called [whatever you want].sh and copy and paste the text into the file and save it. Be careful to insure that the format of your .sh file resembles my text.

Note: I would choose a name that is a single word or hyphenated text. For example: If you want to name it “Lame Script This Guy Wrote.sh”, it would be better to name it “lamescriptthisguywrote.sh”… as for me, I would pick something simple like, “basicinstall.sh”.

Note: There are (I’m guessing) millions of people better at writing scripts than me, and if you are one of them, PLEASE write a better one. The only issues I have had with mine are:

1. Sometimes, not everything installs (probably due to me putting in an errant “return”, etc.). One solution I have found is to break the script down into several batches of installations instead of a huge installation segment.
2. I cannot automate everything (like inserting text into a specific place in a populated file), and so there are things that have to be done manually.
3. Sometimes I put the cart before the horse, and some things cannot occur because the prerequisites were not met. I solved this by breaking my script down into multiple scripts, so that you can launch each script after the prerequisites are done (like needing to reboot).

Note: If necessary, you can make the script executable by running the command: chmod +x [filename].sh

Note: Run the script with the command: sh filename.sh
Do NOT run the script as sudo. The various commands will use sudo when needed.

Below is the text of several Script Files:
If you want to change any of the programs listed, feel free to do so.

Basic Installation: (copy the entire segment of text through “#End of Script”)
#!/bin/bash

echo “Updating and upgrading installation.”

#Update and upgrade installation
sudo apt-get -y –force-yes update
sudo apt-get -y –force-yes upgrade

echo “Adding mouse support; the ability to add PPA’s; numlock control; and a basic text editor.”

#Mouse support, Repository addition, numlock, and text program
sudo apt-get install gpm software-properties-common leafpad numlockx

echo “Adding tools to compile from source.”

#To be able to compile from source
sudo apt-get install build-essential checkinstall libgtk2.0-dev libmenu-cache-dev

echo “Installing Graphics Stack.”

#Graphics Stack
sudo apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils libgtk-3-bin x11-session-utils

echo “Allowing for the auto-mounting of USB and other devices. Will use Thunar to aid in this process.”

#Automount USB, etc (will need File Manager Thunar)
sudo apt-get install gvfs gvfs-backends policykit-1

echo “Installing sound.”

#Sound
sudo apt-get install gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad pulseaudio gstreamer0.10-pulseaudio pavucontrol volti

echo “Installing networking.”

#Networking
sudo apt-get install wireless-tools wpasupplicant bluez bluez-alsa bluez-gstreamer bluez-audio bluez-utils comgt indicator-application wicd-gtk

echo “Installing print capabilities.”

#Printing
sudo apt-get install –install-recommends cups-bsd cups-driver-gutenprint cups-pdf cups-pk-helper printer-driver-hpcups printer-driver-postscript-hp python-cups python-cupshelpers system-config-printer-gnome

echo “Installing Openbox with Xfce4 tools.”

#Openbox
sudo apt-get install openbox obconf obmenu menu xfce4-terminal xfce4-panel conky curl lm-sensors hddtemp xfce4-notifyd xfce4-appfinder gmrun menulibre xfdesktop4 xdotool xfce4-goodies update-notifier xfce4-settings

echo “Installing XDM desktop manager and Qiv to allow the changing of the XDM background image.”

#Desktop Manager – qiv is used to change the background image
sudo apt-get install xdm qiv

echo “Installing Thunar file manager.”

#File Manager
sudo apt-get install thunar thunar-volman thunar-archive-plugin thunar-media-tags-plugin lxappearance tumbler

echo “Installing package managers.”

#Package Manager
sudo apt-get install aptitude synaptic gdebi

echo “Installing power manager.”

#Power Manager
sudo apt-get install xfce4-power-manager xfce4-sensors-plugin gnome-system-monitor

echo “Adding Repositories.”

#Add Repositories
sudo apt-add-repository -y ppa:danielrichter2007/grub-customizer
sudo apt-add-repository -y ppa:stefansundin/truecrypt
sudo apt-add-repository -y ppa:pinta-maintainers/pinta-daily
sudo apt-add-repository -y ppa:pipelight/stable
sudo apt-add-repository -y ppa:linrunner/tlp

echo “Updating and upgrading.”

#Basic Update
sudo apt-get -y –force-yes update
sudo apt-get -y –force-yes upgrade

echo “Installing additional programs.”

#Install some utilities
sudo apt-get install seahorse galculator gucharmap gparted gpicview gthumb fonts-liberation fonts-droid tango-icon-theme catfish xfce4-screenshooter rsync grsync gksu gufw gmountiso nitrogen

#Install an Archive Manager and compression utilities
sudo apt-get install unace rar unrar p7zip zip unzip p7zip-full p7zip-rar sharutils uudeview mpack arj cabextract file-roller

#Install a music player, advanced text editor, spreadsheet, PDF viewer, browser, codecs, etc.
sudo apt-get install libreoffice-calc libreoffice-pdfimport libreoffice-writer libreoffice-gtk evince transmission

sudo apt-get install thunderbird filezilla firefox firefox-locale-en flashplugin-installer

sudo apt-get install xfburn audacity exaile guvcview puddletag soundconverter vlc ogmrip handbrake pinta pipelight-multi tlp tlp-rdw grub-customizer libdvdread4 libavcodec-extra

sudo apt-get install unetbootin truecrypt keepassx

sudo apt-get install ubuntu-restricted-extras ttf-mscorefonts-installer

echo “Cleaning up installation.”

#Clean up
sudo apt-get autoclean

sudo apt-get clean

sudo apt-get autoremove

echo “Please reboot and continue with the next script after you log back in.”

#End of Script

Customization Part 1: (copy the entire segment of text through “#End of Script”)
#!/bin/bash

echo “Enabling and activating some programs.”

#Start tlp
sudo tlp start

#Activate libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh

#Enable Pipelight
sudo pipelight-plugin –enable silverlight
sudo pipelight-plugin –enable widevine

echo “Making some additional directories.”

#Make Directories
mkdir ~/.fonts
mkdir ~/ -p .config/openbox
sudo mkdir -p /root/backgrounds

echo “Copying files.”

#Copy Files
cp /etc/conky/conky.conf ~/.conkyrc
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml

echo “Creating files.”

#Create Files
touch ~/.config/openbox/autostart

echo “Filling in autostart information.”

#Fill in information to autostart file
#Note “>” means overwrite everything, “>>” means append existing
echo “# These programs will run after Openbox has started” >> ~/.config/openbox/autostart
echo “numlockx &” >> ~/.config/openbox/autostart
echo “xfce4-panel &” >> ~/.config/openbox/autostart
echo “xfce4-power-manager &” >> ~/.config/openbox/autostart
echo “nitrogen –restore &” >> ~/.config/openbox/autostart
echo “(sleep 3s && volti) &” >> ~/.config/openbox/autostart
echo “(sleep 5s && conky) &” >> ~/.config/openbox/autostart
echo “xfdesktop &” >> ~/.config/openbox/autostart

echo “Setting Numlock to always on.”

#Fill in information to keep Numlock on
# “| sudo tee -a” used to append a root file
echo ”
# Turn NumLock on” | sudo tee -a /etc/X11/xdm/Xsetup
echo “[ -x /usr/bin/numlockx ] && /usr/bin/numlockx on” | sudo tee -a /etc/X11/xdm/Xsetup

echo “Please log out or reboot to see the changes made. You will have to manually continue with Customizing the System”

#End of Script

Finishing Customization:
After these scripts run, you should be well through the guide above. You can begin to manually customize the system, starting with “Customizing the System (Part 2):” number 9.

The scripts end after number 8, which reads:
log off or reboot to see the changes, and then we will continue:
log off: openbox –exit
reboot: sudo ‘shutdown -r now’

Final Note:
I hope that you find this guide useful. This information is all over the Internet, but (until now) I haven’t found it collected all in one place. I apologize ahead of time for any typos, I believe I have been thorough, but you never know.

Hopefully you will enjoy taking better control of your operating system and your computer. I know I have! Until next time, this is Curt – The Vexing Rebel, signing out!