Saturday, February 12, 2011

Openbox random desktop wallpaper script

There are a lot of ways to change the desktop background of Openbox, but for this tutorial we are going to focus our thoughts on feh.

To set the background in Openbox, simply open a terminal and type the following command:

Code:
# feh --bg-scale /path/to/file.jpg

If you want to only use a single wallpaper for your desktop, the put this line in your autostart file:

Code:
# nano -w ~/.config/openbox/autostart.sh
# feh --bg-scale /path/to/file.jpg &

Remember the & at the end, very important!

Random wallpaper script
Let's take this one step further and take a look at a script that will randomly change the desktop wallpaper each time we log into Openbox.

Here is the script first:

Code:
#!/bin/sh 
WALLPAPERS="/path/to/folder/containing/wallpapers"
ALIST=( `ls -w1 /path/to/folder/containing/wallpapers` )
RANGE=${#ALIST[@]}
let "number = $RANDOM"
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last

feh --bg-scale $WALLPAPERS/${ALIST[$number]}

Name it something easy and save it, on my PC all my scripts (conky, wallpaper, etc.) is saved in the same folder (~/.scripts). Let's name it randomwall.sh.

Make it executable:

Code:
# chmod +x .scripts/randomwall.sh

Test the script by running it from a terminal:

Code:
# cd .scripts
# ./randomwall.sh

If all went well you should see the desktop background changing. On my machine the script complained about a file (.last) not being present in the wallpaper directory, so just create that file:

Code:
# cd /path/to/wallpaper/folder
# nano .last
ctrl+o to save the file
ctrl+x to exit

No need to write anything in it, just create it.
If everything is working as expected, simply add the script to your autostart file:

Code:
# nano -w .config/openbox/autostart.sh 

~/.scripts/randomwall.sh &

If you have problems with the script not being found, use the full path to the file:

Code:
/home/user/.scripts/randomwall.sh &

Log out and log back in, you should see a new wallpaper now!


Other alternatives
There are some scripts out there that allows you to change the desktop wallpaper with a menu click inside the Openbox right-click menu, if you want to try them out you can have a look here.

Wednesday, February 09, 2011

Autostart applications and services in Openbox

To autostart applications you need to have the following file:

Code:
~/.config/openbox/autostart.sh

Chances are good that it is not there so lets create it and put out startup applications in there:

Code:
# nano -w ~/.config/openbox/autostart.sh

In a previous post I described how to install dcompmgr and Avant Window Navigator, lets add this to the file to autotstart at next login:

Code:
#!/bin/sh
dcompmgr --gl &
avant-window-navigator &

Note the &, this is very important, without it the applications will not be started in the background and they will not run properly or at all.
dcompmgr has only a handful of options to choose from, you can view it by typing dcompmgr --help in a terminal.

Safe your work and exit, in nano:

Code:
ctrl+o to safe
ctrl+x to exit

Make the script executable:

Code:
# chmod +x ~/.config/openbox/autostart.sh

Log out and log in again, the services or applications should have automatically started.

If you find something not working, go over your commands again and make sure they are typed correctly, most of the time it is only a simple typo or the & that is left out.

Application Launcher for Openbox

If you log into Openbox for the first time you are greeted with nothing except a basic and generic right click Openbox menu. At least that is how it is in ArchLinux, also note that I have no other Desktop Environment or Window Manager installed...

The first thing I was looking for is an easy to use application launcher.

You can edit the Openbox menu yourself, or use something like obmenu to help you edit it, or even generate a menu with an app like MenuMaker. Great, but in my old age I'm looking for ease, for comfort, something that I can just click and there you have it, every single app and service available is listed.

This is where Avant Window Navigator comes in. What started out as me just looking for a neat Kde/Gnome like application launcher ended up bringing along a somewhat complete solution to my initial needs.

To install AWN you will need some composite manager to help out and bring out all the effects of AWN. I have tried quite a few and finally settled on dcompmgr.
Xompmngr and Cairo Composite Manager were very unstable and crashed when relocating tabs in Firefox, switching between some windows, etc.

The only time dcompmgr has let me down so far is when I play Steam games, but I'll come to that later.

  • Install your composite manager of choise.
    After you have it installed, start it from a terminal:

    Code:
    # dcompmgr
    

    Notice that I did not put the & to start it in the background, this way I can see what is wrong if it crashes and fix it. If we are happy later on that everything is working like it should, then we can run it in the background.

  • Now install Avant Window Navigator and Avant Window Manager extra applets.
    If you do a search in your package manager for Avant or AWN you will see all available packages for AWN, choose what you think you will need and install it.

    Start it from another terminal like we did with dcompmgr:

    Code:
    # avant-window-navigator
    

    If all goes well you should now see the standard AWN bar somewhere on your screen (middle top or middle bottom), go into the AWN settings and edit it to your hearts content.
    What I added to solve my application launcher problem is the "Yet Another Menu Applet".

    After adding the volume control, date and a few applications to the taskbar I ended up with this setup:

I'll get to the icon theme a bit later. But that is it, a functional "office friendly" application launcher, nice!


There are times when the composite manager will crash for some odd reason, like mentioned earlier dcompmgr crashes whenever I start Steam or play a Steam game. You can always start the composite manager from a terminal, but even if you open it in the background you need to have that terminal open at all times otherwise the program will stop.

The solution to this is to bind the composite manager to a key on the keyboard and then use this to start the composite manager whenever you need to. Painless and elegant.

Look for the post on binding key to see how to do it.

Openbox, the lazy way...

I have recently switched over to OpenBox because I just had enough of random KDE bugs, especially with regards to plasma eating 99% of the CPU, and so far I'm very, very pleased with the result.

For the uninitiated out there, there is one thing you have to remember is that people think you know everything to know about coding and scripting once you tackle a more "advanced" window manager, so be prepared for hours of frustration while trying to figure out the smallest detail. Take heart though, someone like you have gone through it before and is willing to share his knowledge.

To me the main problem with Fluxbox, Openbox and all the other *box window managers is that they are not geared for the person who has productivity as a high priority. As an office worker you do not have time to call up a terminal type out the command for OpenOffice Writer.
You want to browse a file in a file manager, click on it and let the rest just happen.

That is why, after this long silence, I'm going to blog my progress and what I did to make OpenBox as "office friendly" as one can get.
Each post will be a different feature to make it easy to follow and reproduce without reading stuff that doesn't concern you at that time.

Just a few notes before I get started:
I'm not going to handle the installation of all the various software. I'm using Arch Linux and have no idea what some of the software are named and how they are installed on other distros.
Use Google for that, if you want to know how to install Avant Window Navigator on Ubuntu then search for:
"Avant Window Navigator"+Ubuntu+install

This goes for all other software as well.

If you have questions, ask!
I will answer whatever problems you have, so fire away!

That is that. Enjoy!

Wednesday, August 13, 2008

Top 10 lists...

In general I hate these "top 10" lists, but this one I found today caught my eye since it is very practical, nothing fancy, just the "what you need" to get the most out of your everyday relaxation on Linux.

10 Essential Linux Applications for Daily Use

Mine is quite similar with only a few differences:
1. Music player - MP3Blaster
2.
Web browser - Firefox
3. CD/DVD burning application - K3B
4. Video player - Kaffeine
5. Image editor - Gimp
6. BitTorrent client - Ktorrent
7. IRC client - Xchat / irssi
8. Terminal application - Yakuake
9. Image viewer - Eye of GNOME
10. text editor - Nano

Basically the same, now go have some fun exploring your own favourites!

Thursday, August 07, 2008

Mozilla Firefox QT port!

LinuNow this has to be interresting! A qt port of Firefox!

I really do not like GTK so this is a huge blessing for me. Check out the site:
Not much to look at

And here is the WIKI for the Ubuntu freaks (strange that you would install a qt port on a GTK based distro...)

The people who use Gentoo and similar distros know what to do, just read through the wiki and apply what is needed.
I'll be hacking away at it in a few moments and hopefully there is some mayor improvements over the GTK version.

Wednesday, August 06, 2008

KDE 4.1 panels "hack"

We have all seen the KDE 4.1 task manager and the panels, and one of the hotest disputed topics, the fact that it lacks so much in being able to be customized. Luckily there is Plasma and plasmoids.

I'm pretty sure whatever you would like done, there will be a plasmoid for it, like multiple lines in the task manager?
Multirows in the task manager!

I'll keep on looking for some more of these goodies, but just a ray of hope, seems like plasma is going to be a great success for KDE 4, even saving the devs some face on the end of the day...

Sunday, July 20, 2008

E-sword

Linux and E-sword, what could one have asked for as a Christian than this great Bible program to work on Linux?!

I know I already covered it, but since last year allot has changed for the better, and now you can even install additions and modules directly into E-sword without using a Windows PC to first extract the modules, great!

There are alternatives, but none of them boast even remotely as large a library of collections and Bibles as E-sword. Allow me to copy from an Ubuntu forum post and shed some light on how to get this going in Linux:

Install Wine
Follow instruction below, choose your distro:

Code:
http://www.winehq.org/site/download

You could download the program and other addons here:

http://www.e-sword.net/downloads.html

Create "bottle" for Esword:

Code:
wineprefixcreate --prefix .wine_Esword
Install the program:

Make sure the setup798.exe is in you home folder. Otherwise, you should cd to the location first, for example "cd Desktop" if the setup797.exe is on your Desktop.

Code:
 env WINEPREFIX=~/.wine_Esword wine setup798.exe
Download msls31.dll to your ~/.wine_Esword/drive_c/windows/system32 from here:

http://www.dlldump.com

(Search msls31.dll and download it. If you download it somewhere else, you need to copy it to ~/.wine_Esword/drive_c/windows/system32)


Copy riched20.dll
from ~/.wine_Esword/drive_c/Program Files/e-Sword to ~/.wine_Esword/drive_c/windows/system32

Code:
 cp ~/.wine_Esword/drive_c/Program\ Files/e-Sword/riched20.dll ~/.wine_Esword/drive_c/windows/system32
Make sure all the above dlls in lower case. If they are in upper case, rename them to lower case.

In winecfg set riched20.dll and oleaut32.dll to native. IMPORTANT: Do not run winecfg from menu, as it would run default winecfg. Please use terminal to run winecfg for this bottle:

Code:
env WINEPREFIX=~/.wine_Esword winecfg
Press the Libraries tab > type riched20.dll > press add > press edit > choose Native (windows).
Do the same for oleaut32.dll.

Type:

Code:
 env WINEPREFIX=~/.wine_Esword wine "C:\Program Files\e-Sword\e-Sword.exe"
to run it. Or, you could use the launcher created on desktop.

To install addons, run in terminal:

Make sure the bbe.exe is in you home folder. Otherwise, you should cd to the location first, for example "cd Desktop" if the bbe.exe is on your Desktop.

Code:
 env WINEPREFIX=~/.wine_Esword wine bbe.exe
If it shows only blue screen, press [alt+tab] to switch to installation windows. You may need to press [alt+tab] again every time after you press next.

The above example is to install bbe.exe. You could install other addons using above overrides, just replace bbe.exe.


Change Icon on Launcher.
The launcher created already use e-Sword icon. But if you want to use other icon, follow below step:
Right click the launcher and choose properties.
After that click on the wine icon, it will open a windows.
Navigates to the icon file you want.
If the icon you want did not appear in the navigation windows, change the extension to png.
You could download and use attached 2 icons as well (original e-sword icons) if you like.


Add more fonts

To add more fonts, copy whatever fonts you have to ~/.wine_Esword/drive_c/windows/fonts.
If it still not appear in e-sword, it might be due to file permission problem. What you have to do is to open terminal (application>accesories>terminal), and then issue below command:

Code:
chmod 777 -R ~/.wine_Esword/drive_c/windows/fonts
The fonts should now available for E-sword to use.

Increase font size for E-sword menu
If you find e-Sword application font itself (ie. the font for "menu, edit, format, etc") is too small, what you can do is:

Open terminal (Application>Accesories>Terminal)
Open wine configuration editor from terminal:

Code:
 env WINEPREFIX=~/.wine_Esword winecfg
Click graphics tab.

At below, there is a screen resolution slider, the default is 96 dpi. Slide the slider to higher dpi. Be carefull though to use too big value as GlennW reported the winecfg become to big to fit to the screen when he use maximum value (120 dpi). Click apply and then ok.

Open your e-sword, if it is too big, you could repeat the above steps, adjusting the slider to whatever number (between 96 to 120).

Troubleshooting
If you encounter a weird problem, possibly there are some wine processes in the memory. To get rid of these processes, you could
1. reboot your computer,
or
2. kill wine related processes using system monitor:
From menu: system >> Sytem monitor >> click "processes" tab.
Kill all processes related to wine, including all exe processes.
or
3. Open terminal, and run below command (one at a time):
Code:
killall wine
killall wineserver
killall wine-preloader

With many thanks to the Ubuntu forums:
http://sudan.ubuntuforums.com/showthread.php?t=404042

Matrix incompatibilities

How true!
We need a nice big "Firefox" logo in the sky!

Monday, June 02, 2008

KDE 4.1!

I just came across a very interesting screencast hi-lighting the differences between KDE 4.0 and 4.1.
From what I have seen in the screencast it has really struck a cord with me, making me excited (at last) as to the direction the KDE team is taking with KDE 4.

Some features to note:

  • There is now much better support for plasma and plasmoids.
    It seems, from the cast, that there has been some mayor improvements in this department. I especially like the new plasmoid that lets you choose a few files to be placed on the Desktop, sort of a bookmark type view of short cuts to your data. Themeing plasma has also now been made easier with an own theme manager and on the whole it just looks like it might just work!
  • Seconds, they have given more attention to the taskbar/panel. Some of the biggest criticism was that you cannot configure it all, or the options is very limited. They have now addressed this and it seems like there are some more new features added to this. It's still not on par with KDE 3 and the massive amount of configuration you can throw at it, but it is moving ahead nicely. I predict that FULL customization is now only a matter of time, and as soon as they have the time I'm sure they will improve this even further.
  • It seems that kwin has also been revamped under the bonnet. One big flaw to the whole Compiz fad for me is that it renders your desktop useless for other GFX intensive tasks, like gaming. Try and game on a desktop that has Compiz enabled, it is impossible, so far. I hope they have at least tried and made the whole engine in kwin a bit more streamlined, it is stable, I have no doubt about that, but for gamers it is impractical. I have no idea how Vista handles it's eye candy, so maybe it is just possible to get around this?
    A thing that really bothered me was that transparency is only possible when you have Compiz enabled, and being a gamer I never had this enabled, short for a few test runs here and there. The whole "eye candy" argument and design of KDE 4 is heavily based on this, have they even given a thought to people who cannot use it because of said short comings??
On a whole I'm very excited and I'm sure you will be as well, here's looking to bright KDE future!

Sunday, June 01, 2008

Screen shot!

It has been a while since I last posted a screen shot, so here we go!

Nothing much has changed the last couple of months, except updating KDE and all the nice add-ons (yakuake, kbfx, etc.)

Clean:


Bussy:


Oh well, there you have it. It's been hard getting new and decent KDE 3.x themes since KDE 4 launched, but I'm still far more comfortable with KDE 3 and think I'll wait a couple of months till I try KDE 4 again...
:-)

