31
Xubuntu with a *pure* Debian Base (from scratch) Or, rather... How to make Debian look and behave like Xubuntu. Copyright © 2014, RichJack http://linuxthemer.blogspot.com/

Xubuntu with a *pure* debian base from scratch

  • Upload
    richjack

  • View
    10.219

  • Download
    4

Embed Size (px)

DESCRIPTION

How to setup a minimal Debian Linux installation and theme it so that it is identical to Xubuntu 14.04. Then create your own ISO for distribution.

Citation preview

Page 1: Xubuntu with a *pure* debian base from scratch

Xubuntu with a

*pure* Debian Base

(from scratch)Or, rather... How to make Debian look and behavelike Xubuntu.

Copyright © 2014, RichJack

http://linuxthemer.blogspot.com/

Page 2: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Copyright © 2014 Page 2 Of 31

Contents

License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).............................3

Introduction.............................................................................................................................................................4

Chapter 1................................................................................................................................................................ 5

1. Prepare your build environment.................................................................................................................5

2. Download the netinst ISO............................................................................................................................5

3. Install Debian.................................................................................................................................................6

4. Setup Display Server (Xorg) and Audio (PulseAudio)............................................................................6

5. Install XFCE base system and Display/Login Manager......................................................................... 7

Chapter 2................................................................................................................................................................ 8

6. Install Extra XFCE Packages......................................................................................................................8

7. Xubuntu Theming......................................................................................................................................... 9

7.1 Desktop Theme......................................................................................................................................9

Chapter 3..............................................................................................................................................................13

7.2. Light Display Manager (lighdm)........................................................................................................13

7.3 Light-Locker..........................................................................................................................................14

7.4 Plymouth............................................................................................................................................... 15

Chapter 4..............................................................................................................................................................17

8. Applications................................................................................................................................................. 17

8.1 Web Browser........................................................................................................................................17

8.2 Other Applications............................................................................................................................... 19

9. Final Tweaks............................................................................................................................................... 22

Chapter 5..............................................................................................................................................................25

10. Prepare your system................................................................................................................................25

10.1 Set up the Skeleton directory...........................................................................................................25

10.2 Test the Skeleton and create a live session user account..........................................................26

10.3 Download imaging tools from Refracta..........................................................................................27

10.4 Clean your system.............................................................................................................................28

11. Create a Live CD ISO .............................................................................................................................29

About the Author..................................................................................................................................................30

Page 3: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 3 Of 31

License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-

SA 4.0)

This tutorial was originally displayed on http://linuxthemer.blogspot.com/ on 13/06/2014.The Author is RichJack and the work is licensed under the Creative Common Attribution-ShareAlikelicense:

You are free to:

Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

Attribution — You must give appropriate credit, provide a link to the license, andindicateif changes were made. You may do so in any reasonable manner, but not in any way thatsuggests the licensor endorses you or your use.

ShareAlike — If you remix, transform, or build upon the material, you must distributeyour contributions under the same license as the original.

No additional restrictions — You may not apply legal terms or technologicalmeasures that legally restrict others from doing anything the license permits.

Notices:

You do not have to comply with the license for elements of the material in the public domainor where your use is permitted by an applicable exception or limitation.

No warranties are given. The license may not give you all of the permissions necessary foryour intended use. For example, other rights such as publicity, privacy, or moralrights may limit how you use the material.

This is a human-readable summary of (and not a substitute for) the license:http://creativecommons.org/licenses/by-sa/4.0/legalcode

Page 4: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 4 Of 31

Introduction

Why? Xubuntu is a very polished distro and has gained many fans over the last couple of years asUbuntu users dissatisfied with the Unity interface have looked for something more akin to the oldGnome 2 way of working, or wanted something that would run well on hardware no longer supportedby Unity. The current version, 14.04 is an LTS release and is as good an Xubuntu release as I haveused, and looks stunning - modern, but straight-forward.

Still, Xubuntu has always been a little 'heavy' for an XFCE-based distribution, both in terms of RAMusage and it's reliance on many gnome packages and dependencies.

Debian is a leaner system, though out-of-the-box, XFCE looks really dated on Debian.

The Goal: Create a pure Debian installation with XFCE, themed to look like Xubuntu, but with as fewgnome dependencies as possible, whilst maintaining the same functionality.

How: Starting with a net install, install the packages one by one, check dependencies, replace withalternative packages if available, then configure and theme like Xubuntu.

Difficultly: intermediate. Some prior use of Linux is assumed, with some exposure to the commandline and packaging tools, although all commands will be given in full.

Time: 1 -2 days. You will be installing a base system and then adding the packages one by one tobuild a complete system. You will be editing configuration files and using the command line.

Page 5: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 5 Of 31

Chapter 1

1. Prepare your build environment.

Basically, decide whether you are going to build this in a virtual machine or on real hardware. I will bebuilding this in VirtualBox. If you are building on real hardware, then make sure that you know whatyour hardware is in case you need to install any additional drivers along the way eg wireless card,video adapter, processor etc... Your machine will need to be bootable from CD/DVD or USB and youwill most likely need to be able to connect to the Internet via Ethernet (at least until you install the WiFidrivers).

You can run VirtualBox in Windows or Linux. For Windows, grab the current installer direct from theirwebsite. For Linux, you should be able to install from your distributions repositories.

Depending upon your host system resources, allocate about 16GB for the virtual hard disk, 512MB-1GB RAM and 32MB-64MB video memory. You might want to enable 3D support and PAE if available.I will also be making use of shared folders so you might want to make sure you have the guestadditions ISO downloaded if using Linux.

2. Download the netinst ISO

