Linux Blog

Linux Blog new year roundup

Filed under: The Linux Blog News — at 10:16 pm on Monday, December 31, 2007

I’d just like to say I’ve been busy over the past week or two with some projects at work and with the holiday season so I haven’t had the time to dedicated to this blog.

Its been a good year at the Linux Blog, I’ve increased traffic since I’ve started and have been beginning to see more activity with comments. I have a couple of goals for the upcoming year.

Firstly I’d like to make some money with Google ads. This isn’t specifically related to the Linux Blog but every little counts. I want to do this because I think that this site has some value to those that use it and I would like to be rewarded for my hard work.

Another goal I have is to write more posts than I did this year. It shouldn’t be hard to do since I stopped writing for a long time in 2007. From about Jan to July. I have a long list of posts to write but I need to know what topics people want to read about.

I have a list of articles to write for the Shell Scripting Sundays column but haven’t got enough ideas for the year yet. I may be able to get a few more if I split some of the more intense ones up but I’d rather keep them simple. If any one has any ideas for articles please let me know.

Thats going to be all for this year, I hope you enjoyed reading my blog and continue to visit me in the new year. For those that do

Happy New Year!

Package management on Slackware

Filed under: General Linux,Linux Software — at 6:38 am on Friday, December 21, 2007

People complain that Slackware is hard to use. I don’t believe that thats true. I don’t think that its any harder to use than any other Linux distribution. I also believe that there is perfection in simplicity. Believe me that it isn’t the easiest to set up but once its up it is actually easy to update and maintain once you learn how.

Despite popular believe Slackware does have good package management software. The main ones that come to mind are slapt-get, slackbuilds, pkgtools, swaret and slackpkg. Below is a small amount of information about each of them.

I’ve never myself used swaret so I don’t know too much about it other than its a package manager that manages dependencies. I also know that a new version will be released soon. If your interested in finding the best package management for Slackware you might want to check swaret out.

slapt is a mashup of the two words slack & apt. Those familiar with Debian or Ubuntu will know apt-get is at the heart of these systems, slapt-get is a clone of this system. Its been in Beta since its creation but works perfectly. There are graphical front ends for this software. I personally don’t use it because I can not find a fast repository in my area.

slackbuilds are kind of like the Gentoo package management. They are distributed with the source code on the Slackware DVD. They are basically scripts that help compile the source code. Its pretty easy to use, for more information visit:

pkgtools are the base of Slackware package management. Basically it is a suite of utilities that you can use to install, remove and upgrade software. The best source I’ve found for finding extra packages is

My favorite for updating Slackware is slackpkg. It uses pkgtools to install and remove packages. It comes on the Slackware CD’s / DVD’s in the extras folder and is pretty easy to use. Basically you install it, select a mirror from the config file and then run:

slackpkg update

Once its finished doing its thing you can then do:

slackpkg upgrade-all

This will start a fairly lengthy process of downloading and installing all of the new packages. Other options are available such as options to install new packages, remove packages revert to vanilla system and many more. One thing I have to caution on is updating to current. Its not as easy as upgrading from release X to slackware-current all the time. This is due to the different versions of GCC, glib, solibs and various other types of libraries. Always read the UPGRADE.TXT or at least have a back up of all of your critical data before attempting to upgrade.

There are a lot of options, if your interested in running Slackware I suggest you try them all and then use the one you like. If you don’t want to run Slackware because another distribution suits you better try not to use the “I don’t use Slackware because its hard to maintain” card.

General Linux Change Password

Filed under: General Linux,Linux Software,Quick Linux Tutorials — at 4:52 am on Thursday, December 20, 2007

Changing your password under Linux is a pretty simple task providing you know how to do it, and of course since we’re talking about Linux: changing your password is as simple or complicated as you want it to be either way. You either love GUI’s or you hate them, so one method or the other can be confusing. I’m more of a console guy, but I’ll start with the GUI methods because thats probably what I think the masses want to see first. Remember what your doing tho, if you need to change the password on more than one box, I would look into changing your password by command line.

