30. 05. 2013.

IceWM - Setting wallpaper

I saw that some people find it difficult to change wallpaper in IceWM. It is actually very simple. You can do that by:

1) Openin the desired photo in Feh, right-click and select File → Background → Set Tiled|Scaled|Centered|Filled. The problem with that is that after closing a session, wallpaper will be lost.

However, there are two more easy options (probably there are even some more):

2) Make Feh set a wallpaper on every session start. Read this post to see how to do that.

3) Copy a file /usr/share/icewm/preferences to ~/.icewm folder. Open it and at the very end (antepenultimate), you'll see:

#  Desktop background image
# DesktopBackgroundImage=""

Remove the crunch sign (#) and add a path to desired wallpaper image in quotes. Example:

#  Desktop background image
DesktopBackgroundImage="/home/hrvoje/.icewm/wallpaper.jpg"

After that restart the IceWM and it should work (it works for me).

25. 05. 2013.

IceWM - Toolbar launchers

To set up toolbar launchers, you have to edit (or create) toolbar file in ~/.icewm folder.

Syntax is this:
prog "tooltip name" /path/to/icon.ext command

Example:
prog "MOC Player" /home/hrvoje/.icons/AwOken/clear/128x128/apps/codeina.png xterm -e mocp ~
prog "PCManFM" /home/hrvoje/.icons/AwOken/clear/128x128/places/awoken/awokenclear/folder.png pcmanfm ~
prog "Leafpad" /home/hrvoje/.icons/AwOken/clear/128x128/apps/gedit.png leafpad
prog "LibreOffice Writer" /home/hrvoje/.icons/AwOken/clear/128x128/apps/libreoffice-writer.png libreoffice --writer
prog "Iceweasel" /home/hrvoje/.icons/AwOken/clear/128x128/apps/iceweasel.png iceweasel
prog "Skype" /home/hrvoje/.icons/AwOken/clear/128x128/apps/skype.png skype

24. 05. 2013.

Pasting a line from website into terminal - Very important security thing!

I already wrote you several command lines that perform some described actions. For someone who is lazy typing in terminal the whole command, it is great that he can just copy and paste that from my blog into his terminal and press the Enter key. However, copying things from a various websites and pasting them in terminal can be very dangerous. Reason for that is that by copying a text that you see, you can actually copy something completely different. Read more about it here.

My advice is to write commands by yourself, because not only your terminal won't get something you don't want, but also you'll learn BASH commands faster. The other option is to copy a text from a website into text editor and see if two texts really match. Of course, even if text match, it does not necessarily do what is described, so also be very careful with that!

Good luck!

IceWM - Startup commands

To tell your IceWM what commands should it run on startup, you have to edit (or create) startup file in ~/.icewm folder. On how to do that, see previous post.

It should actually be a BASH script, so in the first line, it has to have #!/bin/bash. Then you just put each command you want in the new line, followed by the & (except the last command).
I know it is not much understandable, but see this example:

#!/bin/bash
tilda &
sleep 1
numlockx &
sleep 1
xscreensaver &
sleep 2
checkgmail &
sleep 1
feh --bg-scale ~/.icewm/wallpaper.jpg &
sleep 1
setxkbmap -option grp:lwin_toggle hr,ru\(phonetic\) &
sleep 1
syndaemon -i 1 -d -t

This script tells IceWM to:
1. run Tilda (drop-down terminal)
2. wait one second
3. run NumLockX (turns on NumLock)
4. wait one second
5. run XScreenSaver (screen saver and power manager tool)
6. wait two second
7. run CheckGMail (GMail notifier)
8. wait one second
9. make Feh set a wallpaper.jpg image in ~/.icewm folder as a wallpaper (scaled)
10. wait one second
11. enable Croatian and Russian (phonetic) as a keyboard layouts and make left Win key switcher between them
12. wait one second
13. disable touchpad tapping and scrolling for one second after the last key is pressed via SynDaemon

For another example, if you wish only Skype and Dropbox to be started with the WM, your script should look like this:
#!/bin/bash
dropbox start -i &
skype

Now that you have your script, you have to make it executable in order to work. You can do that by entering in terminal:
chmod +x ~/.icewm/startup

IceWM - Keyboard shortcuts

You have to edit (or create) a file called keys in ~/.icewm folder.

You can do that by entering in terminal:
vim ~/.icewm/keys

You have to add a line for a keyboard shortcut in that file. Press key "i" on your keyboard to insert text.
Syntax is this: key "combination of keys" command.
For example:
key "Alt+F2" gmrun
key "Alt+w" leafpad
key "Alt+x" xterm
key "Alt+f" iceweasel
key "Alt+a" pcmanfm
key "Alt+c" chromium
key "Alt+s" skype
key "XF86AudioLowerVolume" amixer set Master 5%-
key "XF86AudioRaiseVolume" amixer set Master 5%+
key "XF86AudioMute" amixer set Master 0
key "XF86AudioPlay" mocp -G
key "XF86AudioStop" mocp -s
key "XF86AudioNext" mocp -f
key "XF86AudioPrev" mocp -r
key "Alt+Ctrl+l" xtrlock
key "Alt+Ctrl+p" xterm -e sudo pm-suspend
key "Alt+Ctrl+r" killall -SIGHUP icewm
key "Print" scrot

After adding all lines you want (you can, of course, change that file anytime later) press "esc" key on your keyboard and write :wq to save and exit from Vim editor.

Alternatively, you can create that file with any text editor (e.g. Leafpad), or write echo 'line with above syntax' >> ~/.icewm/keys, for example:

echo 'key "Alt+F2" gmrun' >>  ~/.icewm/keys

23. 05. 2013.

IceWM - Introduction

IceWM is very lightweight window manager and it looks very retro. However, it is highly customisable and you can make it look really nice. With a few tricks it also can be fully functional.

First you have to installing base things (which I wrote in previous post). Then you have to know something about IceWM. You can read about it here and here. To cut the long story short, he reads all configuration files from ~/.icewm (hidden - that's why the dot is in front of the name) directory in your home (represented by "~") folder. Those files contain the appearance of the IceWM, its menu, behavior, keyboard shortcuts and start applications or commands on startup.

I will write several posts about configuring those things in IceWM.

Here are some of my screenshots of IceWM:










MOC player on its own workspace

22. 05. 2013.

How to get a lightweight system - Base things to install

If you have older computer or you just want to have simple and lightweigh operating system, which will instantly respont to your action (e.g. while opening a instance of a program), but you want to have a fully featured system, just read this post and do as it says.

After installing system (the best option is to install minimal system) install these:

1. xorg and x-window-system - without this, you won't be able to start the X session.

2. Some window manager, like IceWM (icewm-experimental) or Openbox (openbox). You can find more about WMs here and here.

2a. If you install IceWM, install icewm-gnome-support - GNOME support files for IceWM.

2b. If you install Openbox, install tint2 - taskbar.

3. xscreensaver - the name says it all.

4. scrot - small screenshot taking script.

5. numlockx - if you want your NumLock to be activated with start of the OS, then install this.

6. xtrlock - a screen locker.

7. gmrun - a great thing to run things.

8. xosd-bin - displays notifications

9. pm-utils - set of utilities to make your system restart, halt, hibernate or suspend itself.

10. imagemagick - very usefull cli tool for image manipulation.

11. pcmanfm - file manager.

12. gtk-chtheme and lxappearance - GTK+ theme switcher.

13. xfburn - burning tool.

14. feh - great image viewer. You can also set your wallpaper with it.

15. xarchiver - simple GUI archiver. Also install rar, unrar, unzip, zip and p7zip-full.

16. tilda - drop-down (Quake-like) terminal.

17. network-manager-gnome - no explenation is needed, I guess.

18. checkgmail - GMail notification application (for those, who want that).

19. leafpad - simple and light text editor. Of course, if you want, there is always vim.

20. moc - the greatest audio player (run it with mocp).

21. alsa-base and alsa-utils - Advanced Linux Sound Architecture.

22. ffmpeg and mencoder - audio and video encoders, converters and streamers.

23. xbacklight - utility to control screen brightness.

24. xcompmgr - composition manager, if you want.

25. lm-sensors - utilities to read temperature, voltage and fan sensors.

26. flashplugin-nonfree - for watching flash videos in a browser.

27. mupdf - PDF viewer.

28. vlc - video player (and not only that). If you want something more lightweight, maybe you can try mplayer2.

29. volti - audio volume controler.

The rest is up to you. Here you can read about some lightweight programs for X.

If you're using Debian or some of its derivatives, you can install all these packages by typing this into terminal (xterm) (you will be then asked to type your password):

sudo aptitude install xorg x-window-system icewm-experimental icewm-gnome-support xscreensaver scrot numlockx xtrlock gmrun xosd-bin pm-utils imagemagick pcmanfm gtk-chtheme lxappearance feh xarchiver zip unzip rar unrar p7zip-full tilda network-manager-gnome checkgmail leafpad moc alsa-base alsa-utils ffmpeg mencoder xbacklight lm-sensors xcompmgr flashplugin-nonfree mupdf vlc volti


If you don't have aptitude installed, then type in terminal:

sudo apt-get install aptitude

19. 05. 2013.

Choosing a distribution

Maybe I should first write about choosing a distribution, and then about choosing a DE/WM, but it's all here, so no problem.
Choosing a right distribution is a bit harder. Be aware of the fact, that in the end, they all can look the same (depending on which DE/WM you use), but they won't behave the same (read about differences between distributions). If you're not used to any package manager, then it is actually all the same for you whether you'll have a DEB or RPM distro (but once you're used to some of them, it's not that easy to switch). If you're new to GNU/Linux world, I suggest to use binary-based distribution. That way the system will solve package dependencies during the install process for you and installation of everything will be easier. I also suggest you to use distro with good repositories. That way you'll have most (or all) things you need in the distribution repositories and that will also make your life easier. Community (forums, wikis, blogs, portals) about your distribution is also very important. If you come encounter some problem, it will be much easier to find a solution to solve it. Hardware compatibility is also very important. If you have a distribution which has drivers for all your computer's components, you won't have to search for them on the internet and install (usually compile) them by yourself. Some distros have better security updates than the others. Some are more stable than the others. That usually means that you have to choose whether you want to have more stable system with older package or (almost) latest packages with less stable system. Anyway, by choosing this or that you probably won't make that big mistake. Especially, if you choose some of these distributions:

Debian GNU/Linux - One of the oldest and the most derivated distribution. It is stable, secure, binary-based distribution with good repositories, community, hardware compatibility and architecture support. Read more about Debian and choosing which one to install in next post. Always a good choice!

Arch Linux - RPM based distribution with good repositories, community and hardware compatibility. It is a bit harder for installation and configuration, so maybe not the best choice for a newbie.

LMDE - Linux Mint Debian Edition. Very popular Debian derivative. It has it's own DEs, MATE nad Cinnamon. Maybe the easiest way to start with Linux.

OpenSUSE - Another one of the most popular (not without a reason) distribution. It has RPM package manager and comes with KDE as a default DE.

Fedora - A RedHat (RPM) distribution, comes with GNOME3 and tends to be bleeding edge.

Slackware - The oldest still existing distribution. Stable and good, has independent package manager, but it is only for those who want to get into the principles of working of the Linux. Definitively not for someone, who wants to have an easy life with his/her OS.

CrunchBang - Debian forge with Openbox.

ArchBang - Arch forge with Openbox.

There are many many other very good distros, but I haven't been experimenting much with distributions so I can't tell you much about it. Check the DistroWatch site and good luck in finding your distro!

Choosing a DE/WM

It is not that easy to choose which DE you want to use, or, alternatively, whether you want to use just a WM. If you're a beginner and don't want to mess with configuration via text files, use a DE.

Here goes the story about my journey to find the right option (so you can skip this part). Out of all that WMs and DEs mentioned in previous post, I tried all (and some more) except Ion. Now I'm using Openbox, and if it wasn't the case, I'd be using IceWM again. It is not, that I don't like DEs, but they're slow and they give you bunch of things you don't actually need. They eat your computer's resources just to look nice and modern. If you need that than go for it. I like performance better than the look. Out of all DEs I liked KDE3.5 the most, but unfortunatelly it is thing of the past now. There is a team that is still (maybe not anymore) maintaining KDE3.5 packages, called Trinity DE. I tried that too. I was so happy, but it's hard to keep it from upgrading to KDE4. When KDE3.5 died, I started to like GNOME2. At first I didn't like the appearance of it and was still using KDE(4) (ok, I was fascinated by the new look), but then I realised it can be better, faster, with less fan activity and even more customisable. So I started to use GNOME2 until GNOME3 came up. Gnome Shell looks nice, but it's too heavy and slow for me, plus I don't like that dash thing and also its panel and notification/systray area. Then, out of curiosity, I tried different WMs. I was using twm some time, and also I had IceWM installed. I didn't like the look and behaviour of it, but when I find out how to configure it, I realised how great it is! And really! I was using it for a quite a long time. Then I bought myself a new laptop (I was happy that I don't have to buy expensive computer full of high-tech components) and again I wanted to try some DE on it. I installed XFCE (had some experience with it earlier). I was surprised by how it developed into a really good DE. I wasn using it for a short period of time and then I switched back to WM. This time it was Openbox, which I'm still using.

Now a couple of suggestions. If you have a computer with low skills and you want a full DE, consider using Xfce. If you have a better computer and you're into modern look of your OS, then take a look on GNOME Shell, KDE4, Cinnamon or MATE. I don't want to tell that Xfce can't look great. It can!
As I already wrote, Cinnamon and MATE were developed for Linux Mint distribution and they are both forges of GNOME.

The best way to choose between DE is to see it in action and decide which one you like the most. You can do that in few ways.

1. Install them all into your system and during each login you can easily choose which DE you want to use for that session. That option is really good for experiencing work with several different DEs, but there is something I really don't like about it. As I already mentioned, each DE will install you its default file manager, terminal emulator, DM, WM, control panel, internet browser, instant messanger, music player, burning tool, video player and so on and so on. With more than one DE installed, you'll have many unnecessary programs.

2. Install one, try it, uninstall it with all of its components, install the other one, try it, uninstall it.... I've never tried that, but it should work.

3. Maybe your friend has a DE you want to try. Ask him to show you and let you try it!

4. Find screenshots and videos of desired DE on the internet. The simpliest way is to type it in Google, or even better, YouTube.

5. If you have more than one computer, you can install different DE on each of them.


If you want to have just a WM, then the best option is to install all which you want to try and try them. They will just install some libraries, but won't install any programs.

WMs are really lightweight (especially tiling ones), but for someone who used to do things by clicking they are harder to configurate. Of course you can use them just as they are installed, but then you won't have many nice things.
For the cunfiguration of some WMs, you'll have to wait my another post.

Desktop environments and window managers

As I wrote in previous post, now I'm going to write about desktop environments (DEs) and window managers (WMs).
When you install a linux distribution, it usually comes with some DE or WM by default. Some distros offer you to choose between several DEs, either that you download different image (later burnt on a CD/DVD or copied to a USB flash drive) from which you install chosen distribution, or during the installation (if image contains all those DEs). If that is not the case, then you can install any of these DEs or WMs from repository or source found on their websites.

Wait! What is DE and what is WM?

The WM stands for the window manager and it is system that controls geometry of your windows on a desktop. In other words, when you open a program, it manages position and size of it, showing you its decoration (border and that thing on the top with maximise, minimise, close, info, etc. buttons) and allowing you to move and resize it.
There is not just one WM and they are of different types:

Floating or stacking: Openbox, IceWM, Twm, Fluxbox, Enlightment, etc.
What are they all about? The windows are rendered one-by-one and one window can overlap the other. That's the most used window manager type.

Tiling: Awesome, dwm, Ion, etc.
In this type you windows don't overlap one another, but they're all placed in tiles. However, sizes and position of the tiles can be changed.

Compositing: Metacity (part of GNOME2), Mutter (part of GNOME3), KWin (part of KDE), Xfwm (part of XFCE), Compiz, etc.
They are usually part of DE. First the window is rendered, and then it image is composed on the screen. With that, you can than apply various visual effects on windows (transparency, shadow, wobbly windows, cube, etc.).

VirtualFvwmFwvm-crystalvtwm, etc.
They are actually floating window managers that are using virtual screens, so windows can go out of the screen.


The DE stands for the desktop environment. That is more complex thing than WM, because it contains not only WM, but usually also file manager, display manager, terminal emulator, default programs, libraries, themes, configuration tools, default daemons lunched at start.
Some of the most popular DEs are GNOME, KDE, Xfce, LXDE, Razor-qt, MATE and Cinnamon.

GNOME used to be light DE, but as the years went by GNOME2 is no longer officially developed and we're introduced the GNOME3 (aka GNOME Shell), whis is not light at all.
Default window manager for GNOME2 is Metacity, for GNOME3 it is Mutter. Default file manager is Nautilus, display manager is GDM, and terminal emulator is Gnome-terminal. It is written in GTK+ (C).

KDE is also not very light DE. It's default window manager is KWin and file manager Dolphin. It is written in Qt (C++) and comes with KDM display manager and Konsole as a terminal emulator.

Xfce is, say, light DE, although it also becomes higher and higher. It is now what GNOME2 used to be few years ago.
Xfce is, as GNOME, written in GTK+ (C) and, unlike GNOME, comes with LightDM and has Thunar as default file manager and Xfce4-terminal as terminal emulator.

LXDE really is light DE, but is somehow poorly maintained. It was written in GTK+, but it is migrating to Qt. Its default WM is Openbox, display manager is LXDM, terminal emulator is LXterminal, and file manager is PCManFM.

Razor-qt is lightweight Qt desktop environment.

MATE and Cinnamon are actually a GNOME2 and GNOME3 (respectively) forges used by Linux Mint distribution.

18. 05. 2013.

Differences between distributions

As there are hundreds of linux distributions, you can ask yourself: "Which one should I choose?". What are the differences between them?
First, the installer. Some distributions are easier to install (they have a graphical installer and all you do is clicking with your mouse), some harder. Some distributions have better hardware compatibility than others (sometimes you have to install or compile drivers afterwards). There is also difference in location of binaries, libraries, configuration files, etc. Different distributions have different package management system and software repositories (which is very important difference!). There are actually two types of package formats and more or less all distributions are based on either one or the other: .deb and .rpm. What is repository and why is it so important? It is storage of packages. Some distributions have their own repositories and some derivatives are using repositories of their "mother distro". Repositories are important, because better repository gives you more (free) software, better hardware compatibility and better security. Some distributions tend to be more stable, hence they're using older and better tested packages (like Debian, although this is not necessarily true, but I will write about it later), and some tend to use the most recent packages (like Fedora). Difference is also whether a distribution is source-based or binary-based. To cut long story short, in binary-based distros you install things easier but get worse performance, while in source-based (like Gentoo) distro installed packages are better suited for your hardware and needs, but it's more complicated to configure it. Difference connected with packages is also if distribution is rolling or standard release. In rolling release packages are continually updated. In standard release new version of pakage is installed over the old one. And last but not least, some distros have better community and support than others.
These are more or less all main differences not concerning the look. Different distros come with different (or without any) base confiturationsdesktop environment (DE) or windows manager (WM), configuration tools and so on. All that you can easily change, so it's not that important difference. I will write about that in next post.

Why GNU/Linux, part 2

Some started to use linux out of curiosity, some because they had enough of the restrictions of other OS they were using, some didn't have computer with performances to run some other OS smoothly, some wanted to have a stable system, to have it for free and so on.

It is well know that most (93,8 % in Nov 2012) of TOP500 supercomputers are running on Linux.

NASA recently migrated to Debian GNU/Linux on their International Space Station (read about it here). Why? As Keith Chuvala of United Space Alliance said, "(...)because we needed an operating system that was stable and reliable – one that would give us in-house control."
More and more municipalities (like Munich) and goverment agencies (like French National Gendarmerie) are also migrating to some of linux distributions. Why? Because that costs them a lot less money.

Why use GNU/Linux?

This is pretty much cliché theme, but I will tell you several reasons why I love GNU/Linux.
1. It is making your life soooo much easier, because it has terminal in which you can make lots of things, for which you have to click a thousand times and spent about half an hour in other OSs, with just one line and in short time.
2. It's stable!
3. It's free.
4. Its philosophy is good.
5. Its community is good.
6. It is highly customisable.
7. You don't have to spend money on high performance hardware.
8. It's pretty much safe (against viruses and similar threats).
9. It's good for programming.
10. There are many free and open source programs that you can use with it.
11. Things are usually working out-of-the-box.
There are probably more things, but I can't think of any right now...

Is there something I don't like about it?
Well... some products are less supported to work with Linux and if something is not working out-of-the-box, then it can be a problem sometimes. Usually there are some drivers or workaround on how to get it to work, but sometimes you don't get all features. That is something to be angry with manufacturer of a certain product, not with Linux and its developers (remember, its developers are usually not paid, and it's all about their good will and time to make all those things working). A huge THANKS to THEM!

Why this blog?

There are already many blogs, sites, forums about linux. Do we need another one? Probably not, but you never know. I just feel like writing about it, and that's why I'm doing it. If one day some of my (future) posts will be helpful to someone, I will be very glad. I'll be even more gladful, if someone will start using Linux!
Have a nice day.

Distributions and their derivatives

Here is a bigger list of Linux distributions, but it grows larger every day, it seems (but some distributions already "died").
http://en.wikipedia.org/wiki/List_of_Linux_distributions

It is interesting to see the "family tree":
http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg
(You can see the chronology of development and it's also clickable, so you can visit web pages of various distros.)

There is a site that follows distributions and rank them by popularity - DistroWatch.

Second post

Ok so I went out for a bit to chat with some fellows and now am back, ready for the second post. I added some useful and interesting pages about Linux, GNU, open source and free software, some forums, wiki...
I won't write about history of Linux kernel, GNU project, Debian and so on. You can read about that here:
www.kernel.org/linux.html
https://www.gnu.org/gnu/gnu-history.html
http://www.debian.org/intro/about
http://www.debian.org/doc/manuals/project-history/
http://en.wikipedia.org/wiki/Linux

It is important to know that Linux is actually "just" the kernel. One linux distribution is not just Linux, but also GNU, X, and many other components. That is why some distributions (like Debian) are called GNU/Linux.

There are many (hundreds of) distributions which are using Linux kernel. However, many of them are just derivatives of some other distribution. The most derivated (and one of the oldest) distributions are Debian (just some of popular deriatives: CrunchBangLMDE, SolusOSKnoppinx), Slackware (Zenwalk, Slax, ....), RedHat (Fedora). Derivatives can also have it's derivatives. Just for the example, Knoppix has Damn Small Linux (and others), Fedora has EduLinux, Moblin, and the list goes on and on and on...

I will write more about Linux distributions in other post(s).

17. 05. 2013.

First post

Hello everybody.
This is my first post here and the first post in general. Nevermind, I hope I'll find out what the blog is all about during some time. As the title itself says, it is a blog about so called Linux distributions. I won't write reviews of various distributions, I will write a bit about programs and more about setup of the distribution I am using - Debian GNU/Linux.
I think this is enough for the first post.