Wednesday, May 28, 2008

Football humour

Found this very funny newspaper clip somewhere on the net:


Have a good one!

UEFA Champions League

Saturday, April 19, 2008

Here is something fun to do when you want to kill some time:



Have a blast!

Saturday, April 12, 2008

Hot Spot Nymph

Now with the ever popular Mustard Caddis out of the way, how about the next best fly since chocolate cake?

The fly almost all anglers in South Africa would have begun fishing the Vaalriver for the small mouth yellowfish for, will probably be the Hot Spot Nymph, or some variation of it, since it just works. This being a very simple fly you will be surprised just how often you use similar patterns for other flies.
This is a fly well worth mastering, and like said, the techniques used in this fly is reproduced on countless similar flies.

Category: SM Yellowfish

Imitates: Have no idea (Attractor fly)

The one I'm showing is the very basic, "down to earth" simple version that you would find on the shelf tied by all the major companies who sell flies. It is largely based on the PTN with only slight modification.
Michael (a friend) has a more advanced version on his site over here that I've also used with great success!

Hook - #12-16 Nymph hook
Thread - Brown 6/0
Weight - Optional brass, tungsten bead
Thorax - Orange dubbing (could also be yellow, green and even red)
Tail - Pheasant tail (center quill)
Extra - Copper wire


