Category Archives: Linux

How to Download and Burn YouTube Videos on a DVD in Linux

This is a short tutorial on how to burn YouTube videos on a DVD. It might come in handy if you want to watch them on a big TV, or if you want to send them to friends. Or maybe you published them on YouTube for your small business, and you need to send a copy to a client. There are basically three steps: downloading, converting the video to MPEG format, and building the DVD image. All these steps can be accomplished in Linux with free open-source programs.

Downloading

An easy way to download is to use Video DownloadHelper Firefox extension. It is just a mater of starting the video in YouTube and saving it – always chose the highest quality version available when saving.

Video DownloadHelper Mozilla Extension

Video DownloadHelper Mozilla Extension

Converting videos to MPEG format

The main open-source programs for processing videos are FFmpeg and MEncoder. Both of them support a wide range of video formats. My preferred solution is FFmpeg, installed as sudo apt-get install ffmpeg on Ubuntu/Debian systems. I run it as follows:

$ ffmpeg -i input-video.flv -target ntsc-dvd -aspect 16:9 \
-vf "hqdn3d" output-video.mpeg

North American users would use ntsc-dvd, while in some other places pal-dvd would be more appropriate. hqdn3d is a high quality 3D denoiser, applied to the input video using -vf option. If the video has a logo, you can get rid of it using delogo filter:

$ ffmpeg -i input-video.flv -target ntsc-dvd -aspect 16:9 \
-vf "delogo=20:25:100:38:4, hqdn3d" output-video.mpeg

delogo filter takes a rectangular region in its parameters (x1:y1:x2:y2) and fills it up based on its surroundings. You can find a full list of filters available for FFmpeg here.

Sometimes you might want to process only a portion of the input video. You can extract it using -ss to specify the start time in seconds, and -t to specify the duration in seconds. For example to extract a video of 300 seconds in length starting from second 60, the command looks like this:

$ ffmpeg -sameq -ss 60 -t 300 -i input-video.flv output-video.mpeg

I also use FFmpeg for mp3 conversion:

$ ffmpeg -i input-video.flv -f mp3 -ab 192000 audiofile.mp3 

Building the DVD image

With all the videos converted to MPEG format, it is time to build a DVD filesystem structure and to create the ISO file. My preferred program in this case is DVDAuthor (sudo apt-get install dvdautor). The program generates the file and directory structure of the DVD video disc. It is a professional-grade DVD authoring solution for Linux and it is driven by XML configuration.

Start by moving all the .mpeg files in a new directory and I edit a text file dvd.xml:

<dvdauthor dest="DVD">
   <vmgm />
   <titleset>
     <titles>
       <video widescreen="nopanscan" />
       <pgc>
         <vob file="video1.mpeg" chapters="0,10:00,20:00,30:00"/>
       </pgc>
       <pgc>
         <vob file="video2.mpeg" chapters="0,10:00,20:00"/>
       </pgc>
     </titles>
   </titleset>
</dvdauthor>

Add alt the .mpeg files using <vob /> tag, you can also specify chapters for each one of them. The next step is to run DVDAutor tool on dvd.xml file and to generate the .iso file:

$ dvdauthor -x dvd.xml
$ mkisofs -V MYDVD -o mydvd.iso -dvd-video DVD

There are a number of GUI front-ends for DVDAuthor. I use them sometimes to create DVD menus. I particularly like DVDStyler (sudo apt-get install dvdstyler):

DVDStyler

DVDStyler

To verify the DVD image before burning it, I usually play it in VLC media player.

$ vlc mydvd.iso

Installing net-snmp MIBs on Ubuntu and Debian

Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks. net-snmp is the main SNMP implementation for Linux and BSD platforms. On Ubuntu or Debian net-snmp tools are installed as follows:

$ sudo apt-get install snmp

You can also install snmpd package. This package contains the SNMP agent.

Installing MIBs

For licensing reasons, net-snmp package installs only a small number of MIBs in /usr/share/mibs directory. A large number of standard MIBs can be installed using snmp-mibs-downloader package:

$ sudo apt-get install snmp-mibs-downloader
$ sudo download-mibs

To have the new MIBs recognized by net-snmp, edit /etc/snmp/snmp.conf file as follows:

$ cat /etc/snmp/snmp.conf
mibs +ALL
$

You can use snmptranslate to check the MIBs have been properly installed by printing the MIB tree:

$ snmptranslate -Tp
+--iso(1)
   |
   +--org(3)
      |
      +--dod(6)
         |
         +--internet(1)
            |
            +--directory(1)
            |
            +--mgmt(2)
            |  |
            |  +--mib-2(1)
            |     |
            |     +--system(1)
            |     |  |
            |     |  +-- -R-- String    sysDescr(1)
            |     |  |        Textual Convention: DisplayString
            |     |  |        Size: 0..255
...

Adding additional MIBs

To install additional MIBs you would need to create first a local ~/.snmp/mibs directory:

$ cd ~
$ mkdir -p .snmp/mibs

Drop any additional MIB files you might have in this directory. To install CISCO MIBs, download v2.tar.gz file from ftp://ftp.cisco.com (the file is located in pub/mibs/v2/). Move all the *.my files in the archive in ~/.snmp/mibs directory.