There is more than one reason to change your password, the examples below assume that you are just changing the current users password because it needs to be changed.


kdepasswd example


linux change passwd

If you need to change the password for another user, log in as root and execute the following:

passwd (username)

linux change passwd

There are many ways to change your root password if you forgot it.

One way to do it is to boot up with a live CD, mount your hard drive, chroot and then execute the passwd command, once you reboot your password should be reset.

Linux Related Ads

Filed under: The Linux Blog News — at 8:31 pm on Monday, December 17, 2007

I’ve added some advertising to this blog to help offset the cost of running the server, I hope you guys don’t mind too much.

Every so often I see a banner ad for a product I once stumbled across on the net once. The product is Bomgar and they basically specialize in remote support appliances. I was interested in this product because they actually support major Linux distributions – now that is neat!

Basically in a nutshell your client goes to your website and clicks a button it installs temporary software on their computer and you get to support it, there are a ton more features that are in nifty flash animations on their site. Did I mention that it runs on major Linux distributions? That is a great feature in my opinion, they have support for SUSE, Ubuntu, Fedora and Red Hat. Impressive. If you currently support a Linux network this could be a great little box. Its a little pricey but in my opinion the cost may be worth it for the ability to easily support Linux boxes. I’d like to support a company that sees the need for enterprise Linux solutions.

I would like to see an open source solution that is similar to this but doesn’t have the price tag. If you know of one, let me know!

Graphical Shell Scripting

Filed under: Shell Script Sundays — at 4:07 pm on Sunday, December 16, 2007

From all of my other previous shell scripting articles you can see that shell scripting is a very good way to get a task done or to automate. This is great but some times a little bit of that three letter acronym “GUI” is a nice touch. Well my friends, if you’ve been reading my articles and following my dialog examples then you are in luck. If not don’t worry, you can view all of the articles in the Shell Script section to the right.

The program to make your GUI’s for your shell scripts is the exact same thing as dialog except its graphical. Its called Xdialog. Once installed you basically use it the same way as dialog. If your thinking about upgrading a script thats written in dialog you might want to think twice because some window managers will display the windows differently.

Check out these Xdialog examples and corresponding screenshots:

Xdialog -yesno "Do you like Xdialog?" 5 50 && echo "Thats nice" || echo "Yea, some times its better to stick to CLI"

Xdialog ExampleXdialog Example

Linux Christmas Gifts

Filed under: General Linux — at 1:43 pm on Saturday, December 15, 2007

With Christmas rapidly approaching time is running out to buy gifts for all of your family.

With this I post the question: “What are you getting for your Linux Geek for Christmas?”.

Gifts for Linux users are hard to find, luckily for you the reader I’ve compiled this handy list of Linux Swag (KEYWORD) that you can buy your Linux Geek.

1) Top choice is gadgets. Now they can vary in price so maybe you could team up with a couple of friends to afford something or get a gift card if your not exactly sure what to buy. USB Hard drives are great choices, if you know they already have drives check out the Linux Based NSLU2 from major big box stores. Its a great little box that your Linux geek will know exactly what to do with. If you’ve got a lot of money to spare a Fox Box (I haven’t posted about this yet) will be the perfect gift. Make sure you order now or you might not get it in time for christmas unless you live in Europe.

2) Clothing is a good gift. Get your Linux geek some nice clothes. T-Shirts are great choices here are some in order by taste: “Generic Linux Shirt“, “Arrogant Linux Elitist” or stuff from the Open Source and hack wear sections are my favorite.

3) When you need to get the job done some times Caffeine is essential. That link has a ton of products not only to give to Linux geeks but for Linux geeks to give.

Well, I hope this has given you some ideas on what to buy Linux geeks for Christmas :)

Linux ipconfig

Filed under: General Linux,Linux Software — at 7:32 am on Thursday, December 13, 2007

I’m both proud and annoyed that there is no Linux ipconfig command:

owen@linux-blog:~$ ipconfig
-bash: ipconfig: command not found

