Prikazani su postovi s oznakom gnu. Prikaži sve postove
Prikazani su postovi s oznakom gnu. Prikaži sve postove

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.

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.

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.

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!

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.