Ubuntu Desktop Memory Comparison

A new Ubuntu release is out, 13.04. As usual it comes in a number of different flavors, covering a wide range of hardware platforms. I am particularly interested in the favors available because my computer is a 6 years old dual-core AMD 64bit with 1GB of memory.

As the Internet stopped getting faster, two years ago I’ve decided not to upgrade it. I don’t “read” flash heavy sites, I guess nobody likes them anyway. For games, movies, and music what I have is more than enough. I do need to keep an eye on memory however. Lately, some developers started to throw into their software everything but the kitchen sink.

Unity

The main Ubuntu desktop environment is Unity. It is a great desktop for new users who aren’t especially computer savvy, and it requires lots of memory to run. As measured using free command after boot up, Unity runs in 437MB and it is visibly slow – definitely not a good choice for an old Widows XP computer!

KDE

With Unity out of the game, I am moving to KDE. It is packaged as an Ubuntu branch under the name Kubuntu. A download image is available for installation, or you can install it using apt-get on an existing Ubuntu computer:

sudo apt-get install kubuntu-desktop

Nice, elegant, and slow, it starts in 435MB of memory.

Ubuntu 13.04 KDE

Ubuntu 13.04 KDE

Gnome

Gnome joined the Ubuntu family earlier this year under the name Ubuntu GNOME. You can find more information here. I have installed it as follows:

sudo apt-get install ubuntu-gnome-desktop ubuntu-gnome-default-settings

It loads in 304MB of memory and it runs fine even on my old machine. It is not a traditional desktop, it doesn’t have a taskbar and a menu. For this reason many people don’t like it. As for me, it is time to move to a series of desktop environments generally characterized as lightweight.

Ubuntu 13.04 Gnome

Ubuntu 13.04 Gnome

Razor-qt

Razor-qt is described as “an advanced, easy-to-use, and fast desktop environment based on Qt technologies. It has been tailored for users who value simplicity, speed, and an intuitive interface. Unlike most desktop environments, Razor-qt also works fine with weak machines.” On my computer it runs very well in 288MB of memory.

Razor-qt is not in this moment an official Ubuntu branch. It is however fully supported, all you have to do is

sudo apt-get install razorqt
Razor-qt Desktop

Razor-qt Desktop

Xfce

Xfce desktop environment has been packaged as an Ubuntu flavor since 2006 under the name Xubuntu. It is low on resources and fast. On my computer it loads in 281MB. I have installed it as:

sudo apt-get install xubuntu-desktop

It is an excellent choice for an old computer. Arguably, most people going linghtweigth end up with Xfce.

Ubuntu 13.04 XFCE

Ubuntu 13.04 XFCE

LXDE

Another popular lightweight Ubuntu flavor is Lubuntu. It uses even less memory than Xubuntu, in my case 184MB. The desktop environment is LXDE. This is what I usually run on my computers.

sudo apt-get install lubuntu-desktop
Ubuntu 13.04 LXDE

Ubuntu 13.04 LXDE

Enlightenment

Enlightenment is a lean, fast, modular and very extensible desktop environment for X11 and Linux. It is classed as a “desktop shell” providing the things you need to operate your desktop or laptop. On my computer it runs in 182MB of memory, very close to LXDE.

It is not an official Ubuntu flavor yet. Fully supported in Ubuntu 13.04, this is how you can install the latest version (E17):

sudo apt-get install e17
E17 Desktop

E17 Desktop

MATE and Cinnamon

MATE is supported in Ubuntu 13.04, and it runs in 264MB of memory. It is installed from developer’s repository as follows:

sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu raring main"
sudo add-apt-repository "deb http://repo.mate-desktop.org/ubuntu raring main"
sudo add-apt-repository "deb http://mirror1.mate-desktop.org/ubuntu raring main"
sudo apt-get update
sudo apt-get install mate-archive-keyring
sudo apt-get update
sudo apt-get install mate-core

Starting with Ubuntu 13.04 release, Cinnamon is supported officially in Ubuntu repositories. It runs in 390MB. It is installed as follows:

sudo apt-get install cinnamon

Conclusion

Choice is the best Linux feature ever. Regardless of your circumstances, you can always find a Linux OS to fit that computer of yours. In this case I am looking at Ubuntu 13.04 and its flavors. Stable, mature, and free, Ubuntu is supported by a reputable software company and one of the best user and developer communities.

I have measured the memory using free command in a X terminal after boot up. The number includes everything running on the computer in that specific moment. This is the memory chart:

Ubuntu 13.04 Memory (MB)

Ubuntu 13.04 Memory (MB)


Related Posts

Ubuntu Cleanup

Lightweight Debian: LXDE Desktop From Scratch

In my neck of the woods the Internet doesn’t get any faster, and my six year old dual-core AMD computer still holds up nicely. I don’t like Gnome 3 and I don’t care about Ubuntu’s run everywhere there is lots of memory vision. Linux is all about choice, and I do have plenty of them.

In this article I’ll take a look at Debian. Debian is one of the oldest distributions still in active development. It is a popular distribution for personal use among software developers, it is also the most popular Linux web server platform. Debian has a great community and the amount of software packaged far exceeds any other Linux disto out there.