I’m proud to be different but it annoys me because I like to see standards between operating systems. Luckily the Linux ipconfig utility is easy to remember. On most Linux distributions it is ifconfig. I’m not exactly sure why its called ifconfig but I remember it as the word “if” or “InterFace”. If you try to execute the command from your shell you might get this error:

owen@linux-blog:~$ ifconfig
-bash: ifconfig: command not found

If this happens don’t be alarmed the problem is probably that you are logged into your regular user account and not root. To run as root I would use sudo, or su to switch to the root user and try again. There is a trick to get ifconfig to work with a regular user but no changes to the configuration will be able to be made. The path to ifconfig and trick success rate varies by distribution, some high security distributions will not let you do this trick:

owen@linux-blog:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:10:B5:70:B0:79
          inet addr:  Bcast:  Mask:
          RX packets:1609257 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1640883 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:236511428 (225.5 Mb)  TX bytes:422972120 (403.3 Mb)
          Interrupt:11 Base address:0xee00
lo        Link encap:Local Loopback
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:34516 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34516 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13210707 (12.5 Mb)  TX bytes:13210707 (12.5 Mb)

For an IPConfig that is a lot of data. If you know the interface that you want the data for, you can just specify the name with the command like so:

owen@linux-blog:~$ /sbin/ifconfig eth1

There is a lot more to this command then first meets the eye. I’ll go into detail about networking and the Linux ipconfig utility in another blog post. Thanks for reading, show me some love by leaving me a comment!

Linux Torrent Client

Filed under: General Linux,Linux Software — at 11:15 am on Wednesday, December 12, 2007

Every body these days knows what BitTorrent is. For those that don’t BitTorrent is a great way to download large files. Some times it is faster to download an ISO of a Linux distribution by torrent then by ftp or http. This is because bit torrent is Peer-to-Peer meaning that many people share the file rather than one bogged down server. If your interested in how BitTorrent works, check out WikiPedia’s BitTorrent Page

In order to download a .torrent file you need a client. Fortunately Linux users are in luck because there are a lot of Linux Torrent clients out there.

Every one has favorites, in this post I’m listing my favorite Linux Torrent Client, both graphical and command line based. If you know of a better client suited to download torrents please let me know!

My Favorite Linux Torrent Clients

My favorite graphical torrent client is actually a cross platform BitTorrent client. Many people will have already heard of this one as it is one of the most popular: Azureus
It has a really neat graphical interface that has a lot of features. The client can be skinned which means you can make it match your desktop if your into eye candy. For screenshots check the Azureus website and the google image search results for Azureus Linux screenshots.

Now don’t get me wrong I’m all about graphical interfaces. Computing as we know it today would not be the same if it was not for the user interface, but there are still great uses for shell applications. Primary development of a killer app doesn’t always start with a pretty interface. Which is why I bring up the next client that I really like. This is the Linux client by Bram Cohen. In Slackware the package can be installed with slackpkg or slapt-get. In Debian or Ubuntu with apt-get. The package has a couple of clients but the best one in my opinion is bittorrent-curses. Once installed all you have to do to start downloading is the following:


Many advanced options for the client are available check them out:

Usage: bittorrent-curses [OPTIONS] [TORRENTFILE]

arguments are –
–ip <arg>
ip to report to the tracker (has no effect unless you are on the same
local network as the tracker) (defaults to ”)

–forwarded_port <arg>
world-visible port number if it’s different from the one the client
listens on locally (defaults to 0)