Since the concept here is to recreate the look and feel of Xubuntu, we need to use the same versionof the core desktop environment, XFCE. in Xubuntu 14.04, that is XFCE 4.10. This is the currentstable release of XFCE, so it came as a surprise to find that the current stable version of Debian(Wheezy) only contains XFCE 4.8, especially as 4.10 has been out for 2 years. As a result, I am goingto have to build this system using the testing release of Debian (Jessie), but don't worry, it is actuallyas stable as most other distros!

Download Debian Jessie Netinst ISO:https://www.debian.org/devel/debian-installer/

And choose the Official Netinst release for i386 or amd64 as appropriate to your hardware.

If you are installing on real hardware, then burn the ISO to a CD or transfer it to a USB stick using atoll such as UNetbootin or Rufus (on Windows).

If using VirtualBox, select the ISO as the virtual CD drive source in the settings module.

Page 6: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 6 Of 31

3. Install Debian

Boot into the netinstall ISO and choose the standard text installer. You can follow most of the defaults,obviously configuring what you need in terms of language and keyboard settings. You will need tomake these changes though:

1. For VirtualBox select guided disc partitioning - take over entire disc, root and home on onepartition. For real hardware, I'll leave this up to you how you want to proceed.

2. *Deselect Debian Desktop Environment (I am deselecting this so that I can choose theprecise components that I want to)

3. *Select Print Server, Laptop and System Utilities4. Create a root and regular user account.5. At the login prompt, type your root and your root password.6. Then type poweroff to shutdown.7. Optionally, take a VirtualBox snapshot so you can go back to this point if things go pear-

shaped later.

This will take up 1.2GB of hard disk space (taken from du -h / command) and uses about 28MB ofRAM (taken from free -m command) whilst idling at the command prompt.

From now on I will list disk usage for each step along with optional extras so you can decide how 'fat'or 'lean' to create your system. Please note, these are usage estimations reported by apt prior toinstallation and are given here in the order that the packages are installed. They may vary on yoursystem, especially if you install a lot of packages that share dependencies (eg a lot of Gnomeapplications appear to take up a lot of space but share a large number of libraries so altogether maynot be such a large install).

4. Setup Display Server (Xorg) and Audio (PulseAudio)

Installing Xorg should be fairly painless, but you may need some proprietary drivers for best results. Ifyou just install the full Xorg package, you will have most of the open source drivers needed to get Xworking. More information on proprietary drivers can be found here.

According to the Debian notes on pulseaudio, you only need to install the package and it should justwork. However, you may need a bit more tweaking than that.

Remember to run these commands as root unless otherwise specified!1. Reboot machine and log in as root at the login prompt.2. apt-get update3. apt-get upgrade = 519KB as of 10 June 20144. apt-get install --no-install-recommends xserver-xorg-core xserver-xorg-input-all xserver-xorg-

video-fbdev xserver-xorg-video-vesa (xserver-xorg-video-[yourcard, can be intel, nouveau, orati]) = 8,672KB for a minimal set of packagesoptional:apt-get install xorg (for the full X package) = 41.5MB

5. apt-get install alsa = 3,653KB6. alsactl init

Page 7: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 7 Of 31

7. apt-get install pulseaudio = 37.6MBoptional:pavucontrol paman pasystray = 102MB

