Linux Blog

Packages you should install from the get-go

Filed under: General Linux,Linux Software,Quick Linux Tutorials — at 3:45 pm on Wednesday, December 28, 2011

When re-installing or performing a fresh installs of Linux, I’ve found that packages often disappear from default installations. These are the tools I install from the get-go. I’m sure there is more that I’m missing, next time I re-install I’ll update the list. Feel free to contribute your favorites to the list in the comments!

(Read on …)

Linux Tunneling Techniques

Filed under: Linux Software — at 4:59 am on Wednesday, November 10, 2010

Video completely unrelated.
Ever tunneled or used tunneling for mobile Internet? Perhaps you have needed to otherwise tunnel to bypass a restrictive firewall or for a secure channel on an insecure wireless network. It seems that everyone knows how to tunnel using the ssh socks support and how to use Firefox’s about:config screen to set it to use a socks and remote DNS. While this is great for occasional web browsing it only takes you so far.

tsocks is a great application to let you tunnel other programs over socks. Its easy to install on most distributions and allows you to use many command line applications. I’ve used it on a number of occasions successfully and while it does its job its not the the best solution. This is because it was last updated in 2002 and doesn’t perform DNS lookups. I found myself using it to SSH to an IP address (memorized, or looked up through another SSH session) and using applications on the remote server.

proxychains is a bit of a better tunneling solution, it works the similarly to tsocks but It also resolves DNS and can chain multiple proxies. I’ve used it on numerous occasions with great success. ssh, lynx, lftp, irssi and a whole bunch of others work without any problems. Another plus is it has also been updated in the last 5 years (but not by much.)

One application I haven’t yet had the pleasure of trying on the desktop is 3proxy. I have used it on the iPhone but ended up using the ssh socks method more often. From its yum description and feature list, it sounds very promising and one definitely worth looking into.

Speaking from experience I know its kind of difficult to browse your distributions web repositories to find the files you need and install them (I had to do this since I didn’t have them) so I recommend you download these applications and save yourself some time before you need them on the road.

Freemind Vs. Kdissert

Filed under: Linux Software — at 6:30 am on Wednesday, October 20, 2010

FreeMind vs kdissert

Mind mapping is a great way to get all of your thoughts out. There are two major competitors when it comes to mind mapping on Linux.

In the blue corner we have reigning champion FreeMind and in the red corner we have a new contender for the best mind mapping software kkkkkkkkkkkdissert.

FreeMind Vs kdissert…. Fight. (Read on …)

Yum Messed Up

Filed under: General Linux,Linux Software — at 10:05 am on Monday, November 16, 2009

So, this morning, when I got to work and booted up, I noticed something was wrong. My machine was not running as usual. It turns out, packagekit was sitting there being a general pain. I just wanted to look busy, so I killed the process. Turns out that wasn’t such a good idea, since it didn’t finish doing whatever it was doing and caused an ugly error like this:

rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30975)
error: cannot open Packages database in /var/lib/rpm
Error: rpmdb open failed
rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30975)

Naturally, I tried using rpm, do try and fix things, since it indicated something to do with a database I tried:

[owen@linuxblog ~]$ sudo rpm --justdb

rpm: –justdb may only be specified during package installation and erasure

[owen@linuxblog ~]$ sudo rpm --rebuilddb
rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30975)

Well, it turns out that those options don’t work, and the rebuilddb gave an error about the db4 being corrupt. Well, I decided to go into /var/lib/rpm as the other error had that directory and found the db4 files. Running db45_recover sounded like it might work, so I gave it a shot.

[owen@linuxblog rpm]$ db45_recover -h /var/lib/rpm/
db45_recover: unlink: /var/lib/rpm/__db.003: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.004: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.000: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.002: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.001: Permission denied
db45_recover: /var/lib/rpm/log.0000000001: log file unreadable: Permission denied
db45_recover: PANIC: Permission denied
db45_recover: DB_ENV->log_newfh: 1: DB_RUNRECOVERY: Fatal error, run database recovery
db45_recover: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery

That’s right,you need to be root for this bad boy:

[owen@linuxblog rpm]$ sudo db45_recover -h /var/lib/rpm/

The above seemed to fix it for now. I guess next time I’ll think about it more before I start slaying processes on a Monday morning.