As usual I’ll keep an eye on memory. I’ll start with a basic server install, I’ll add X Window followed by LXDE desktop environment. What I am after is a picture like this:

openSUSE 12.3 Desktops Memory (MB)

openSUSE 12.3 Desktops Memory (MB)

Installation

Debian has a number of different branches you can chose from. Unstable has the latest and greatest software. The name is somehow unfortunate, I would say the software is more stable than what you can find in Fedora. Stable contains the latest officially released distribution of Debian. This is the production release. Testing branch contains packages that are in the queue to be accepted in the stable branch.

The testing branch (“wheezy”) is supposed to be released in the next few weeks. (Update 5/5/2013: Debian 7.0 “Wheezy” has just been released.) I will install it starting with a network install. The download page is here. I burn the iso image on a USB stick using dd command, but first I need to find out what device driver is handling it using hwinfo.

# hwinfo --disk --short
disk:                                                           
  /dev/sda             HDT722525DLAT80
  /dev/sdb             WDC WD800JB-00FM
  /dev/sdc             Generic USB SD Reader
  /dev/sdd             Generic USB CF Reader
  /dev/sde             Generic USB SM Reader
  /dev/sdf             Generic USB MS Reader
  /dev/sdg             Lexar USB Flash Drive

# dd if=debian-testing-amd64-netinst.iso of=/dev/sdg

The installation was highly uneventful. At some point it offered me the following software choices: Debian desktop environment, Web server, Print server, SQL database, DNS server, File server, Mail server, SSH server, Laptop, and Standard system utilities. I’ve enabled only SSH server and Standard system utilities, and half an hour later I was happily booting my new system.

Server

Logging in, I check ps ax. The command doesn’t show anything unusual started by default:

# ps ax
...
 1850 ?        Ss     0:00 /sbin/rpcbind -w
 1881 ?        Ss     0:00 /sbin/rpc.statd
 1895 ?        Ss     0:00 /usr/sbin/rpc.idmapd
 2160 ?        Sl     0:00 /usr/sbin/rsyslogd -c5
 2210 ?        Ss     0:00 /usr/sbin/atd
 2233 ?        Ss     0:00 /usr/sbin/acpid
 2304 ?        Ss     0:00 /usr/sbin/cron
 2531 ?        Ss     0:00 /usr/sbin/sshd
 2561 ?        Ss     0:00 /usr/sbin/exim4 -bd -q30m
 2588 tty1     Ss     0:00 /bin/login --        
 2589 tty2     Ss+    0:00 /sbin/getty 38400 tty2
 2590 tty3     Ss+    0:00 /sbin/getty 38400 tty3
 2591 tty4     Ss+    0:00 /sbin/getty 38400 tty4
 2592 tty5     Ss+    0:00 /sbin/getty 38400 tty5
 2593 tty6     Ss+    0:00 /sbin/getty 38400 tty6
...

rpc* are the standard NFS tools used for remote access of shared file systems across the network. In many setups the files served by the server are stored in a central location on a different machine. There is also a system logger (rsyslog) and the standard cron daemon. atd daemon allows you to run jobs queued for later execution, and acpid handles the power management of the system. There are 6 consoles handled by getty/login, you can switch between them using Alt-Fn keys. exim4 is your email agent.

As I’ve requested during installation, SSH server is started. By default it allows root login, and it needs some securing.

The server runs in 38MB of memory (I use free command to measure it). It is an excellent base to build a desktop.

X Window

Next step is to install the X Window environment. Debian uses apt-get to manage packages. There are other alternatives available, such as aptitude or synaptic. For now I will stick with apt-get.

# apt-get install xorg

Once installed, I start X Window environment with startx command. In an xterm I use free command to measure the memory: 55MB. Next step is to install LXDE.

LXDE

The command to install LXDE is as follows:

# apt-get install lxde

Unlike openSUSE, installing LXDE will modify the boot lever. Next reboot you will be directed to login into a display manager (lightdm). The desktop runs in this moment into 95MB of memory, slightly lower than openSUSE 12.3.

Debian wheezy LXDE desktop

Debian wheezy LXDE desktop

Installing Programs

Debian has over 30,000 packages to chose form. To search for packages use apt-cache search name command. Once a suitable package is located you can find more about it using apt-cache show package_name. Installing the package is done with sudo apt-get install package_name.

You will probably start with a web browser and mail client. In Debian the regular Mozilla programs are called Iceweasel and Icedove:

# sudo apt-get install iceweasel icedove

You can continue with some text editors, graphic editors, and LibreOffice suite:

# sudo apt-get install vim emacs gedit
# sudo apt-get install gimp inkscape
# sudo apt-get install libreoffice

Debian packages also lots of games.

For sound you can use either alsa or pulseaudio. My personal preference is pulseaudio since this is what vlc supports.

# sudo apt-get vlc libavcodec-extra-53
# sudo apt-get install pulseaudio paprefs pulseaudio-module-jack \
pavucontrol paman alsa-tools-gui
# sudo usermod -a -G pulse,pulse-access `whoami`

Reboot the computer for pulseaudio to kick in. It will add about 10MB to your memory footprint. And yes, it does have mp3 support.

Conclusion

