In the last couple of weeks, I installed a lot of different Ubuntu-based distros on my system(s). There was Ubuntu 13.04, Xubuntu 13.04, Linux Mint MATE and Crunchbang Linux. The distro I liked most was Xubuntu 13.04, but somehow, it was still too much of stuff pre-installed that I don’t need or even like. While it was pretty comfortable to work with xfce4, I like Openbox more. I even like i3wm more, but that’s another story. On the ThinkPad, I had installed Xubuntu 13.04 and equipped it right after the installation with Openbox, tint2 and conky (I posted about it previously). I’m now using this setup for a week and this is for a long time the best OS in my eyes since I was using OS X as the one-and-only system years ago. I’m superhappy how well it works on the ThinkPad. For work, I run Ubuntu 12.10 on this laptop, and I get around 2h’s when working on the battery. Running my own Xubuntu/Openbox setup increases the battery life to up to 4h+. Of course, as a YouTube addicted one, I quickly decrease the available power by showing videos about vim, different linux (mainly console-based) tools and also flight/flight-sim stuff. However, it works much better with my setup than with the more or less stock Ubuntu (I’ve simply installed the gnome-session-fallback package as I don’t like Unity).
When I read stuff about how to configure stuff (especially for tint2 or conky), I often read on the ArchWiki. It’s with UbuntuUsers-Wiki the best (in my mind) out there. So the question came up, why don’t I use Arch? Ubuntu (or Canonical) is on the best way to become evil with their ways to handle things (maybe not as evil as Google or Apple, but still – I often hear complains).
The reason why I still use and will continue to use Ubuntu for my own computers is that I work with them all-day-long. I’m simply rid of different systems at work and at home. I had this when working for Cisco or Medion, Windows there, Mac at home, or Linux… I’ve now switched completely to Linux and I’m also a bit proud of that. I admit, Arch could be the better Linux for me as there is a very active community who develops stuff, especially when it comes to “pimping” desktops, but as mentioned before – I’m happy to work on the same system now. Workstation, server at home and laptop and more (;)) at work. So that’s why I’ve chosen Ubuntu for this post.
So what is this post about? Well, it’s nothing less then setup a Ubuntu-based setup on your own. Let’s get started!
As base system, I don’t use Ubuntu Desktop. Unfortunately, Canonical has dropped the “Alternate” installation ISOs (or I simply was to blind to find it) – however, I’m gonna use the current server ISO, which is by today Ubuntu Server 13.04.
Table of content
Part 1 – Installation of the base system
Part 2 – Setting up the graphical environment
Part 3 – Multimedia
Part 4 – xcompmgr and Openbox basic settings
Part 5 – making Openbox more comfortable
Part 6 – Font Antialiasing
Part 7 – (Optional) install Japanese fonts
Part 8 – Installing tint2
Part 9 – Themes
Part 10 – Recommended tools
Part 11 – GTK themes
Part 12 – Mouse theme
Part 13 – Icons
Part 14 – File manager
Part 15 – Enhancing Openbox autostart
Part 16 – Graphical login
Part 17 – Wallpaper
Part 18 – Remove icons from the Openbox theme & more font settings
Part 1 – Installation of the base system
I’ve created a VirtualBox VM to do the steps again and to be able to show you some screenshots.
A very important (in my mind) setting in VirtualBox is to set the NIC to “bridged adapter”. But that is only important if you want to install in VirtualBox, too.
I’ve started the installation and get the the first point of options:
I simply chose “Install Ubuntu Server” here and let it install in the English version (because I blog in English). I then select English as system language and chose (for my own pleasure) the German keyboard. Now it will take some time until some drivers will be loaded and the network autoconfiguration has done it’s job. In my case it failed to use my DHCP (which I guess has to do with my old FritzBox in the basement (I will move DHCP & DNS to an own Alix server in the near future)). So I configure this by hand.
When this is done – I have to give the system a name. I name it “ubuntu-from-scratch”.
I will not use a domain name now, because the new DNS server is not yet set up. I will leave this blank.
my “Full Name” should be Ubuntu User…
and my username is ufs (for Ubuntu from scratch).
Now I have to create a password for my user.
I have to type it twice to be sure I haven’t typed it wrong and then can not login.
Encryption of the home folder (or the whole system) makes sense if you deal with sensible data and/or you use a mobile device. I’ve of course encrypted the whole OS on the ThinkPad, but in this VM, it does not make a lot sense for me, so I’ll skip it.
The Ubuntu setup tries to find the correct timezone. This one is right for me.
The disk setup is much easier today, compared to the very first installation I tried when I was a teenager back in 1993 and I played with very early versions of Slackware (and had very bad experience with the partition schemes ). In my workstation, I have 2 SSDs, a 80GB Intel which I use for the root “/” and a 240GB OCZ which I use for “/home”. I use ext4 on both. In this VM, I simply chose “Guided – use entire disk”.
I accept this and let it write the partition table to the disk. Please note that this will DELETE all your existing data on the disk!
The main installation will now be executed and will take a moment or two, grab coffee/coke/whatever you like and relax for a moment.
If you don’t have a proxy server (normally the case if in private conditions), you can simply skip this message and let apt do it’s work. It will download some data from the web which will, depending on your bandwidth, also take a moment – but hey – you’ve something to drink, don’t you?
Next, the question appears of you want to install updates on your own OR do you want to install them automatically. I’ve been working for years with Windows and I always hated this automatic updates, so I do it on my own, but I’m disciplined enough to do the updates on my own from time to time. Your choice!
In the software selection, I just select “OpenSSH server” – I’ll do the rest by hand later on, when the system is installed.
Guess what – it takes a moment to install
Yes, we want GRUB to be installed to the master boot loader – this is the last step of the configuration – and the fun can begin!
Remove the CD and let the system reboot into your fresh installed Linux.
Part 2 – Setting up the graphical environment
Hopefully you still remember your login & password! Login now.
Oh! Look – there are some updates. Unlike the Debian netinstalled, Ubuntu does not load current files from the web while the installation (I guess there is an ISO for that…), but this is a good moment to show you how to update your system.
You will be asked for your password again. Your user HAS superuser-rights by using the sudo command. Enter your own password again, and the system will do the work as root-user. Be careful with sudo.
Once this is done, we’ve updates the repository list. That means that your system had an updated list of available packages on the repositories that you can use.
We gonna upgrade your system – pretty sure we’ll receive a current Linux kernel and updates for installed system software. No worries – this is pretty easy
$ sudo apt-get dist-upgrade -y
The -y at the end simply tells apt-get to allow to download additional software and to install it. If we don’t use this parameter, if could become pretty annoying to type “Y” several times. Also, it works and let your leave the computer for a moment.
Depending on your bandwidth – this will take a while. Once you’re back at the prompt, I recommend to reboot the system, mostly because a fresh kernel is one of the very rare reasons to reboot a Linux system.
Once your system is rebooted, login and let’s install the graphical environment.
We gonna install Xorg in it’s latest (in the repo) available version as well as xinit and the window manager Openbox.
pre class=”lang:default decode:true ” >$ sudo apt-get install xorg xinit openbox -y
See? We use -y again. This will download A LOT of data and install it. Hope you drink isn't too cold/too warm yet?
Done! Now we have the graphical environment installed (well, the basics). We can try and launch it!
You don't see much, don't you? No worries - if you see a grey background and the black cursor, you're in the graphical environment. Press the right mouse button to access the menu.
Click the entry "Terminal emulator" and you will be presented - by a terminal. Yeah! More white on black.
Part 3 - Multimedia
It's time to install some additional stuff like audio support and xcompmgr.
$ sudo apt-get install alsa-base alsa-utils alsa-tools-gui xfce4-mixer xfce4-volumed -y
If the software is installed, go and run alsamixer - it will show you if the soundcard was detected - press F6 to display some more information about the default soundcard in your system. You can increase the volume by using the cursor up key on the Master line. Hit "ESC" to leave.
A good way to test your soundcard is to install a browser and the Flash-Plugin and visit YouTube.
$ sudo apt-get install chromium-browser flashplugin-installer -y
This will also install a lot of additional libs - but no worries - that's fine. You can launch the browser by typing:
Go to YouTube and play a video with sound.
You don't hear sound, don't you? No problem. The sound channels are not yet activated, even if the volume is set. Launch the xfce4-mixer to fix this:
Now it should work
Here's a quick way to install the Video LAN Manager, my personal favourite video player on Linux (which gave me nightmares back in 2003 when installing it on Fedora Core 2 )
Today - luckily - it's much much easier - just 1 line:
$ sudo apt-get install vlc -y
Part 4 - xcompmgr and Openbox basic settings
I would recommend to install drivers for your graphics card before you continue.
It's pretty easy for the Radeon cards:
$ sudo apt-get install fglrx fglrx-updates -y
Once you've rebooted, you should launch the amdcccle and activate this option:
$ sudo apt-get install nvidia-current -y
I can't give you more hints for nVidia cards, as I switched to Radeon cards, which have by now the better drivers. I'm not alone with this idea
The xcompmgr is what compiz is for other desktops like Gnome, KDE etc. - it works pretty easy but has a very weird line of parameters to launch it correct.
$ sudo apt-get install xcompmgr -y
To test the installation, I use terminator, a very nice terminal emulator which supports native transparency. A reason why this helps me to test if xcompmgr works is that the native transparency under Openbox only works if xcompmgr is correct launched.
$ sudo apt-get install terminator -y
Launch terminator by typing:
Do a right-click on the terminator window and click settings...
...then open the tab Profiles -> Background and set it to 0.5 - activate the "Transparent background" option above and close the window. Close terminator.
Now, we have to launch xcompmgr with the right parameter and launch terminator again to see if native transparency works.
$ xcompmgr -cC -t-5 -l-5 -r4.2 -o.55 &
Launch terminator again:
Of course, 0.5 is a bit to transparent, but it helps to see if it works better. I normally run it with 0.8 to 0.9.
We want that this loads up every time we launch our setup. So we gonna create a bash file:
$ echo "xcompmgr -cC -t-5 -l-5 -r4.2 -o.55 &" > ~/compiz
$ chmod +x compiz
Now we need to tell Openbox to run this file on every launch:
$ mkdir ~/.config/openbox
$ echo "~/compiz &" >> ~/.config/openbox/autostart
To test this, we simply exit Openbox and relogin. Do a right-click somewhere on the background and select "Exit", then:
Do a right-click on the background and select "Terminal emulator" which is now by default terminator. Do it twice and move one window above the other.
Part 5 - making Openbox more comfortable
Now that we have the painful stuff set up fine, we can relax and set up Openbox. We for sure want to be able to run a tool without having to launch it from the terminal every time. This means we can should do two things:
1. Configure our Openbox menu
2. Create a shortcut for the standard Alt+F2 to run applications
We have to install a tool to configure the menu - or we should simply edit the config files using vi. I guess people who now vi will be able to do this on their own, so I show you the GUI way.
$ sudo apt-get install obmenu -y
$ obmenu &
Expand the "Openbox 3" entry and feel free to add new entries of delete old ones. You will notice that the "Web browser" will launch, because the system has set it as x-www-browser (it's the only one). If you go and install more, you could add more to this menu. So we go and create a new item for our chromium-browser and install firefox afterwards.
Click on the "Terminal emulator" to be on the right level, now click on "New item" on the menu above. The label is your choice, I use "Chromium", to make it shot. The Action is "Execute" (which is default). What we execute is "chromium-browser".
Hit the 3.5" FDD icon to save and create another New item with these values:
- Label: Firefox
- Action: Execute
- Execute: firefox
Save again and close obmenu. Do a right-click on the background and see if Firefox and Chromium appears. If not, click on "Reconfigure" blow.
Try launching Chromium. It works, doesn't it?
To run Firefox, we of course have to install it first.
$ sudo apt-get install firefox -y
If that's completed - try to launch Firefox from your Openbox menu. Now you know how to configure the menu!
Before we edit the Openbox-config-file, we need to install the programm that pops up and allows us to launch any program. There are different tools to do this job, but I've selected gmrun for this job. Feel free to install your own here.
$ sudo apt-get install gmrun -y
Try it works:
Press ESC to stop it.
Next, we need to configure the Openbox config-file. This particular file is NOT yet in the right folder. We need to copy the example file over to this folder and edit it afterwards.
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox
To make it easier for beginners, we gonna install & use mousepad for editing (even if I personally prefer vim ).
$ sudo apt-get install mousepad -y
I've selected "Oblivion" from "View" -> "Color Scheme" and also activated "Line Numbers" - this will make it easier to edit the file.
Search for "Launch gnome-screenshot" and paste the following code below:
Save the file, close mousepad and reconfigure (right-click on the background and select "Reconfigure").
Press Alt+F2 and you should be see the gmrun box (or whatever tool you use).
Here is a shortcut that I personally love (seen in tiling managers like i3wm):
This will launch a terminal everytime you press Alt+Enter. Very helpful if you use them a lot. Just place it below the Alt+F2 shortcut into your ~/.config/openbox/rc.xml.
Part 6 - Font Antialiasing
By default - Linux has not the nicest fonts, but I want them - and Ubuntu shows that this is possible. The trick is to install a package and add a config file.
$ sudo apt-get install gnome-settings-daemon -y
$ mkdir ~/.config/fontconfig
$ mousepad ~/.config/fontconfig/fonts.conf
Now, paste this XML-code into the file:
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<edit mode="assign" name="rgba">
<edit mode="assign" name="hinting">
<edit mode="assign" name="hintstyle">
<edit mode="assign" name="antialias">
<edit mode="assign" name="lcdfilter">
Exit Openbox and relaunch and you will be VERY surprised how much better your fonts will look (or even after installing, without restart).
Part 7 - (Optional) install Japanese fonts
This is pretty easy:
$ sudo apt-get install ttf-takao-mincho ttf-takao -y
Part 8 - Installing tint2
Tint2 is a taskbar - a very flexible and easy to configure one. You install it this way:
$ sudo apt-get install tint2 -y
Here is my config:
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 100
border_color = #FFFFFF 16
# ID 2
rounded = 0
border_width = 0
background_color = #afd700 100
border_color = #FFFFFF 48
# ID 3
rounded = 0
border_width = 0
background_color = #FFFFFF 6
border_color = #FFFFFF 68
# ID 4
rounded = 0
border_width = 0
background_color = #ff8700 100
border_color = #FFFFFF 68
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 18
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 0
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 2
strut_policy = follow_size
taskbar_mode = single_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 0
urgent_nb_of_blink = 3
task_icon = 0
task_text = 1
task_centered = 0
task_maximum_size = 100 35
task_padding = 6 2
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 4
task_iconified_background_id = 3
task_tooltip = 0
# Task Icons
task_icon_asb = 70 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 70 0 0
task_font = sans 7
task_font_color = #FFFFFF 68
task_active_font_color = #005f00 100
task_urgent_font_color = #870200 100
task_iconified_font_color = #FFFFFF 68
font_shadow = 0
# System Tray
systray = 1
systray_padding = 0 4 5
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 16
systray_icon_asb = 70 0 0
time1_format = %H:%M
time1_font = sans 7
#time2_format = %A %d %B
##time2_font = sans 6
clock_font_color = #FFFFFF 74
clock_padding = 1 0
clock_background_id = 0
clock_rclick_command = orage
tooltip_padding = 2 2
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = sans 8
tooltip_font_color = #000000 80
mouse_middle = none
mouse_right = none
mouse_scroll_up = none
mouse_scroll_down = none
battery = 0
battery_low_status = 15
battery_low_cmd = notify-send "battery low"
battery_hide = never
#bat1_font = DejaVu Sans 6
bat2_font = DejaVu sans 6
battery_font_color = #FFFFFF 74
battery_padding = 1 0
battery_background_id = 0
# End of config
I don't like the rounded corners in that case - and so I've modified the default tint2rc
To launch tint2 when Openbox startx, add it to the autostart file:
$ echo "tint2 &" >> ~/.config/openbox/autostart
Part 9 - Themes
Of course, Openbox has themes. It also has an own tool to change them:
I personally prefer "Carbon" - but that's taste
Part 10 - Recommended tools
(the name is also the package name)
$ sudo apt-get install [PACKAGE] -y
It's not as hard as I thought to setup an Ubuntu from scratch as I thought. I hope these instructions will help you to setup your own Unity-free desktop and make you work with it fun. It finally helped me to do the last step from Windows and OS X to Linux.
I will post much more on how to make Openbox the perfect window manager in the near future. We don't have a wallpaper yet, maybe we want a graphical login? And what about themes and icons for thunar? Stay tuned ^^
Here is a little teaser - a photo I've taken today from my triple-head setup, where I run SLiM as login manager.