Fedora 11 Upgrade from Alpha to Beta

Filed under: General Linux — at 10:56 am on Wednesday, April 1, 2009

After my mistake downloading the Alpha, I was able to update to the Beta by doing some pretty basic stuff.

First to aid I set up sudo, and changed my default run level to 3. I installed bash-completion (a mandatory package) and then changed to run level 3 with telinit. Once down to a reasonable run level for a systems upgrade, yum update -y was issued. I believe this failed, so I read the release notes and did the yum –skip-broken update command. It was rather scary since the broken libraries were glibc’s and those can be a pain. After a hour or more I was back to the prompt. Another yum update -y just to make sure and I was ready to reboot.

Rebooting actually worked first time and my Fedora was updated from 10.91 to 10.92. Using this method does not give you ext4 but, at least it will upgrade you to the latest Beta. Now, if only my production installation upgrades would have gone this smoothly.

Fix For Grub Problem After Fedora Update

Filed under: General Linux — at 10:06 am on Tuesday, February 24, 2009

After updating a Fedora installation a development server froze sitting there with GRUB on the screen at boot.
It had been like this all night after a successful upgrade earlier that day. yum update was run from a screen session and then connected to from home. What had caused the problem was the kernel and possibly grub had been updated. This caused the system to need a reboot, but after the reboot the drive map had changed.

Fortunately when I came in the next morning I had an e-mail with a link to this website: with a solution to the problem.

Here are the step by step instructions since they are not clearly lined out on the site:

1) Insert Fedora installation media
2) boot to rescue mode
3) choose language, skip network settings
4) once you are at a shell, type:
5) grub –device-map=/tmp/drivemap
6) quit
7) vi,pico or nano /tmp/drivemap and move sda and sdb around, or perhaps hda.
8) chroot /mnt/sysimage
9) I had checked that /tmp/drivemap had stayed the same by running cat /tmp/drivemap
10) grub –device-map=/tmp/drivemap
11) quit
12) grub-install
13) reboot

After grub gave its usual message I rebooted, removed the CD and everything worked as expected. Excellent. I’ve always used lilo over grub, but recently the distributions I’ve been using use grub and more importantly the servers I manage. Therefore I guess I better get more accustomed to grub. Luckily the server this went wrong on was a development server and nothing mission critical, so thankfully no one had to make the long haul into the data center to fix this issue at 1:00am. Hopefully you will be just as lucky if you run into this issue.

Linux CD Ripping Utilities

Filed under: Linux Software — at 12:33 am on Wednesday, January 21, 2009

CD Ripping with Linux doesn’t have to be the labor intensive task that it once was. No longer do we have the days of writing a hundred character command to rip a CD with the perfect options. Here are some utilities aimed at making your life of ripping your collection of CD’s to a digital format you can actually use.

First up for review is Grip. Grip is an gtk application that can play, rip and encode CD’s. It is really easy to use and is my CD ripping utility choice.

While the interface is not as pretty as it could be I guess its not hard to fool you that grip means business.

All you have to do to rip an entire CD is put it in, wait a couple of seconds and Bobs your uncle it found your track information from Next hop on over to the “Rip” tab and hit “Rip+Encode”. Since we didn’t select any tracks it should squawk and ask if you really wanted to try and rip no tracks, or if you just want to go ahead and rip the entire CD. I always hit entire CD and move along.

Before you get too excited and to a yum install grip and start ripping your entire collection keep in mind that you will have to install the dependencies (usually lame) and change the format under the “Config->Encode->Encoder” tab. This is not really a big deal and for your convenience grip will remember your settings. There are no sounds when a rip is finished (which can be frustrating either way,) but there it does eject your CDROM for you.

Goobox is next. Just as easy to install, just as easy to use and it’s also another gtk application. Goobox has a slightly more boring interface with less options. If your looking for a Gnome based CD ripper with a minimal interface this is the one to choose.

I think its about time for a KDE utility. KAudioCreator has an interface very similar to Goobox. You will first have to select an encoder from the “settings->encoder” tab. You can then pop a CD in and it works its magic just like the other CD rippers, well that is right after you hit the “Rip Selection” button which is the KDE gear.

Try them and let me know which one you like the best. GUI’s are nice but nothing can compare to a command line utility and this CD changing robot

sl the BOFH’s revenge for bad typists