8. logout and login as user:pulseaudio -Daplay /usr/share/sounds/alsa/* orspeaker-test9. Check you can hear something!10. optional to test your xorg configuration:

apt-get install blackbox = 772KB (only installs 2 packages which will give you a rudimentarydesktop - blackbox and libbt0)startx

11. poweroff and take vm snapshot.

5. Install XFCE base system and Display/Login Manager

1. apt-get install xfce4 = 184MB2. apt-get install lightdm lightdm-gtk-greeter = 28.7MB3. dpkg-reconfigure lightdm4. shutdown -r now5. Reboot and you will see a basic lightdm login screen. You will need to type your username

and password (for now).6. Use the default XFCE panel configuration (for now).7. Shutdown using the XFCE menu (you can decide whether to save your sessions or not)8. Take vm snapshot.

Now that we have X and a basic desktop setup, du reports disk usage is up to 1.8GB and free reportswe are using 168MB of RAM whilst logged into the XFCE desktop with no applications running.

Page 8: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 8 Of 31

Chapter 2

If you have followed part 1 of this tutorial, you should have a minimal XFCE Debian Jessie installationwith working sound and login manager.

If you are building this in VirtualBox, you may want to install the VirtualBox Guest Additions at thisstage to enable full screen resolution, USB 2 support, shared folders and clipboard and seamlessmouse integration. Click here for a how to. Skip this if you are installing on real hardware.

Continue reading to complete the configuration...

6. Install Extra XFCE Packages

A quick look through the XFCE applications menu will tell you that you only have some basicapplications. Quite a number of additional packages need installing to get a fully functional systemakin to that offered by Xubuntu.

If you have had enough of apt-get on the command line, you may want to install Synaptic to cover offall the remaining package installations graphically. In my opinion this is 18.4MB well used:

apt-get install synaptic = 18.4MB

I would suggest installing all of the below packages, but I have listed the approx size in case youdecide to leave something out.

mousepad = 5,274KB (of course you can swap this for your favourite text editor) thunar-archive-plugin = 7,927KB xfce4-artwork = 10.4MB xfce4-power-manager = 2907KB xfce4-power-manager-plugins = 114KB xfce4-terminal = 4,640KB (or you can stick with Xterm or install your favorite terminal) xfce4-whiskermenu-plugin = 918KB

After installing all of the above, du reported 2.0G disk usage and free reported 184MB RAM usedwhilst running XFCE with the XFCE terminal open.

Page 9: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 9 Of 31

7. Xubuntu Theming

At this point, it would be prudent to take a look at the current Xubuntu theme:

And also to look at what the core components are (amongst others):

Plymouth - boot splash with custom xubuntu theme Lightdm - log-in/session manager with custom theme Light-locker - screensaver/screen lock GTK Theme - Greybird from Shimmer Project Icon Theme - Elementary-Darker from Shimmer Project, DMZ-White Cursors Network: Firefox, Thunderbird, Pidgin, XChat, Transmission Office: Abiword, Gnumeric, evince Multimedia: Parole, gmusicbrowser Graphics: GIMP, Ristretto, Screenshooter, Simple Scan Accessories: Catfish, File-roller, Bluetooth Manager, GParted Games: Gnome mines and Sudoku

I am going to outline how to install what is required to get the theme looking like Xubuntu. Theremaining packages are user choice, but I will offer a few lighter alternatives for those looking to keepthe install size down.

7.1 Desktop Theme

1. The Shimmer project Greybird GTK theme depends on the murrine GTK2 engine:a. Install gtk2-engines-murrine murrine-themes = 7533KBb. XFCE menu - Settings - Settings Manager...c. Appearance:

i. Style = Greybirdii. Icons = elementary-xubuntu-darkiii. Font = Droid Sans, 10

Enable anti-aliasingHinting = SlightSub-pixel order = RGB

d. Notifications:i. Theme = Greybirdii. Opacity = 84%

Page 10: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 10 Of 31

e. Window settingsi. Style = Greybirdii. Font = Droid Sans, 9, bold

f. Window Manager Tweaksi. Enable compositor

g. Desktopi. Background image = xfce-blue (we'll download the exact Xubuntu 14.04

wallpaper later)ii. Icon size = 48iii. Custom font size = 10

h. Workspaces = 2i. Power Manager:

i. Click on Run if promptedii. An icon will appear in the notification area

j. Panel:i. Display tab:

1. Row size = 24ii. Appearance tab:

1. Alpha = 80 (use system style)iii. Items tab (add/remove until you have these icons):

1. Whisker Menu2. Windows buttons (no handle)3. Separator (transparent/expand)4. Notification area (no frame) (icon size =20)5. Audio Mixer6. Separator (transparent)7. Clock (no frame) (custom format = %d %b, %H:%M)

iv. Remove panel 2

k. The cursor theme is from the DMZ Cursor set:i. Install dmz-cursor-theme = 3500KBii.Whisker Menu - All Settings Icon - Mouse and Touchpad

1. Theme = DMZ (White)iii. You'll need to log off to see the changes.

Page 11: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 11 Of 31

You are probably thinking that this doesn't look very much like Xubuntu! For a start the folder iconsare brown and not blue. This is because the default Greybird theme that ships with Debian is out ofdate. You will need to grab it off the Shimmer Project website:

1. Open a terminal2. su <enter root password>3. cd Downloads4. wget https://github.com/shimmerproject/Greybird/archive/master.zip5. unzip master.zip6. mv Greybird-master /usr/share/themes7. rm master.zip8. Now go back to XFCE Settings Manager and change the above styles to "Greybird-master"

(Appearance, Window Manager and Notifications)

Now get the icon set:

1. wget https://github.com/shimmerproject/elementary-xfce/archive/master.zip2. unzip master.zip3. cd elementary-xfce-master4. mv * /usr/share/icons5. rm /home/user/Downloads/master.zip6. Now go back and change the icon theme to "elementary Xfce darker"

And the wallpaper:

1. wget http://www.omgubuntu.co.uk/wp-content/uploads/2014/04/xubuntu-trusty.jpg2. mv xubuntu-trusty.jpg /usr/share/xfce4/backdrops/3. Now change the wallpaper accordingly4. If you want the wallpapers from the Xubuntu theme competition go to this website (after

installing a web browser and download the ones you want):https://wiki.ubuntu.com/Xubuntu/Roadmap/Specifications/Trusty/CommunityWallpapers/Winners

The Whisker Menu icon on Xubuntu is slightly darker than the default to tie in with the theme better:

1. Right-click on the Whisker Menu icon2. Select properties3. Click on the icon to change it4. Change the category to all icons and type dist in the search box5. Click on the distributor-logo icon to select it.

Page 12: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 12 Of 31

Here's the final look:

Page 13: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 13 Of 31

Chapter 3

If you’ve followed parts 1 and 2 in this series then you will have a fairly bare XFCE system that looksgreat - just like Xubuntu 14.04 in fact.

To complete the look, we need to also theme our log-in/session manager which is lightdm and getourselves a bootsplash. This requires getting our hand a bit dirtier with editing some config files.There's no programming needed though, so it's not too difficult.

7.2. Light Display Manager (lighdm)

Lightdm is incredibly versatile, but being light, has almost no graphical configuration tools and only afew command line tools. The best way to get it themed is to edit the config files which on Debian arefound at:

/etc/lightdm = the actual theme/greeter config files/usr/share/lightdm/lightdm.conf.d/ = system provided session settings

We only need to make a few rudimentary changes to the theme to get it to look like Xubuntu's log inscreen:

1. Log in as root or open Thunar with root privileges.2. Browse to /usr/share/lightdm/lightdm.conf.d and open the file 01_Debian.conf

a. You will now see why you don't get the username displayed by default in Debian dueto this line:greeter-hide-users=true

b. And this line tells us what the default greeter is:greeter-session=lightdm-greeter

3. We set our own configurations in /etc/lightdm and /etc/lightdm/lightdm.conf.da. Create the above directory /etc/lightdm/lightdm.conf.d as it doesn't currently existb. Using Thunar, right-click in the new, empty directory and select Create Document -

Empty Filec. Type in the filename 01_My.conf and then open it for editing

Page 14: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 14 Of 31

d. Type in the following lines:[SeatDefaults]greeter-session=lightdm-gtk-greetergreeter-hide-users=falsesession-wrapper=/etc/X11/Xsession

e. Save the file and reboot to see the changes or carry on to the next bit...

4. If you have rebooted, you will see that although you have a drop-down menu to choose theuser from the theme hasn't changed. We need to edit the actual greeter config file next:

a. Make a copy of /etc/lightdm/lightdm-gtk-greeter and rename the copy lightdm-gtk-greeter.bak (so you can restore it if anything goes wrong)

b. Edit the file lightdm-gtk-greeter and make these alterations:[greeter]background=/usr/share/xfce4/backdrops/xubuntu-trusty.jpgtheme-name=Greybird-mastericon-theme-name=elementary-xfce-darkerfont-name=Droid sans 10xft-antialias=truexft-dpi=96xft-hintstyle=slightxft-rgba=rgbshow-indicators=~session;~language;~a11y;~powershow-clock=trueclock-format=%d %b, %H:%Mkeyboard=onboard#position=screensaver-timeout=60

5. Reboot and you should get the default Xubuntu themed login screen.

In Xubuntu, the user's desktop wallpaper is automatically shown on the lightdm login screen,overriding the one specified in the config file. This is because Xubuntu have patched xfdesktop,something which is out of the scope of this how-to:https://bugs.launchpad.net/lightdm-gtk-greeter/+bug/1272426

7.3 Light-Locker

One of the things that lighdm can do for you is to handle switching users (by way of the dm-tool). Thedefault position on Debian is to use Xscreensaver for locking the screen and gdm-flexiserver forswitching users (just try to install the xfswitch plugin and you'll be amazed at the size of the install ~500MB). To get around this, lightdm prefers the use of light-locker. Rather than a screensaver assuch, light-locker is simple and light screen-locking utility. It will lock a user's session when switchinguser to provide added security. It is the default in Xubuntu 14.04.

As ever conservative, you won't find light-locker in the Jessie repos or even in Sid. To get it you willneed to enable the experimental repository, install it and then disable the repo. It might sound scary,but it is quite safe!

Page 15: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 15 Of 31

1. Either using Synpatic or manually with a text editor enable the Debian experimental repository:a. http://ftp.debian.org/debian experimental mainb. Reload repository informationc. Install light-locker = 370KBd. Disable the repoe. Reload againf. Remove xscreensaver xscreensaver-data = frees 3370KB

2. Edit the file /usr/bin/xflock4 as root. This file controls screen locking in XFCE. You just need toadd the command to use light-locker to lock the screen in case xscreensaver or gnome-screensaver are not available:# Lock by xscreensaver, gnome-screensaver or light-locker, if a respective daemon is running

for lock_cmd in \

"xscreensaver-command -lock" \

"gnome-screensaver-command --lock" \ <---- add this final forward slash

"light-locker-command -l" <---- add this command

do

$lock_cmd >/dev/null 2>&1 && exit

done

3. Finally, configure the Whisker Menu so that the icons for locking and user switching actuallywork:

a. Right-click on the Whisker Menu and choose Propertiesb. Click on the Behavior tabc. Lock command = light-locker-command -ld. Switch user command = dm-tool switch-to-greeter

(This is a command-line tool provided by lightdm. See dm-tool --help for more options)

7.4 Plymouth

Plymouth is the bootsplash application. Personally, I wouldn't bother using a bootsplash - boot timeswith a modern Linux are so quick now, you'd hardly have chance to see it. Plymouth can be a fiddlybeast to get working as well, however, in the interests of completeness, here is a quick how to:

1. Install Plymouth using apt or Synaptic:a. plymouth plymouth-drm plymouth-themes plymouth-x11 = 1,422KB

2. Grab a copy of my modified Xubuntu theme:a. wget https://github.com/RichJack/Xubuntu/raw/master/debian-logo.tar = 737KBb. tar -xf debian-logo.tarc. mv debian-logo /usr/share/plymouth/themesd. rm debian-logo.tar

3. This is identical to the Xubuntu theme, but without the Xubuntu logo4. Read this site before you begin:

https://wiki.debian.org/plymouthMake any alterations as required by the above link to /etc/initramfs-tools/modules

5. Edit \etc\default\grub as described6. Run update-grub2 in a root terminal7. Run plymouth-set-default-theme --list and check debian-logo is one of the options8. Run plymouth-set-default-theme debian-logo9. update-initramfs -u

Page 16: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 16 Of 31

10. Reboot and test the theme works!11. If it doesn't work, or you just see the white-blue progress bar, try this (definitely follow this if

you are using VirtualBox) (Taken from https://lists.debian.org/debian-user/2012/01/msg02060.html):

a. apt-get install v86db. modprobe uvesafbc. cat /sys/bus/platform/drivers/uvesafb/uvesafb.0/vbe_modes | sortd. Pick a mode from the output and add to the GRUB_CMDLINE_LINUX_DEFAULT in

/etc/default/grubeg:-nomodeset video=uvesafb:mode_option=1024x768-32,mtrr=3,scroll=ywrap

e. Then add the same resolution to GRUB_GFXMODEf. Edit /etc/initramfs-tools/modules to reflect your *chosen* resolution.

eg.:-echo "uvesafb mode_option=1024x768-32 mtrr=3 scroll=ywrap" >> /etc/initramfs-tools/modules

g. Then apply those changes:-echo FRAMEBUFFER=y > /etc/initramfs-tools/conf.d/splashupdate-initramfs -uupdate-grub2

12. Alternatively try the Joy theme for Debian branded boot up.

This site has an excellent tutorial on creating your own Plymouth themes.http://brej.org/blog/?p=158

Now you havecompletely themed your installation of Debian to look just like Xubuntu 14.04.

For the penultimate tutorial, I will discuss applications, sizes and which ones you can do without.

Page 17: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 17 Of 31

Chapter 4

If you have followed parts 1-3, you will have an almost duplicate of Xubuntu 14.04, at least in terms ofappearance, but your operating system will be sorely lacking graphical applications. So far I havemostly stuck to using the command line for downloading packages from the repositories via apt andelsewhere on the Net via wget, but it is probably time to get a web browser!

8. Applications

8.1 Web Browser

The default browser in Xubuntu is Mozilla Firefox. For reasons I won't go too much into here (but youcan read about here), Debian repackages and rebrands Firefox as Iceweasel. I can't say that I haveever spent much time with Iceweasel, but from what I understand it is 99% the same as Firefox,though some users have complained about compatibility with add-ons in Iceweasel.

To make matters more confusing, the version of Iceweasel you get depends on the repository you areusing. As of writing, the current release of Mozilla Firefox is 30.0. The versions of Iceweasel availableare:

Wheezy/stable = 24.6 Jessie/testing = 29.0.1 Sid/unstable = 30.0

So, if you are happy to install Iceweasel then go ahead and install via apt from whicheverrepository you are comfortable with. The current version in Jessie will take up approx 61.5 MB of harddisk space. Here are some alternative browsers and their relative sizes:

Mozilla Firefox = 78.9MB Chromium = 151MB Google Chrome (via Google's debian repository) = 183MB Opera (via Opera's debian repository) = 68.1MB Arora = 75.8MB Dillo = 2,755KB Epiphany = 206MB Midori = 63.7MB Qupzilla = 86.7MB

So as far as disk space is concerned, unless go for the ultra-light weight Dillo, IceWeasel or Firefoxare pretty competitive.

Page 18: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 18 Of 31

8.1.1 Installing Firefox on Debian

In any case, you just might prefer the real thing, so to install Firefox on Debian, follow theseinstructions.

1. Open a terminal and CD to your Download directory2. Since you don't have a web browser it isn't trivial to check the current version, but we can

attempt to download the latest using wget:wget -r -l1 --no-parent -A.tar.bz2https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US

3. Of course you can alter en-US for your country's UTF code eg en-GB.4. This will create a nested directory starting with ftp.mozilla.org but at the end you will have the

downloaded tarball.5. You can use Thunar to extract it or the command line:

cd ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US/dir (to find full file name)tar xjf firefox-[version].tar.bz2 = 78.9MB

6. Now as root move it to the /opt directory (the directory reserved for packages installed outsidethe distributions repositories):mv firefox /opt/firefox

7. You can now safely delete the nested directory and tarball:cd ~/Downloadsrm -r -d ftp.mozilla.org

8. Set up shortcuts:a. Create a symbolic link in /usr/bin so that it can be found by the system:

ln -s /opt/firefox/firefox /usr/bin/firefoxb. Test the link by typing firefox in the terminal and see if it launches.c. Create a .desktop file (launcher) so that it will be appear in the Whisker Menu. Use

Mousepad or Nano as root:[Desktop Entry]Type=ApplicationName=Firefox Web BrowserComment=Browse the World Wide WebGenericName=Web BrowserExec=/opt/firefox/firefoxPath=/opt/firefoxIcon=/opt/firefox/browser/icons/mozicon128.pngTerminal=falseStartupNotify=trueCategories=GNOME;GTK;Network;WebBrowser;

d. Save it in /usr/share/applications as firefox.desktope. It should magically appear in your Whisker Menu now under the Internet category.

Page 19: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 19 Of 31

8.2 Other Applications

I listed in part 2 the default applications in Xubuntu. Now you are in control of what you install, youcan leave ones out that you don't need, or replace others with lighter-weight varieties or your personalfavorites.

The table below lists initially the default application in Xubuntu and then alternatives. The entries inbold are the applications that I have installed on my test system and sizes given are approximatebased on the order of installation which is alphabetically. Remember many Gnome apps and KDEapps also install the back-end desktop environment libraries and so require a larger download andtake up more desk space. However, once installed, other similar apps may share libraries and thedownloads may be smaller:

APPLICATION XUBUNTU DEFAULT ALTERNATIVES

Word Processor abiword = 81.1MB

Ted = (+Libtff4 = 2520KB) = 10,021KB

https://github.com/RichJack/XubuntuFocuswriter = 35.4MB

Gwrite = 54.5MB

LibreOffice Writer = 367MB

Calligra Words = 407MB

WriteType = 130MB

GoogleDocs = 0MB!

Bluetooth GUI blueman = 46.6MB

Graphical File Search catfish = 2,583KB

gnome-search-tool = 3,695KB

recoll = 60.7MB

searchmonkey = 511KB

Keyboard Character Map

charactermap = gucharmap =

109MB (less if installed with

Abiword)

charmap.app = 47.5MB

PDF Viewer evince = 19.8MB

evince-gtk = 17.2MB

epdfview = install from wheezy = 617kb

xpdf = 4079KB

File archiver (zip/tar) file-roller = 219MBxarchiver is already installed and integrated into Thunar with

thunar-acrhive-plugin

Fonts fonts-liberation = 2178KB

Other fonts can be installed as req including:

ttf-mscorefonts-installer = ?

fonts-dejavu-extra = 6,701KB

fonts-opensymbol = 665KB

Adobe Flash Player

Flashplayer-mozilla = 3924KB

Install from http://www.deb-

multimedia.org

Gnash = 90.7MB (includes gstreamer plugins)

Google Chrome (flash built-in)

Gamesgames - gnome-mines (109MB),

gnome-sudoku (113MB)

Many of the gnome applications share dependencies. So if you

install abiword and gucharmap, then these will be minute

additions.

GUI for raising user gksu = 24.8MB

Page 20: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 20 Of 31

APPLICATION XUBUNTU DEFAULT ALTERNATIVES

privileges sudo = 2,608KB

Partition Editor gparted = 13.6MB

Painting Application gimp = 101MB

gnome-paint = 421KB

mtpaint = 1766KB

Krita = 466MB

imagemagick = 19.8MB

GUI for connecting to

remote filesystemsgigolo = 1071KB nautilus = 161MB

Music player gmusicbrowser = 4466KB

Audacious = 18.5MB

VLC = 124MB

rhythmbox = 192MB

banshee = 231MB

clementine = 81.6MB

exaile = 54.3MB

lxmusic = 2374KB

xmms2 = 1752KB

Amarok = 410MB

Calculator gnome-calculator = 111MB galculator = 1397KB

Audio/video plugins

gstreamer0.10-plugins-good,

gstreamer0.10-pulseaudio =

9,428KB

libdvdnav4 = 379KB

Non-free plugins: gstreamer0.10-plugins-bad, plugins-ugly =

78.1MB

libdvdcss2 (from http://download.videolan.org/debian/stable/) =87KB

gnome-codec-install = 45.3MB

Indicator appletsindicator-application, indicator-

sound = N/A

Use notification-panel-plugin and volume-mixer-plugin for

XFCE.

Libindicate?

GUI for changing system

language

language-selector-gnome (from

gnome-control-center) = 402MB

dpkg-reconfigure locales

Keyboard layout already included in XFCE Settings.

Screensaver GUI

light-locker-settings = N/A in

Debian

Grab it from Ubuntu = 779KB

XFCE Power Manager

Bug reporting lintian = 14.9MB

Applications menu GUI

editormenulibre = 2,757KB alacarte = 327KB

Personal Information

settings GUImugshot = 5,469KB

Network Manager System

tray applet

network-manager-gnome =

395MBWicd = 1,878KB

Onscreen Keyboard

onboard = N/A in Debian

Grab it from Ubuntu: requires

virtkey and onboard. = 4,598KB

(optional: onboard-data)

florence = 1711KB

(Use florence --no-gnome --focus in lightdm-gtk-greeter.conf)

Page 21: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 21 Of 31

APPLICATION XUBUNTU DEFAULT ALTERNATIVES

Media Player parole = 1151KB

Mplayer2 = 39.9MB

VLC = 124MB

XBMC = 120MB

Xine = 46.4MB

Totem = 275MB

Instant Messaging pidgin = 118MBemesene = 74.7MB

empathy = 360MB

Printer Support

xfprint4 - N/A in Jessie repos.

Can be installed from Wheezy =

8,121KB

System-config-printer = 38MB

Image/photo viewer ristretto = 1280KB

gthumb = 192MB

shotwell = 74.5 MB

digikam = 603MB

eom (eye of mate) = 24.3MB

geeqie = 89.4MB

Network utilities samba = 24.9MB Gadmin-samba = 25.8MB

Screenshot

xfce4-screenshooter = 3043KB

Configure custom keyboard

actions:

xfce4-screenshooter --fullscreen

= Print

xfce4-screenshooter --window =

SysRq

gnome-screenshot =1532MB

scrot = 940KB

Scanning simple-scan = 1714KB (x)sane (via GIMP) = 83.5MB

Software repository

management and apt

command line tools

apt-transport-https, python-

software-properties, software-

properties-common = 3,168KB

software-properties-gtk = 18.9MB

System soundssound-theme-freedesktop =

554KB

Spreadsheet gnumeric = 167MBLibreOffice Calc = 238MB

Google sheets = 0MB!

Email client

Thunderbird = N/A download from

Mozilla

(IceDove) = 57.7MB

Sylpheed = 13.4MB

Claws-mail = 19.9MB

Webmail = 0

Evolution = 214 MB

Bittorrent transmission = 5204KBbittorrent-gui = 32.1MB

bitstormlite = 229KB

Software Center Ubuntu Software Center = N/A

Synaptic – 18.7MB

gdebi = 2869KB (useful for manual installations of .deb

packages)

Page 22: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 22 Of 31

APPLICATION XUBUNTU DEFAULT ALTERNATIVES

Software update

notificationsupdate-manager = N/A

gnome-package-kit = 133MB

update manually

Users and groups GUIusers and groups (gnome-system-

tools) = 344 MBUse CLI

Disc Burning xfburn = 2628KBBrasero = 119MB

k3b = 332MB

IRC xchat = 7749KB xchat-gnome = 15.6MB

XFCE Additional

Plugins

thunar-media-tags-plugin =

629KBxfce4-goodies = 20.9MB

xfce4-dict = 1114KB

xfce4-notes + plugin = 2394KB

xfswitch. If install from Debian it

will be 505MB and install most of

gnome-shell!

No point as in Debian it isn’t

configured for light-locker

create a new panel launcher and point it to dm-tool switch-to-

greeter.

xfce4-task-manager = 808KB

9. Final Tweaks

One of the nice things about Xubuntu is that a lot of the system configuration applications show up inthe XFCE Settings Manager. You can do this too by editing as root the .desktop files (found at/usr/share/applications) for the relevant applications and adding the following:X-XfceSettingsManagerHidden=trueCategories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-[and then one ofthe following additional categories] PersonalSettings | HardwareSettings | SystemSettings

If you don't add one of the final settings categories then the application will be listed under 'other' inthe XFCE Settings Manager.Here are my recommendations:

About Me (mugshot) - PersonalSettings Audio Mixer - HardwareSettings Bluetooth Manager - HardwareSettings FlashPlayer - Other (no settings) GADMIN-SAMBA - SystemSettings GParted - HardwareSettings Light-Locker Settings - PersonalSettings Menu Editor - PersonalSettings Onboard Settings - SystemSettings Print Settings - Hardware Settings Settings Editor - SystemSettings Synaptic - SystemSettings Wicd – HardwareSettings

Page 23: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 23 Of 31

To prevent an icon from appearing altogether from the menu add:

NotShowIn=XFCE

For example, you might want to hide UXTerm and Xterm to leave just the XFCE Terminal visible.

Use the Preferred Applications tool to set the web browser and email client.

Finally, add your favourite applications in the Whisker Menu eg: Web browser Mail reader File Manager Word Processor Spreadsheet program IM Client Music/Media Player Software Center/Synaptic Terminal Emulator Help (create a launcher and point to https://wiki.debian.org/

Page 24: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 24 Of 31

TOTAL HARD DISK USAGE = 2.6GB

RAM USAGE AT XFCE DESKTOP WITH XFCE TERMINAL OPEN = 170MB*

---------------------------------------------------------------------------------------------------------------------------------------

TOTAL HARD DISK USAGE IN XUBUNTU (all updates applied/old kernels removed) = 2.9GB

RAM USAGE IN XUBUNTU WITH XFCE TERMINAL OPEN = 205MB*

*after a clean reboot.

Page 25: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 25 Of 31

Chapter 5

If you have followed the previous 4 parts to this tutorial then well done! You should have a niceXubuntu themed, XFCE installation on a Debian Testing (Jessie) base. Having gone to all this effort,you might want to now:

Backup your system in case something goes wrong share your system with friends/family make additional installations on different hardware.

I am going to provide some instructions on doing all of these things using some simple tools providedby the Refracta distribution that are licensed for use through the GPL.

10. Prepare your system

10.1 Set up the Skeleton directory

The Skeleton directory is found at /etc/skel and contains the files and directories that are copied into anew user's home directory when that new user account is created. It is the equivalent of the Windowsdefault user account. This is where you need to place any config files that determine the configurationof a user's session including:

Desktop icons Desktop environment configuration eg panel, desktop, window theme Application menu layout Bash and terminal settings Application specific customization

In our Xubuntu themed example, we want to make sure each new user account will look identical tothe one that we have worked so hard to set up. Here's how:

1. Clear all recent applications from the Whisker menu2. Log in as root3. Open Thunar and browse to your home folder4. Enable hidden files in Thunar from the view menu5. Copy these directories into the existing /etc/skel directory:

a. Desktop, Documents, Downloads, Music, Pictures, Public, Templates, Videob. Make sure the above directories are emptyc. Now create these hidden directories:

i. /etc/skel/.configii. /etc/skel/.localiii. /etc/skel/.local/share

d. And finally copy these directories into the hidden ones you've just created above:i. ~/.config/menusii. ~/.config/xfce4iii. ~/.config/Thunariv. ~/.config/users-dirs.dirsv. ~/.local/share/applicationsvi. ~/.local/share/mime

Page 26: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 26 Of 31

e. You can delete /etc/skel/.config/xfce4/xconf/xfce-perchannel-xml/i. Ristretto.xmlii. Thunar.xmliii. Xfce4-appfinder.xmliv. Xfce4-mixer.xmlv. Xfprint.xml

These directories contain the config files relating to the configurations you have made to XFCE totheme it like Xubuntu without containing any personal data.

10.2 Test the Skeleton and create a live session user account

1. To test the Skeleton directory is correctly set up, simply create a new user account. As youwill be creating a live ISO image of your installation later, you might as well make this the liveuser account, so use a simple username like "user" or "live" with an identical password.

2. Still logged in as root, open a terminal and type adduser followed by the username you wantto create eg:adduser userAdding user `user' ...Adding new group `user' (1002) ...Adding new user `user' (1001) with group `user' ...Creating home directory `/home/user' ...Copying files from `/etc/skel' ...Enter new UNIX password:Retype new UNIX password:passwd: password updated successfullyChanging the user information for testEnter the new value, or press ENTER for the defaultFull Name []: Live Session UserRoom Number []:Work Phone []:Home Phone []:Other []:Is the information correct? [Y/n] y

3. Make sure your root password is now straightforward as well eg change it to rootpasswd rootChanging password for root(current) UNIX password:Enter new UNIX password:Retype new UNIX password:passwd: password updated successfully

4. Log out and log in with your new user account and check that your theme has 'held'. Inparticular check the Whisker menu, check the file manager displays the home directorycorrectly. Check the icon and Window themes etc...

5. You might also want to copy the skel files into the root account so that the root desktop hasthe same appearance. Some distros prefer to keep the root account theme different - it's up toyou.

Page 27: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 27 Of 31

10.3 Download imaging tools from Refracta

1. Before you attempt to install the imaging tools, you will need to install some dependencies. Ifyou want to try the latest testing branch of the tools, then you will need to enable the sidrepository and install the following packages first:liblzo2-2libisoisolinuxsquashfs-toolsSyslinuxSyslinux-commonSyslinux-utilsSquashfs-tools

2. Install Yad for the GUI element of these tools to work:https://github.com/RichJack/Xubuntu/raw/master/yad_0.26.1-1~webupd8~trusty1_i386.deb

3. Then download the tools from here:http://distro.ibiblio.org/refracta/files/Testing/refractainstaller-base_9.1.0_all.debrefractainstaller-gui_9.1.0_all.debrefractasnapshot-base_9.1.2_all.debrefractasnapshot-gui_9.1.2_all.debrefracta2usb-0.9.6.deb (optional)

4. Install the tools using gdebi or dpkg.

5. Change the splash image at /usr/lib/refractasnapshot/iso/isolinux to the Xubuntu wallpaper(Copy this 640x480 png image):

Page 28: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 28 Of 31

10.4 Clean your system

1. Log back out and back in as root. Delete your original user account (after backing up anyinformation you think you need). In a terminal:deluser <yourusername>

2. Delete all files/directories that you don't want in the live system:a. Deleted user's home directories (if still there)b. Remove old log files:

rm /var/log/*.gzrm /var/log/*.oldrm /var/log/*/*.gz