While Debian isn’t exactly the friendliest distribution ever, it’s definitely the best choice to build a lightweight Linux desktop. It is a popular distribution with lots of support behind it, running today a great number of web servers and cloud machines. You might find it worth looking at running on your own system. And if something goes wrong during setup, you can always ask a question on the mailing list, or revert to a distro you know better.

To put things into perspective, I’ve also installed Debian Gnome 3 on this machines. Debian “wheezy” packages Gnome version 3.4. To my surprise, it loaded in 215MB of memory! Under Debian even Gnome 3 looks lean and mean as long as you don’t compare it with LXDE. A better comparison would be Ubuntu 13.4 Unity loading in 425MB or Fedora 18 LXDE spin loading in 220MB.

Here are the numbers:

Debian “wheezy” Memory (MB)

Debian “wheezy” Memory (MB)


Related Posts

A Memory Comparison of Light Linux Desktops – Part 1

A Memory Comparison of Light Linux Desktops – Part 2

Lightweight openSUSE: LXDE Desktop From Scratch

Lightweight openSUSE: LXDE Desktop From Scratch

openSUSE is a great distribution with a great community. It is well known for its excellent Gnome and KDE support. As such, it is never described as a lightweight distribution.

In the latest versions, openSUSE installation media started to offer support for lighter desktop environments, such as LXDE and XFCE. These environments have almost the same application selection as the Gnome version, under a much lighter memory footprint.

If you are looking for a lightweight distro, this is not the time to give up on openSUSE, especially if this is your favorite OS. Try the LXDE/XFCE environments, as lightness goes they are definitely in the same league with Lubuntu/Xubuntu and Fedora LXDE/XFCE Spins. You can do even better, if you build your own desktop starting from a regular server install and adding only the necessary desktop components.

In this article I will describe how to build a light LXDE desktop on the latest openSUSE 12.3 release. I will start with a server install, and I will go trough the process of adding an X Window server and LXDE desktop environment. It is not difficult, and at the very least, it is an opportunity to learn more about a Linux system.

The same way can be done with any other window manager. The result will be different, as each WM/DE has its own memory footprint.

Installation

I installed openSUSE on an old dual-core 64bit computer using the newtork install image. The network was detected automatically, and the install image gave me the following desktop choices: Gnome, KDE, XFCE, LXDE, Minimal X Window, and Minimal Server. I’ve selected Minimal Server and about half an hour later I was happily booting my new system.

Console Mode

First things first, I logged in with the user name/password created during installation and run free command. This told me the system is running in only 41MB of memory. It is definitely a server setup. Once X Window system and LXDE are started, the memory count will go up.

By default, networking subsystem is configured for Dynamic Host Configuration Protocol (DHCP). openSUSE uses dhcpcd daemon to retrieve the configuration from a DHCP server. This setup is probably the most common network setup deployed today, used as default by any operating system out there. If something goes wrong during boot and the DHCP exchange fails, you can restart it manually using rcnetwork restart command.

openSUSE also starts by default a Network Time Protocol (NTP) client. The client daemon keeps the computer time synchronized with a number of reference servers available on Internet.

Also started by default is systemd. This is a system and service manager for Linux, a replacement for the more traditional SysV and Linux Standard Base (LSB) init scripts. It provides very aggressive parallelization capabilities, as a result the system startup is fast.

systemd is still under heavy development and it is not as mature as the other options available. This is one of the main reasons some people are moving away from systemd-based distros such as openSUSE and Fedora to more traditional systems such as Debian.

Another process started by default is D-Bus. It is a message bus system, and it allows desktop applications to talk to one another. It is not clear why openSUSE would chose to run it by default in a server setup.

X Window

Next step is to install the X Window environment. openSUSE uses zypper to manage packages. It is very similar to yum and apt-get, the minor differences can be solved using the man page or –help program argument. To install X11, the command is:

# zypper install xorg-x11 xorg-x11-server

X11 is started using startx command. First time you run it, it will autodetect your hardware and it will autoconfigure your display. The autodetection is usually very good, in my case it detected my display and set it up for 1280×1024 at 60Hz – on a full LXDE desktop you can change it form System/Preferences/Monitor Settings.

Started as root with startx, the X server will complain about a missing window manager. The window manager is a separate component, its job is to open, close, move, minimize, and maximize windows. As I don’t have any window manager installed in this moment, the X server will clear my screen and it will open an xterm. From this xterm it is possible to open more windows and start programs directly from the command line (xterm, firefox, gimp etc.). However, window operations are not implemented, you are always stuck in the last window opened.

Time for a new memory measurement: 61MB reported by free command running in xterm under startx. Press Ctrl-Alt-Backspace to shut it down and return to console mode.

LXDE

Very little information can be found regarding installing LXDE on openSUSE. The best I can came up with is this blog article. I reproduce here the command without NetworkManager, as my network is already doing fine, thanks.

# zypper install lxappearance lxappearance-lang lxappearance-obconf \
lxcc lxde-common lxde-common-branding-openSUSE lxdm lxinput lxmenu-data \
lxmusic lxmusic-lang lxpanel lxpanel-lang lxrandr \
lxsession lxsession-edit lxshortcut lxtask lxterminal \
lxterminal-lang menu-cache mtpaint nuoveXT2-icon-theme \
obconf openal-soft openbox pcmanfm pcmanfm-lang