Filed under: Linux Software — at 9:57 am on Wednesday, November 19, 2008

If you don’t know what BOFH is, then lets try wikipedia. This morning in my feed reader from was an article that “makes you pay attention.”

Basically, the article software package they were recommending today is sl. I couldn’t resist commenting on this. There are many times that I am stuck over a slow SSH session, all I need is the server admin, or BOFH coming along, installing sl and making my life a pain.

So, I installed it on my desktop. What an excellent piece of software. If you run Fedora its in the yum repos and you should give it a shot. Now, all I have to do is symlink this to other useful binaries that I commonly mistype, don’t have installed and for good operator measures, some that I do.

Its too bad that I couldn’t run this through wall, but I guess I could run it as a cron. I think it should have a config file so that you could work it a bit more. Perhaps as it steams through make the smoke spell a message. Any way, thats my ranting and rambling over for the morning. Now to yum remove.

Charting your boot processes with bootchart

Filed under: Linux Software,Quick Linux Tutorials — at 4:57 pm on Monday, September 22, 2008

Linux users often like to boast about their awesome bootup times. I thought that there was nothing cooler than getting a wicked fast bootup time, until now. A while back I found this nifty application called bootchart and shoved it in my bookmarks. I was randomly surfing my bookmarks, came across it again and gave it another shot. (Read on …)

Changing Window Manager on Fedora

Filed under: General Linux,Linux Software,Quick Linux Tutorials — at 8:34 am on Monday, August 18, 2008 was intended to be a blog where I could log my thoughts, findings and generally keep track of how to do stuff. Since it was started this is still the goal. Ultimately I’d like to refer to TheLinuxBlog on how to do something just as much as I refer to google for everything else. That being said, one thing that recently came up for me was “How do I change my desktop on Fedora”.

I had done this before but I couldn’t remember the command to do so. Well, since this blog is as much for me as it is for the reader I figure I can post the how to here and kill two birds out with one blog post, I mean stone.

The program I use to change my window manager on Fedora is: switchdesk.

Switchdesk can be installed by Yum or if you installed Fedora from DVD or CD and didn’t fine tune your packages then you probably have it already. All you have to do to run it is type:


Now, if you are in an X session you will get a nice graphical dialog that will help you change your desktop manager. If your at the terminal it will exit and ask you nicely to type either gnome, kde, xfce or any other window manager you may have installed.

Don’t ask me why every distribution has a different named command and interface to achieve the same thing thats just the way it is. Maybe one day I’ll get a list of all of the commands and post them. Alternatively if anyone wants to start a list feel free to post them in comments or by e-mail.

Adding a service in Fedora

Filed under: Shell Script Sundays — at 2:08 pm on Sunday, July 6, 2008

This week on Shell Script Sundays I’ll show you how to add a service to Fedora. This is very useful if you don’t happen to use yum for every service you want to run, and xinetd doesn’t really work for you.

Firstly there are three main parts to a Fedora service script. Start, Stop and Restart. They are pretty much self explanatory, but you don’t have to worry about the restart action since all it does is stop’s and then starts the service.

Without further ado here is the script:

# Fedora-Service Update notification daemon
# Author:
# chkconfig:    1000 50 50
# description:  This is a test Fedora Service \
#               Second line of the fedora service template.
# processname:  FedoraTemplate
start() {
echo "Starting Fedora-Service"
stop() {
echo "Stopping Fedora-Service"
restart() {
case "$1" in
echo $"Usage: $0 {start|stop|restart}"
exit 1
exit $RETVAL

Now that you have a template for the script, you will want to modify it for your service. You need to keep the header at the top. This is how the Fedora Knows about your service. The three numbers indicate what order the scripts should start up and shut down in. The first seems to be a identification number and the other two are the startup and shutdown order. These can be adjusted depending on when you want the service to start up.Once you are done modifying the script put the script in /etc/init.d/

To make sure it works you can call it with service using the following actions:

service start
service stop
service restart

If all of the actions work, you are ready to add the service to the system. If you use the setup command as root it seems to do this step for you, but if you just want to add the service quickly without bothering to scramble through configuration menu’s you can do the following:

chkconfig --add [script name]

If you want the service to start automatically at boot up you can use ntsysv. For more information read my post on Managing Services on Fedora