c. Purge un-needed packages with apt-get autoremoved. Check in Synaptic under, Status/Residual Config and remove any packages there

that you know you won't need.e. Install bleachbit and run it under the user and then root account.

3. Remove any packages that you don't think a conventional user would need eg: bleachbit,gdebi...

4. If you have created this in VirtualBox, you may now wish to remove the VirtualBox guestadditions as they are not licensed under the GPL.

5. If you are thinking of distributing your ISO internationally, then you might want to considerremoving non-free software, drivers or codecs that are not freely distributable eg libdvdcss2,Adobe Flash Player...

6. Remember, real hardware might require real drivers eg Wifi, video drivers. If these aren'tinstalled on your system before you take the snapshot, they won't be available on the liveimage.

7. You will probably want to have Gparted installed so that the live system has a graphical wayof partitioning disks before installation.

8. Finally, remove your apt history with:rm -rf /var/log/apt/history.log /var/log/dpkg.logand your bash history with:rm –rf ~/.bash_history

Page 29: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 29 Of 31

11. Create a Live CD ISO

This bit is simple. All you need is about twice the hard disk space available as you have used space(in this instance 5GB of free space would be enough):

1. Log in as root.2. Select Refracta Snapshot from the Applications Menu.3. Accept the defaults, type in your ‘distro’ name and let it run.4. The ISO will be created at /home/Snapshots and will have a filename based on the date/time