I create a file .xinitrc in root home directory as follows:

# echo "exec startlxde" > ~/.xinitrc

This file tells X Window server to start LXDE window manager once the xserver is running.

openSUSE 12.3 LXDE Desktop

openSUSE 12.3 LXDE Desktop

(more screenshots here)

Another way to start LXDE is to use a display manager such as xdm. It is started as root with xdm command. It will ask for a user name and password before starting LXDE environment.

In my LXDE terminal free command reports 103MB memory already in use. This is about half the RAM memory compared with major LXDE desktops such as Lubuntu and Fedora LXDE spin. It will also beat openSUSE default LXDE install by a wide margin.

Conclusion

openSUSE is not perceived as a lightweight distro, but you can still build a lightweight system using the regular server install and zypper package manager. And if anything goes wrong, you can revert to the default LXDE system provided in the installation phase. The magic command to install the default LXDE desktop is

# zypper install patterns-openSUSE-lxde

Just to put things into perspective, a full openSUSE 12.3 KDE install on the same computer starts in 344MB.

openSUSE 12.3 Desktops Memory (MB)

openSUSE 12.3 Memory (MB)

Related Posts

A Memory Comparison of Light Linux Desktops – Part 1

A Memory Comparison of Light Linux Desktops – Part 2

Window Mangers/Desktop Environment Blog Clicks

I think it would be interesting to share with you the click-trough stats for my WM/DE memory articles, as reported by wordpress.com. This is not a poll by any stretch of the imagination.

dwm.suckless.org 944
enlightenment.org 780
joewing.net/projects/jwm/ 322
awesome.naquadah.org 234
i3wm.org 220
blackboxwm.sourceforge.net 172
icewm.org 169
lxde.org 155
openbox.org 127
fluxbox.org 122
xfce.org 56
xmonad.org 53
all-day-breakfast.com/wm2/ 45
trinitydesktop.org 44
kde.org 29
razor-qt.org 24
windowmaker.org 19
cinnamon.linuxmint.com 18
mate-desktop.org 18
fvwm.org 8
afterstep.org 4
gnome.org/gnome-3/ 4
unity.ubuntu.com 3

Last update: April 26, 2013

A Memory Comparison of Light Linux Desktops – Part 2

In my previous article I’ve tried to investigate the RAM memory requirements for running some of the most common light window managers and desktop environments available in the Linux world. Prompted by a number of readers, I’ve decided to include also the big, well-known memory hogs that grab most of the Linux market, i.e. KDE, Unity and Gnome 3.

I am using the same setup, based on virtenv. It includes its own xserver (Xephyr) and a virtualization container (LXC). I use free command to measure the memory before and after the WM/DE is started. The computer is an older 64-bit machine, running Ubuntu 12.04 with LXDE as desktop environment.

I measure the WM/DE as it comes out of the box, with all the features the authors intended to be run as default. Arguably, this is not the best way to measure. All window managers are highly configurable, and users in general tend to personalize them. This adds more memory to whatever numbers I publish here.

Ratpoison

Lightning fast and stable, Ratpoison is a e tiling window manager for the X Window System. The major design goal of the project is to let the user manage application windows without using a mouse, hence the name.

On Ubuntu, install it as sudo apt-get install ratpoison and start it with ratpoison command. Be prepared to read the documentation. It runs in 1MB of RAM memory.

Ratpoison Window Manager

Ratpoison Window Manager

wm2

wm2 simply adds a frame to each window and attempts to look stylish. In the quest for being simple, fast, and small, wm2 does not support icons, menus, toolbars, panels and docking areas.

I have installed it on Ubuntu as apt-get install wm2, and started it as wm2. It runs in 0.7MB, this is the smallest WM I’ve tried so far.

wm2 Window Manager

wm2 Window Manager

FVWM

FVWM (Feeble Virtual Window Manager) is one of the most ancient window managers still in use today. It is a powerful and highly configurable environment for Unix-like systems. Some very popular window managers and desktop environments, such as Afterstep, Xfce, Enlightenment, are derived from FVWM.

FVWM Derivatives, (source Wikipedia)
(source Wikipedia)

I have installed it on Ubuntu as apt-get install fvwm, and started it as fvwm. It runs in 13MB of memory.

FVWM Window Manager

FVWM Window Manager

Window Maker

Window Maker window manager provides the users with a consistent, clean, and elegant desktop based on NeXTStep interface, which eventually evolved into Mac OS X.

Window Maker is again under active development after seven years without an official release. It is not available in Ubuntu software repositories, you can however install it from a PPA:

sudo add-apt-repository ppa:profzoom/wmaker
sudo apt-get update
sudo apt-get install wmaker

Start it as wmaker. It runs in 7MB of memory.

Window Maker Window Manager

Window Maker Window Manager

Razor-qt

Razor-qt is an advanced, easy-to-use, and fast desktop environment based on Qt technologies. It is a desktop for people who think KDE is bloated and suffers from over-engineering. It runs in 139MB of RAM memory.

Razor-qt is a new open-source project, and it is not officially supported by most Linux distributions. For Ubuntu users, the development team keeps a PPA up-to-date. The software works on any Ubuntu from version 9.10 onwards. Installation is as follows:

sudo add-apt-repository ppa:razor-qt
sudo apt-get update
sudo apt-get install razorqt

Start it as razor-session.

Razor-qt Desktop Environment

Razor-qt Desktop Environment

KDE

I’ve always liked KDE. Elegant and reasonably fast, it is an excellent desktop choice for people developing GUI software. In particular I like Kate text editor and KDiff3. Qt development tools are also well supported, but that was to be expected from a desktop based on Qt library.

I’ve installed kde-plasma-desktop packet from Ubuntu 12.04. The packet is described here as “the bare-minimum required”. I started it in console as openbox-kde-session. It runs in 201MB. On a real KDE desktop such as Kubuntu it will be much more.

KDE Desktop Environment

KDE Desktop Environment

Unity

Unity is the default desktop in Ubuntu. Ubuntu is what they recommend you to try when you move to Linux. It is friendly, functional, and geared towards “human beings”. Too bad it runs in 192MB of memory! It would be a good idea to trim it down, let’s say by 50%. As a note, DOS conquered the world by running in 64KB of memory.

Unity is installed as sudo apt-get install ubuntu-desktop. You can start it with unity command.

Unity Desktop Environment

Unity Desktop Environment

Gnome 3

Gnome 3 is an experimental desktop developed mostly by RedHat. Not all the functionality is ready (for example the taskbar and the menus are missing), and there are problems in the listening-to-your-users department. If you are looking for Gnome 2 functionality or something similar, check out Linux Mint website.

I’ve install Gnome 3 as sudo apt-get install gnome-shell and started it as gnome-session. It will burn trough 155MB of memory before painting anything on the screen.

Gnome 3 Desktop  Environment

Gnome 3 Desktop Environment

Trinity, Mate, Cinnamon

In a normal world, where development teams listen to users, this should never have happened. Not only these environments are smaller and faster, they actually do what desktop environments are supposed to do.

To install Trinity, follow the instructions from here. Start it as /opt/trinity/bin/startkde. It runs in 55MB of memory.

To install MATE, follow the instruction from here. Start it as mate-session. It runs in 42MB of memory.

I have installed Cinnamon as follows:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

I’ve started it as cinnamon. It runs in 79MB.

Trinity Desktop Environment

Trinity Desktop Environment

Conclusion

If you have some ancient hardware that you need to breathe new life into, or if you need to fit a distro on a modestly sized memory stick, the first thing you should look at is the window manager/desktop environment. Whatever your needs, Linux is much more than Gnome and KDE.

WM/DE Memory (MB)

WM/DE Memory (MB)

Links:

wm2, dwm, Ratpoison, JWM, i3, Blackbox, IceWM, Openbox, Window Maker, awesome, FVWM, Fluxbox, E17, LXDE, MATE, Trinity, XFCE, Cinnamon, Razor-qt, Gnome 3, Unity, KDE

Related Posts

A Memory Comparison of Light Linux Desktops – Part 1

Lightweight openSUSE: LXDE Desktop From Scratch

Lightweight Debian: LXDE Desktop From Scratch

A Memory Comparison of Light Linux Desktops

After I install a new version of Linux, I usually take a good look at the screen. Does it have a task bar? Can you find your window after it was minimized? Lately, some developers have been struck by some sort of amnesia brought on by the stress created by the mobile sector offerings.

Fortunately, in Linux we do have plenty of other choices. I will describe some of them in this article, and I’ll attempt to measure the RAM memory requirements. I use free command in an xterm before and after the graphic environment is started on a separate X server (Xephyr). The computer is an older 64-bit machine, running Ubuntu 12.04 with LXDE as desktop environment.

Note: the tool I use to set it all up is virtenv. It sets up a Xephyr xserver running Joe’s Window Manager in a Linux kernel container (LXC). I only have to shut down JWM, apt-get install the new window manager, and run it. The beauty is the container works in a separate filesystem, and it will not overwrite the real filesystem on my computer.

Joe’s Window Manager

JWM is a light-weight window manager for the X11 Window System. A small memory footprint makes it a good choice for older computers and less powerful systems. Barry Kauler’s excellent Puppy Linux is based on JWM.

You install it as sudo apt-get install jwm on Ubuntu, or as yum install jwm on Fedora. I takes about 3MB of memory to run.

JWM window manager

JWM window manager

*box

This is a series of three window managers. BlackBox is the original, Openbox and Fluxbox are forks.

BlackBox is comparable to JWM, and loads in about 3MB of memory.

Openbox is rarely used stand-alone, it is however the window manager of choice in a number of other desktop environments such as Gnome, KDE and LXDE. It runs in about 7MB of memory. CrunchBang is and example of distribution based on Openbox.

Fluxbox is popular in many Live CDs such as Knoppix STD and GParted. It is currently the default window manager of PCFluxboxOS, Linux Mint Fluxbox CE and Salix OS Fluxbox. It runs in 16MB of memory.

Install them on Ubuntu as sudo apt-get install blackbox openbox fluxbox, or yum install blackbox openbox fluxbox on Fedora.

Fluxbox window manager

Fluxbox window manager

Dynamic Window Managers