–minport <arg>
minimum port to listen on, counts up if unavailable (defaults to

–maxport <arg>
maximum port to listen on (defaults to 6999)

–bind <arg>
ip to bind to locally (defaults to ”)

–display_interval <arg>
seconds between updates of displayed information (defaults to 0.5)

–rerequest_interval <arg>
minutes to wait between requesting more peers (defaults to 300)

–min_peers <arg>
minimum number of peers to not do rerequesting (defaults to 20)

–max_initiate <arg>
number of peers at which to stop initiating new connections (defaults
to 60)

–max_incomplete <arg>
max number of outgoing incomplete connections (defaults to 100)

–max_allow_in <arg>
maximum number of connections to allow, after this new incoming
connections will be immediately closed (defaults to 80)

–check_hashes, –no_check_hashes
whether to check hashes on disk (defaults to True)

–max_upload_rate <arg>
maximum kB/s to upload at, 0 means no limit (defaults to 20)

–min_uploads <arg>
the number of uploads to fill out to with extra optimistic unchokes
(defaults to 2)

–max_files_open <arg>
the maximum number of files in a multifile torrent to keep open at a
time, 0 means no limit. Used to avoid running out of file
descriptors. (defaults to 50)

–start_trackerless_client, –no_start_trackerless_client
Initialize a trackerless client. This must be enabled in order to
download trackerless torrents. (defaults to True)

–upnp, –no_upnp
Enable automatic port mapping (UPnP) (defaults to True)

–save_as <arg>
file name (for single-file torrents) or directory name (for batch
torrents) to save the torrent as, overriding the default name in the
torrent. See also –save_in (defaults to ”)

–max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on –max_upload_rate. The
automatic values are only sensible when running one torrent at a
time. (defaults to -1)

–save_in <arg>
local directory where the torrent contents will be saved. The file
(single-file torrents) or directory (batch torrents) will be created
under this directory using the default name specified in the .torrent
file. See also –save_as. (defaults to ”)

–responsefile <arg>
deprecated, do not use (defaults to ”)

–url <arg>
deprecated, do not use (defaults to ”)

–ask_for_save <arg>
whether or not to ask for a location to save downloaded files in
(defaults to 0)

–spew, –no_spew
whether to display diagnostic info to stdout (defaults to False)

–data_dir <arg>
directory under which variable data such as fastresume information
and GUI state is saved. Defaults to subdirectory ‘data’ of the
bittorrent config directory. (defaults to ”)

–filesystem_encoding <arg>
character encoding used on the local filesystem. If left empty,
autodetected. Autodetection doesn’t work under python versions older
than 2.3 (defaults to ”)

–language <arg>
ISO Language code to use: af, bg, ca, cs, da, de, el, en, es, es_MX,
fr, he, hu, is, it, ja, ko, nb_NO, nl, pl, pt, pt_BR, ro, ru, sk, sl,
sv, tr, vi, zh_CN, zh_TW (defaults to ”)

–keepalive_interval <arg>
number of seconds to pause between sending keepalives (defaults to

–download_slice_size <arg>
how many bytes to query for per request. (defaults to 16384)

–max_message_length <arg>
maximum length prefix encoding you’ll accept over the wire – larger
values get the connection dropped. (defaults to 8388608)

–socket_timeout <arg>
seconds to wait between closing sockets which nothing has been
received on (defaults to 300.0)

–timeout_check_interval <arg>
seconds to wait between checking if any connections have timed out
(defaults to 60.0)

–max_slice_length <arg>
maximum length slice to send to peers, close connection if a larger
request is received (defaults to 16384)

–max_rate_period <arg>
maximum time interval over which to estimate the current upload and
download rates (defaults to 20.0)

–max_rate_period_seedtime <arg>
maximum time interval over which to estimate the current seed rate
(defaults to 100.0)

–max_announce_retry_interval <arg>
maximum time to wait between retrying announces if they keep failing
(defaults to 1800)

–snub_time <arg>
seconds to wait for data to come in over a connection before assuming
it’s semi-permanently choked (defaults to 30.0)

–rarest_first_cutoff <arg>
number of downloads at which to switch from random to rarest first
(defaults to 4)

–upload_unit_size <arg>
how many bytes to write into network buffers at once. (defaults to

–retaliate_to_garbled_data, –no_retaliate_to_garbled_data
refuse further connections from addresses with broken or
intentionally hostile peers that send incorrect data (defaults to

–one_connection_per_ip, –no_one_connection_per_ip
do not connect to several peers that have the same IP address
(defaults to True)

–peer_socket_tos <arg>
if nonzero, set the TOS option for peer connections to this value
(defaults to 8)

–bad_libc_workaround, –no_bad_libc_workaround
enable workaround for a bug in BSD libc that makes file reads very
slow. (defaults to False)

–tracker_proxy <arg>
address of HTTP proxy to use for tracker connections (defaults to ”)

–close_with_rst <arg>
close connections with RST and avoid the TCP TIME_WAIT state
(defaults to 0)

–twisted <arg>
Use Twisted network libraries for network connections. 1 means use
twisted, 0 means do not use twisted, -1 means autodetect, and prefer
twisted (defaults to -1)

Checking your battery life from the shell

Filed under: General Linux,Linux Hardware,Quick Linux Tutorials — at 8:46 am on Tuesday, December 11, 2007

I’ve often thought to my self “Wouldn’t knowing how much battery life I had be nice.”

Now when a window manager is open, this isn’t a problem. But when your just in a terminal it can be a bit of a problem. If you don’t get the gist of it heres an example, if I’m just in a terminal writing an article, or programming in VIM on battery life. Now I no longer have to execute the following command and guess how much life I have left:

 cat /proc/acpi/battery/BAT1/state

I simply run the command:


It tells me all kinds of information about my power usage, what the current temperature is, am I plugged in, what CPU governor I’m using. Its a really neat tool. I would recommend for everyone to install it. Worst case scenario it can be used when the system is undergoing maintenance, or if you left your box sitting in the other room and need to check the battery live via SSH. Check out the screenshot:

YACPI Screenshot

To install it it will vary by distribution. I’m sure Debian has it in its XXXX number of packages which means Ubuntu probably has it too. To install on other distributions such as Gentoo or Slackware you’ll need the source. You can acquire the source from here:
You’ll also need libacpi which can be found here:
Make sure you compile libacpi first, or the make will fail for yacpi.

That’s it, once you download the package and install or download and compile the source you’re good to go. Have a good time checking the battery life from the shell. Try doing that in DOS!

More Hardware to add to my collection. Toshiba Tecra M2

Filed under: Linux Hardware — at 1:23 am on Monday, December 10, 2007

If you read my post about my Toshiba Portege 4010 you would know that I mentioned in their that it was a little too slow. I couldn’t do the things I needed to do, such as virtualization or play Quake3. So for an early Christmas present to I sold my Toshiba Portege 4010 and I purchased a used Toshiba Tecra M2 laptop. The specs are pretty decent for the amount I paid for it.

CPU: 1.7GHz PM
RAM: 512MB (Needs upgrading)
HD: 40GB -> Upgraded to 100GB
Graphics: GeForce Fx 5200 toGo 64MB.
Media: CDRW-DVD Combo, Firewire, USB 2.0, 2PCMCIA Card Slots
Network: 10/100/1000 B/G Wireless

The battery life is not as good as my old Portege 4010 but with the time I save by not waiting on the CPU I can normally get my Quake3 I mean work done in time to find a power outlet.

The Tecra M2 has excellent support for Linux. The only thing thats not supported that I’m working on is the SD Card reader. This is the same situation as the Portege’s as they use the same hardware.

I’ll be making a post for any body wanting to run a real Linux distribution on a Toshiba Tecra M2.

Microsoft Office 2007 Suite, Under Wine.

Filed under: General Linux,Linux Software — at 12:07 am on Monday, December 10, 2007

I was browsing around and found this blog post on Using Microsoft Office on Linux with Wine. I’ll have to give it a try some time to see if it runs properly, if it does I don’ t want to hear any of the
“I need Microsoft Office” excuses.

There are plenty of alternatives, Open Office, KOffice, VMWare, Wine/CXOffice. The only real reason I’d want to use Office 2007 on Linux would be for opening the documents that people send me in the 2007 format and the new features of Excel. For every day computing I actually use Open Office myself. Check out the screenshots from the link, it looks pretty smooth (Unlike Photoshop under Wine).

Next Page »