Step 1



Prepare your hook (#16) and tie in the copper wire.

Step 2



Tie in a few barbs (usually between 5-10, depending on the size of the hook) of pheasant tail to form the tail.

Step3


Move the thread all the way to the where the thorax should start, about 1/3 from the eye of the hook.

Step 4


Wind the rest of the barbs round the hook, making sure you take note of the direction you wind it. Tie it down and trim the extra.

Step 5


Now wind the copper wire in the opposite direction that you used for the barbs, reason being this will secure the structure of the fly and tie down the barbs more thoroughly. Tie it down and trim the extra bits.

Step 6



Tie in some more barbs, about 10 stands will do nicely to form the wing case.

Step 7



Spin a thin noodle of orange dubbing for the thorax.

Step 8



All done! Take care to leave some space just behind the eye of the hook to tie in the final materials.

Step 9



Bend over the barbs to form wing case and tie it off.


Step 10



Trim off all the excess and whip finish. Done!

Mustard Caddis

Okay, time for some fishing! Been a while since I last did a piece on fishing...

Here you will find some original patterns that work very well on our South African rivers, and I mostly target small mouth yellowfish (Labeobarbus Aeneus) and its close related cousins in the "yellowfish" group, the large mouth yellowfish (Labeobarbus Kimberleyensis)

As you will see when trying to do a bit of research on these fish, there is not much in the line of academic studies that has been done on them, however, there are some legends in the fishing community here that have dissected their lifestyle in order to understand what flies they will take...

Now on with the show:

This is probably one of the most useful flies and best taker on the Vaalriver, but at the same time it is almost impossible to give a tying sequence of this fly since there are so many variations out there, each angler with his own secret recipe to entice the fish!

What I'm trying to do with the flies I post is to make them as simple as possible, getting the novice to go "That doesn't seem hard at all!" and go buy a vice and start tying. Every single fly out there can be made very complicated with added bling, but I aim to keep it as simple as possible for the novice.

Once you mastered a fly you will find yourself changing it to your needs, so with that taken care of, lets begin?


Category: Smallmouth Yellowfish
Imitates: Allow me to quote someone:
"The Mustard Caddis is, I believe, a Horst Filter pattern. While imitations of caddis larvae are "ten a penny", what sets this one apart from the rest, and is undoubtedly one of its fish-catching secrets, is the colour." - Ian Couryer

Hook - #12-16 Scud hook
Thread - Brown 6/0
Weight - Optional brass, tungsten bead, lead wraps
Body - Mustard Chenille (small or medium)
Head/Thorax - Any dark coloured dubbing, in this case dark brown
Extra - Mono filament (0.20 mm at the thickest), Ginger Scud Back

Step 1


Prepare your hook and tie in the mono filament. Do this properly all along the length of the hook shank since the nature of the line makes it very easy to slip out, and since this holds your material in place, your whole fly will come undone. Give it a tug to see if it is tied in securely.
Most other people will use copper wire instead of the line, it's up to you. I have tied them both ways and had equal success on both, I just fancy the mono filament more. Use a line of suitable diameter to fit the hook size.

Step 2





Tie in the Scud Back and center it properly.

Step 3





Tie in the chenille. Strip the fibers from the tip of the chenille and tie down the bare, stripped piece. This will help in preventing a lump forming from overlapping chenille.

Step 4





In neat touching turns, wind the chenille tightly on the shank. We do not want a bulky, fat fly, so wind it nice and tight on the hook.

Step 5





Bring the Scud Back over and tie it down. Be careful, the Scud Back is made from elastic plastic, so make sure you tie it in properly or it will pull out. You will get it after a few practice turns! If you struggle to keep it in place then whip finish it into place once, that should hold it down.

Step 6





Wind the mono filament (copper wire) in the opposite direction to which you wound the chenille. This will tie it down nicely. Make sure to create neat little segments to imitate the segments on a caddis larvae. Tie the line down and trim excess.

Step 7





Spin a thin noodle of the dubbing for the collar and whip finish.

Step 8





All done!

Like I said in the beginning, this is as simple as it gets! Here is a secret weapon of mine, the body tied with dubbing!



Happy fishing!

Wednesday, February 20, 2008

KDE4 plasmoids

If you have been using KDE4 for some time (okay a month) then you would have noticed that the plasmoids that make up the core of KDE4 are still few and far between.

KDE Look have a section devoted to them, but there are only a handful. We expect that to change as KDE4 becomes more widely used.

A search on Google reveals nothing really useful either.

Now there is an answer that I really hope will catch on and work out. Some kind soul over at the Gentoo forums have compiled a plasmoid overlay for us Gentoo folk.
To quote the master:

There have been several questions, what the best way to install extra plasmoids for KDE4 is on IRC and in the KDE4 threads and therefore I decided to create an overlay that holds a collection of plasmoids to let portage install them.


In principal you find a site with some good plasmoids, you add it to the overlay (how to do that is explained in the post and asking there will get you an answer real quick.) This way we stay up to date with all plasmoids we can find on the web until they become more popular.

Simple, yea if you are using Gentoo! Anyway, head on over there, get the overlay and help spread the plasmoid goodness!

Friday, February 15, 2008

Free Gaming Blog!

For all you gaming freaks out there, it has also been a long while comming since I last did a proper game review, let me make up for this by giving you the following:
http://freegamer.blogspot.com/

They cover the latest releases, news and updates far better than I could ever have hoped to!

Have a read, download some of the more worthy titles and enjoy!

Tuesday, February 12, 2008

KDE 4

As we all know by now, KDE 4 has been released into the wild and we got our long awaited chance to pull it apart and break it.

Yes, I waited out KDE 4.0.0 (released 11 January 2008), installed it but has just a peak and went on waiting for the next release, and lo and behold! KDE 4.0.1 was released only weeks later (5 February 2008)!

Okay, let me blurt it out right here in the beginning, I do not like it....yet!

The plasmoids just don't do it for me, I have never been a fan of superkaramba and I don't see myself becoming one very quickly, but if they only made a few changes and gave us more configuration power, then it might not be so bad after all! But I'm getting ahead of myself, let's start at the beginning!



First thought after loading it?
Everything is so BIG! Almost like it was designed in Texas!

The very first thing most of us will do is try and configure the taskbar, only to find out you cannot! Odd...

Next you will notice you desktop icons having some weard border... So this must be the plasmoids everyone is talking about!



If you click on the default kicker you will notice that the menus are very weard and "funny to the feel", but luckily you can remove that default one and add another kicker right there on the desktop that behaves like the old one we used to use in KDE3, and this brings me to the next part.

You can add more widgets/plasmoids by clicking on the icon in the upper right hand corner. At present there are still very few of them on the net, but just keep your eyes on KDE Look, they will be coming in fast and furiously. Just popping in there now I saw one or two I would like to give a try...

Over here is just a very brief tutorial on how you can use the plasmoids to work for you, and this brings me to the next big gripe I have atm, the lack of customization!



If they allowed one to customize the plasmoids a bit, like removing that ugly border then it would not have been half as bad! The configuration options are very few and very far between for about everything and I just hope and pray that they really give heed to this and do something about it in the future releases!
I still believe the reason one chooses x over y is because you can configure it to your needs, and lets face it, stuff like Yakuake, Moodin, kbfx, Dekorator and the likes have made the configuration options of KDE 3.5 endless!

I understand that KDE4 is still in infancy, and therefore I have high, very high hopes that it will become the trend setter in the Desktop wars!

On to the positive, just look at this:


Yep, composite integrated into KDE. It works flawlessly, just a bit of a lag when playing serious 3D games like Quake Wars. Other than that, NICE! Hope they keep up with the main composite development and new effects and features gets added quickly!

Now for something bizarre, and if anyone know what to make of this, drop me a comment...



You can shrink your desktop by clicking on the upper right hand corner (there is a + and -), but you do not loose any work space? What is this all about? It reminds me somewhat of Windows 3.11 way back when.

I will keep on giving it a try and hopefully it will grow on me, but I must admit, E17 is staring to look kick butt good as well!

Stay tuned!

Meet the GIMP!

It has been a long time since I last posted anything, but to be honest, it has been a long time since I had real time to do so. Now after the holiday rush and "back-to-school" rush I can again shift behind the keyboard and explore a bit...

Lets kick this year off with a podcast I recently started frequenting... Meet the GIMP.

If you wondered how you would go about using the GIMP, then this is it!

It takes you through the easy steps of why you would need to use and manipulate images, to setting it up and getting down and dirty with editing (and in my case, destroying) images.

A must have link in your browser!