A dynamic/tiling window manager adjusts the size and position of the windows so there is no overlapping and no space lost between them. This is in sharp contrast with the normal window managers which float and overlap windows. The distinction is not as strict today as it used to be, most modern tiling window managers can easily float windows. Some examples are dwm (1MB RAM), i3 (3MB) and awesome (9MB).

Install them as sudo apt-get install awesome i3 dwm on Ubuntu, and as yum install awesome i3 dwm on Fedora.

awesome Window Manager

awesome Window Manager

E17

This is a beautiful desktop environment, the graphics just surpass everything else in this article. It is highly configurable and very fast. It runs in 35MB of memory in my tests.

Install it as sudo apt-get install e17 on Ubuntu, or as yum install e17 on Fedora.

E17 Desktop Environment

E17 Desktop Environment

LXDE

The Lightweight X11 Desktop Environment was specially designed for computers with low hardware specifications, such as netbooks, mobile devices (e.g. MIDs) or older computers. In my opinion this is the DE that had the most to gain from Gnome 3 debacle. You can get today full major distros based on LXDE, such as Lubuntu and Fedora LXDE Spin. Usable and slim, LXDE runs on my computer in 36MB of memory.

Install it on Ubuntu as sudo apt-get install lxde, or yum install lxde on Fedora.

LXDE Desktop Environment

LXDE Desktop Environment

Xfce

Xfce is a desktop environment based on GTK+ 2 toolkit. It aims to be fast and lightweight, while still being visually appealing and easy to use. Xubuntu and Fedora Xfce Spin are two of the distros featuring Xfce.

It runs in about 70MB of memory, which is a lot more than LXDE. Install it as sudo apt-get install xfce4 on Ubuntu, and yum groupinstall xfce on Fedora.

XFCE Desktop Environment

XFCE Desktop Environment

Conclusion

People use computers in different ways for different tasks. Window Managers and light Desktop Environments are sometime the only choice for less powerful systems or for places where every bit of memory counts (gamers, programmers etc.).

WM/DE Memory (MB)

WM/DE Memory (MB)

Links: wm2, dwm, Ratpoison, JWM, i3, Blackbox, IceWM, Openbox, Window Maker, awesome, FVWM, Fluxbox, E17, LXDE, MATE, Trinity, XFCE, Cinnamon, Razor-qt, Gnome 3, Unity, KDE

Related Posts

A Memory Comparison of Light Linux Desktops – Part 2

Lightweight openSUSE: LXDE Desktop From Scratch

Lightweight Debian: LXDE Desktop From Scratch

Ubuntu Cleanup

I’ve recently installed Ubuntu 12.04 Long Term Support (LTS). The main advantage of a LTS distribution is that once you clean it up, it stays like that for two years.

Unity

First step is to switch your desktop to LXDE, unless you like Unity or Gnome the Third. The recommended way is to install Lubuntu, in my case I will install LXDE on top of regular Unity. If you already have regular Ubuntu installed, it would be too much trouble to start downloading and installing everything. Also keep in mind that Lubuntu is not a LTS release, and the applications installed are different, for example Goolge Chromium instead of Mozilla Firefox, or Gnumeric instead of LibreOffice Calc. LXDE is such a small desktop component, it might be a better idea to chose your distro based on the applications it provides and switch the default desktop environment to LXDE.

$ sudo apt-get install lxde

Logout and login again, this time in a LXDE session and start cleaning up all the processes that don’t make sense. Here are some of them:

avahi

Avahi is a zeroconf implementation and a system for multicast DNS/DNS-SD service discovery. Its job is to assign an IP address on an interface (RFC 3927) if a DHCP server is not present on the network, or if a static address was not configured. It allows you to plug your laptop or computer into a network and instantly be able to view other people who you can chat with, find printers to print to or find files being shared. Right… the only reason I start my computer every day is to find files being shared on my local network!

The only way to disable avahi is to modify several configuration files in /etc directory as follows:

/etc/init/avahi-daemon.conf – add the word never below:

start on (never
	 and filesystem
	  and started dbus)
stop on stopping dbus

/etc/network/if-up.d/avahi-autoipd – add an exit 0 as soon as the script starts

#!/bin/sh
exit 0

/etc/network/if-up.d/avahi-daemon – add an exit 0 as soon as the script starts

#!/bin/sh
exit 0

Zeitgeist

Zeitgeist is a service which logs the users’s activities and events, anywhere from files opened to websites visited and conversations – for sure is not needed on my computer. However, they say Gnome3 and Unity cannot function without it – piece of garbage if you are to ask me!

Start by disabling the access to the database:

$ chmod -rw ~/.local/share/zeitgeist/activity.sqlite

Restart zeitgeist, it should fail miserably:

$ zeitgeist-daemon —-replace
[21:15:40.425853 WARNING] Could not access the database file.
Please check the permissions of file /home/user/.local/share/zeitgeist/activity.sqlite.

Purge all zeitgeist packages from the system:

$ dpkg -l |grep zeit
ii libzeitgeist-1.0-1 0.3.18-1ubuntu1 library to access Zeitgeist – shared library
ii python-zeitgeist 0.9.0-1ubuntu1 event logging framework – Python bindings
ii rhythmbox-plugin-zeitgeist 2.96-0ubuntu4.2 zeitgeist plugin for rhythmbox music player
ii zeitgeist 0.9.0-1ubuntu1 event logging framework
ii zeitgeist-core 0.9.0-1ubuntu1 event logging framework – engine
ii zeitgeist-datahub 0.8.2-1ubuntu2 event logging framework – passive logging daemon