(you can easily change this).5. I took a test snapshot of my Xubuntu/Debian installation and it was roughly 650MB in size, so

just fits nicely on a CD and took about 30 minutes to generate.6. If you created it in VirtualBox, use shared folders to transfer it back to the host system,

otherwise you can burn it straight to CD from your system or transfer it out using USB.7. You can then test the Snapshot in VirtualBox or on real hardware. You'll lose the boot splash

as the live CD uses Syslinux to boot rather than Plymouth, but everything else should be asyou configured it.

8. The Live CD can be installed using the Refracta Installer or transferred to a USB usingthe Refracta2USB application orUNetbootin on Linux or Windows.

9. As of current writing, the testing version of the Refracta installer doesn’t correctly alter theuser and root passwords, so after installation, you might find the passwords are still as theywere.

Page 30: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 30 Of 31

About the Author

I started my blog (http://linuxthemer.blogspot.com/) as a way of sharing some of the modifications Ihave made to my Linux setups in the hope of inspiring others and also learning from others andgaining a better understanding of 'themes' and good UI design.

I have been using Linux for over 10 years. My first forays were with a Knoppix live CD which I used torescue my files from an XP desktop after the motherboard failed. I dabled with the early variants ofUbuntu, SUSE, SLAX and Mandriva before settling on PCLinuxOS 0.93a which saved my fromWindows XP and finally converted me to Linux.

In the early, eager days, I dived head-first into it and had a few attempts at rolling my own distrorespins/remasters which were mildly successful, but after an initial release I found each time that theexpectations for improvement were such that it was taking me away from my family commitments andthey sadly went into the increasingly large pile of Linux Distros that never made it. (For completenessthey were PCFluxboxOS and ChameleonOS, the latter of which I was very proud indeed and at leastone distro I know of has copied my attempt to allow one-click changing of the complete desktoptheme).

Work took me back to Windows in the form of Windows 7 and 8 which is now my bread and butter,but I have recently re-discovered my love of Linux but how things have changed since. When I lastseriously used Linux, the community was in uproar about the state of KDE 4. Now KDE 4 isconsidered quite stable and elegant and the current furore surrounds Unity/Mir, Gnome 3/GTK 3.I suppose what goes around comes around and although I have tried and like aspects of all themodern desktop environments, I find myself more comfortable at least for now with what I know andlove - GTK2.

My early experiments were with Fluxbox, Openbox and LXDE, but I do like what XFCE have done(albeit slowly and surely) over the years and my current distro of choice is Xubuntu.

Rather than get carried away and have a third attempt a respinning a distro, I just thought I wouldshare my experiments on this blog so anyone can try them on any system as long as you are runningthe desktop environment that the instructions are written for.

I have always been fascinated with UI design and I love trying to mimic other OS designs within Linux.My first attempt was to try to recreate the ChromeOS/Chromebook look which is interesting on anumber of levels. The UI is clean and elegant, the taskbars are minimal and transparent andeverything is of course geared around the Google Chrome browser which gets better all the time. Ihave often toyed with the idea of getting a Chromebook, but I find it hard to justify as the storage isvery limited and you are completely reliant on Google or Chrome applications. So I thought it wouldbe an interesting experiment to recreate the experience in Xubuntu where I can try and work as if I amon a Chromebook, all the while having the bonus of the Ubuntu software center as a backup and asmuch HDD space as I desire.

Page 31: Xubuntu with a *pure* debian base from scratch

Xubuntu with a *pure* Debian Base (from scratch)

Page 31 Of 31

This is my second project for the blog and makes a move sideways from an Ubuntu base to a spureDebian base, whilst attempting to recreate the look and feel of the more polished Xubuntu. I hopesome other people have a go on their own boxes and share their thoughts with me.

Richjack

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.