$ sudo apt-get purge libzeitgeist-1.0-1 python-zeitgeist rhythmbox-plugin-zeitgeist zeitgeist zeitgeist-core zeitgeist-datahub

ubuntuone-syncd

Ubuntu One is a file syncing service similar to Dropbox. It takes a lot of RAM memory and generates a lot of traffic on the network. Even if you didn’t sign up for the service, the thing is still loaded and running. Get rid of it if you don’t really need it.

Do a dpkg -l | grep ubuntuone and purge all ubuntuone packages from the system.

$ sudo apt-get purge gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1 python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol rhythmbox-ubuntuone ubuntuone-client ubuntuone-client-gnome ubuntuone-control-panel ubuntuone-couch ubuntuone-installer

Also, remove the storage in the local directory:

$ rm -fr ~/.local/share/ubuntuone ~/.config/ubuntuone ~/.cache/ubuntuone/

Like all the other processes discussed here, ubuntuone-syncd will be gone after the next reboot.

whoopsie

This is Ubuntu error reporting daemon. It also takes a lot of RAM memory, and occasionally crashes trying to send reports to Canonical.

$ sudo apt-get purge whoopsie

cupsd

The good old UNIX printing service – if you are not using a printer, just remove it.

$ sudo apt-get purge cups

modem-manager

Probably my desktop weights more than 20lb, not to mention the monitor, the desk and the chair. It is not a mobile station, why should I run modem-manager? If there is a remote use case for something, you can depend on Canonical to enable it by default.

$ sudo apt-get purge modemmanager

bluetoothd

Looking through my process list with ps aux I run into bluetoothd. Unfortunately I don’t have one of those wireless keyboards/mouse and I don’t really care about synchronizing portables, so off it goes:

$ sudo apt-get purge gnome-bluetooth

You also need to edit /etc/modprobe.d/blacklist.conf and add a blacklist bluetooth at the end of the file

blacklist amd76x_edac
blacklist bluetooth

colord

colord is a system daemon that manages device color profiles, whatever that is… I mean it was… Just to help you make up your mind regarding removing colord, this is what the urban dictionary has to say about “I mean”:

Meaningless American use of the English language. Often reflective of a complete lack of content in what they are saying – people of average intellect, articulation and education will simply pause and think about what they are saying. Probably due to American television with programs such as “Clueless”, “Legally Blonde” and “the OC”, which depict successful people as not requiring any form of intelligence or decent command of the English language. In real life, these people look stupid, act stupid, and everyone thinks they are stupid. Typically, they fail intelligence tests.

You’ve been warned!

$ sudo apt-get purge colord

deja-dup-monitor

Déjà Dup is a very powerful backup tool included with Ubuntu. All things powerful consume memory and lots of CPU cycles. If you are like me and never do a backup, you can lose it.

$ sudo apt-get purge deja-dup

getty

getty process runs on text-mode consoles and waits for someone to log in. It then configures the tty device and spawns a login shell. In my Ubuntu box there are 6 of them waiting for a login that will never happen – as I said earlier, I am running LXDE. I would keep however two of them, just in case…

getty is controlled by tty*.conf files in /etc/init directory. Keep tty1.conf and tty2.conf in /etc/init and move tty3.conf, tty4.conf, tty5.conf and tty6.conf in some safe place outside /etc directory. In case you ever need them, you just move them back.

update-notifier

You definitely don’t need this. It will bug you daily to update your software while holding a lot of memory hostage and doing absolutely nothing. What’s next, a do-your-homework-notifier?

$ sudo apt-get purge update-notifier

You are the boss, so you do updates manually whenever you feel like it.

sudo apt-get update && sudo apt-get upgrade.

acpid

acpid deals with such events as closing a notebook lid, removing power supplies, phone jacks etc. It doesn’t make sense to run it on a desktop.

$ sudo apt-get purge acpid

Java

This is an ongoing security nightmare, this is how you get rid of it:

$ sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

Xapian

Another useless piece of functionality. You can find more about it here and here. The bug was opened a few years ago in Lubuntu, and it is still waiting for the “big guns” to decide what to do about it. Until they fix it, if they ever do, just

$ sudo apt-get purge apt-xapian-index

Conclusion

After years of running Gentoo and Fedora, switching to Ubuntu is shocking. The desktop is cluttered with Canonical branding and marketing software, it is comparably slower, and some people say it lacks privacy. It doesn’t have to be this way, you can always remove the annoying Canonical bits starting with Unity.

On my desktop – 64bit AMD dual core – once everything was removed, free command is reporting 159MB memory in use after startup. I can probably get 15MB less if I scrap NetworkManager and just start dhclient manually from /etc/rc.local.

The surprise is that a similarly pruned Fedora 17 system was starting at 210MB, quite a lot compared to Ubuntu. I would definitely recommend Ubuntu over Fedora any time. The only problem is that you have to clean it a little, as every existing obscure open-source functionality is started by default.

Related Posts

Ubuntu Desktop Memory Comparison