Linux Blog

How Android apps are useful to get new blogging ideas

Filed under: General Linux — at 9:51 pm on Thursday, October 18, 2012


This post is a guest post written by Brianne. She is blogger by profession. These days she is working on online promotion for Go Pilot

It is true that the bloggers will need some applications which will help them to connect with their blogging on the move. So the Android applications come handy in this connection. Moreover, you will keep touch always through these applications with your blog. Since, the Android applications provide the ample advantages to the bloggers. Even, these Android applications will give you an extra fillip for running smoothly your blogging habit. 

(Read on …)

When not to script it

Filed under: General Linux,Linux Software — at 10:37 am on Wednesday, December 2, 2009

I’ve come across a number of programs in the past and thought to myself,

“Why didn’t they script this, it would be so much easier.”

After thinking about it for a while it all makes sense now. It seems that I had the shell script bug, everything must be done in the shell! In reality while the shell is great and all, it is not without its flaws. There are somethings the shell is great at and should be used for, then there others it shouldn’t.

Don’t get me wrong, I like to script as much as the next guy, but sometimes I think people get lost in its simplicity. Some people use it for everything without fail. Perhaps this is because they don’t know otherwise, or maybe because they too have the shell script bug.

There are many reasons to use the shell and I’m not against using it by any means. This is simply a list of when it may not be suitable to whip out the shell and start scripting. If there is any I missed, please add them in the comments and they may eventually make it into a revised post. I’ll do the same if I come up with any more. Onto the list!

Distribution / Portability – Ever try to distribute a script? Well, most of the time its not a problem, but sometimes you’ll get bit in the ass. Not all systems are created equal. Some have missing packages, or something doesn’t work the EXACT same way.

Simplicity – Sometimes bash is elegant. Well, it depends on your definition I guess. Some argue that scripting is simple, where as others that have to support or maintain it will be ready to cut you. I know I’m sharpening my shanks right now for some revenge. Seriously though, choose a language that makes it easy to K.I.S.S (keep it simple, stupid.)

Performance – Lets kick in the after burners. This is one I don’t have much experience in although I should probably look into it. The shell is sort of like a glider, it gets the jobs done, but I wouldn’t want to race it against a jet or anything. If you’re considering scripting, just time the process to make sure it meets your performance needs. Most of the time, if it is for you, you’ll be fine right? I mean you’ve got all of the time in the world and can wait overnight if you have to. I’d rather not, but have been known to wait on a slow script out of laziness.

Maintenance – Nightmare code. Dependency Hell. Some may have seen the t-shirt or heard the phrase,

“Programming is like sex; one mistake, and you’ll support it forever”

Yea scripting this is sort of like that, except you can always abandon and upgrade your scripts :)

Security – Keep it secure, there are many issues with security in shell scripts. We wont get into them now but if you wear a tinfoil hat when using a computer, you may not want to rely on shell scripts to do your top secret stuff.

Does a room without Windows have doors?

Filed under: General Linux — at 5:29 pm on Friday, May 15, 2009

I was e-mailed an interesting project from the folks that run AyeTea (Pronounced IT) that I thought people might be interested in. Here is the description they sent:

A Room Without Windows is a new project set to launch on the 1st of June 2009.  Scheduled to last for 31 days, the basis of the project is to take long term Windows users and deprive them of their familiar software.  Our IT lab rats will have one month to find open source software that will replace the function of their Windows based machines.

This is an interesting concept and one that I think will succeed. It will either open or close doors by letting people try out Linux and those that like it will stick with it, and those that don’t will go back to using whatever they were using before, which seems to be Windows. There are two “lab rats” which will be experimented on, I’ll definitely tune into see how it goes.

As far as learning, and replacing everything they do with an open source application, it should not really be too hard. There are replacements for just about everything with the exception of perhaps very popular large cad engines, but again, they’re IT folk so what are they going to be using cad for? Anyway, letting Windows go is sometimes the best way to use Linux and learn. Hopefully they’ll do ok.

So Derek and Blair, you have a DOS background, and you’re going to be using Linux for a month, it should bring back memories. Just don’t be hating if it turns out badly, and try not to lose your job over this.

Full details of the project are available here:

Basic Scripting Snippets Repository

Filed under: Shell Script Sundays — at 11:04 pm on Sunday, April 5, 2009

Everyone has their own favorite snippets of code that they use. With command line fu you can share your snippets and look at snippets that other people have posted. I’ve known about it for quite some time and frequently check it out, it’s really shaping up nicely.

Command-Line-Fu is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you’ve been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on and discussed – digg-esque voting is also encouraged so the best float to the top.

I don’t think that you should delete your snippets file, just in-case you don’t have the intrawebs but I think you could get something out of browsing through the highest rated if nothing else.

Whats in your Feed Reader?

Filed under: General Linux — at 4:18 pm on Friday, November 14, 2008

Hey, today I’m asking the question as to whats in your feed reader. I mostly ask this question because I’m interested in what other people are reading and writing.  Here is a list and commentary of the Linux and tech related feeds that are in my feed reader. I invite you to add your feed to my list, and perhaps walk away with some feeds that you were not aware of. This is not a comprehensive list, I’ve only added the ones that have been updated recently and those that I have commentary about.

The Linux Blog
Feed URL:
Well, who doesn’t subscribe to their own blog? I mean I have to have some one reading my blog right? Seriously though, I’d appreciate it if you subscribed to my RSS feed and occasionally left comments! Announcements (Global)
Feed URL:
For those who don’t know about freshmeat:
“Have you been living under your desk?”
This is a decent feed it provides information about software that has been updated. I use it to get notified when there are updates and to find new projects.

Technorati Linux Related
Feed URL:
This is a very basic feed that grabs blog posts from Technorati. I don’t have this one set to notify me because I’d never have time to work. I just check it from time to time and see whats going on.

Linux Journal
Feed URL:
Any one who’s picked up a magazine knows about The Linux Journal, but may know know that they should subscribe to their RSS feed. I like the magazine and their feed is great too. They post a decent amount of news, reviews and informational content so its worth signing up. Hopefully one day they’ll send me some promotional material or something for being so loyal.

Red Hat Magazine
Feed URL:
Red Hat Magazine, what more is there to say? Its a magazine about Red Hat related technologies. They have great content and a great editorial team. They don’t just post on Red Hat topics either so give it a subscription if you want something different.

Free Software Foundation – FSF Blogs
Feed URL:
FSF enough said right? Well, not exactly. I love the FSF and all they do so I subscribed to their blog. Perhaps I should subscribe to more of their feeds since they do such a good job.

Ubuntu Geek
Feed URL:
Although I’m not the worlds largest Ubuntu fan (I probably fall in-between, but no where near UbuntuHater) I still like to keep up with whats going on in the Ubuntu world. Since a lot of what applies to one Linux distribution applies to another, this is a good one.

Debian Package of the Day
Feed URL:
Debian has the most packages available (I think). So I subscribed to their feed thinking, cool a piece of software a day. Cool right? Well sort of. The title of the feed is some what misleading because I do not get a package of the day every day. Perhaps one a week. But still one a week is better than none a week right?

Mark Shuttle Worth
Feed URL:
Here Be Dragons! Most know as the founder of Ubuntu, but also well accomplished in the cryptography field (read Thawte) First African in space. Always very interesting content. Respect!

Linus’ Blog
Feed URL:
Who has that T-Shirt:
“Linus is My Homeboy?”
Yea, me neither but I do subscribe to his feed just because I can. Although I feel some what voyeuristic since it is some what personal. I think its very intriguing, while others call it stalking.

Feed URL:
I didn’t even know where Bohol was before subscribing to this feed. Subscribing to this feed will give you articles about Linux and other technical topics. But I still don’t know where Bohol is. (just kidding I googled it)

Ian Skerrett
URL: |
Feed URL:
Follower on Twitter Ian Skerrett is the director of something or other really important with the Eclipse foundation. (Marketing) I read his blog from his Twitter link and decided that it would be a useful feed to add to my reader.
Feed URL:
Website that lists a bunch of tips for Linux. Some more useful then others, and some if you are an experienced Linux user perhaps will seem like common knowledge. If you want tips and want them in your RSS feed reader, get them here!
Some Other Feeds

Geekologie – Gadgets, Gizmos, and Awesome
Feed URL:
I’m not sure who pays this guy but its humorous. Borderline safe for work and perhaps the biggest time waster I have in Akregator.

Life Hacker – Excerpts
Feed URL:
Life hacker, hack your life? No not exactly. Tips on how you can improve your life. Topics range from genius to dumb to common knowledge. (such as how to wrap your cords up, which we all know cords are suppose to be plugged in and in a birds nest under your desk) This site is for those like me who want to be more productive and … wait never mind I’m just digging myself a bigger grave. Seriously though Lifehacker does have some good content. Just don’t read the comments.

Feed URL:
Keep up with the latest gadgets that you will never get. Thats pretty much how I view engadget. I like it, but I used to like it more. So I think of it as a legacy feed. Around just because I wouldn’t feel right deleting it.

In Closing
Feel free to suggest feeds to me I’ll more than likely add them. If you are not on the list and just have to be leave a comment. I may have you in my feed reader already. This also is not my whole list. If I had to write a description about every feed do you know how long I’d have been writing this?

cURL Gotcha’s

Filed under: Shell Script Sundays — at 4:31 pm on Sunday, February 17, 2008

I’ve been using cURL for a couple of projects recently and I thought I would just post a couple of the “Gotcha’s”

Feel free to add to the list by leaving a comment.

1) User Agent. Certain websites especially Google like to block the use of curl because some people use curl for abusive reasons. This can be fixed by changing your user agent.

User Agents can be switched with curl by using the -A or –user-agent switch.

To change your user agent to Internet Explorer 7 or IE7 on Vista do the following when requesting a page:

curl -A "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" [URL]

Should you want to change your user agent to Netscape 4.8 or Opera 9.2 on Vista you can use the following agent strings:

Netscape user agent string

Mozilla/4.8 [en] (Windows NT 6.0; U)

Opera user agent string

Opera/9.20 (Windows NT 6.0; U; en)

2)  Separate post data with ampersands or put spaces in between your -d’s  This one got me once.

3) Don’t try to post and try to use -G for get requests if you want to post data.

-G makes everything that is in -d get put into a get request instead of a post. Use the following format if you want to post and use get requests.

curl -d "post=data&more_post=moredata" urlgoeshere.php?get=getdata

I’ll post more of these as I remember them, again as stated above if something has got you with curl post them here and I’ll add it to the list with a link to your site! Thats all for this week – Owen.

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.

Comments Are Back!

Filed under: The Linux Blog News — at 4:03 am on Saturday, December 8, 2007

Ok, I’ve decided to add comments back to The Linux Blog. The idea behind commends is that people post comments for help, advice, questions, comments on the article or just to be nice. Before this was not happening so I turned them off. Now, I’ve re-added them back hoping that people will actually comment.

The spam problem has been fixed and we should not see any spammy comments since posters now have to be approved.

I’ll leave them on for a while and see how it does. In other news I’ve been writing like mad, trying to get some good articles written.

On the list of stuff to write are a couple of Shell Scripting articles, one about IP Soft Phones for Linux, Battery Life & Optimization, virtualization. I also have some tutorials that I would really like to write to help people out with WordPress and other web applications that run on open source software such as MediaWiki.

If you have any questions, or would like to request something, now you can actually just comment , so go ahead, leave a comment

Creating Script Parameters With getopts

Filed under: Shell Script Sundays — at 9:06 am on Sunday, October 14, 2007

Many programs for Linux have parameters that can be given at run time. These are also known as switches, arguments or options. These parameters make it easy to tell a program or script what to do and what options to use. In this Shell Script Sundays Blog post I will show you how to implement these in a script by using getopts.

For this example to work the following must be placed in a script:

while getopts ":e:" ARG;
do case "${ARG}" in
e) echo "${OPTARG}";;

This code basically gets loops around the arguments. All this script does is take the value after the -e and echo’s it out. In the example below I named the script getopts.

owen@the-linux-blog:$ ./getopts -e "Hi There Linux Blog Viewers"
Hi There Linux Blog Viewers

For each extra parameter that is needed a new constant to the getopts and do loop need to be added. For example if the option -e and -q need to be in the script then the following getopts loop would be created:

while getopts ":e:q" ARG;
do case "${ARG}" in
e) echo "${OPTARG}";;
q) echo "${OPTARG}";;

Of course the above script for -q also only echo’s out the value for -q as seen below:

owen@the-linux-blog:$ ./getopts -e "Hi There Linux Blog Viewers" -q "Another Option"
Hi There Linux Blog Viewers
Another Option

This is all very well, but documentation is always nice, even if you think you know how to use your script you may forget in the future. Its also nice if you have a script that other people can easily use. That being said its good to have a way to show users how to run the script.

usage () {
echo -e "Usage: $0 -e \"What To Echo\" [ -q \"Output\" ]"
echo -e "\t-e: specifies what to echo (required)"
echo -e "\t-q: Where to write output to. If not specified the output is written to the console"
while getopts ":e:q:" ARG;
do case "${ARG}" in
e) ECHO="${OPTARG}";;
[ -z "${ECHO}" ] && { usage && exit 1; }
[ "${OUTPUT}" ] && { echo $ECHO > $OUTPUT; } || { echo $ECHO; }

The code above takes the options and assigns a variable to each of the options $ECHO is what to echo and $OUTPUT is where to write the output to. The script calls the usage() function and exits whenever the required option ($ECHO) is not set. If $ECHO is set it checks to see if $OUTPUT is set, if so it echo’s the contents of $ECHO to the $OUTPUT variable (file or device). If $OUTPUT is not set then it just echo’s the $ECHO variable normally. This is the script running with its various different actions:

owen@the-linux-blog:$ ./getopts
Usage: ./getopts -e "What To Echo" [ -q "Output" ]
-e: specifies what to echo (required)
-q: Where to write output to. If not specified the output is written to the console
owen@the-linux-blog:$ ./getopts -e "The Linux Blog getopts Example"
The Linux Blog getopts Example
owen@the-linux-blog:$ ./getopts -e "The Linux Blog getopts Example. Output To Null" -q /dev/null
owen@the-linux-blog:$ ./getopts -e "The Linux Blog getopts Example" -q Write_To_This_File
owen@the-linux-blog:$ ls
Write_To_This_File  getopts
owen@the-linux-blog:$ cat Write_To_This_File
The Linux Blog getopts Example

As there are many different variations and each implementation would be different I can not cover each individual getopts scenario but by assigning variables your option arguments you should be able to get switches working in your own shell scripts.

KDE Wall Paper Contest

Filed under: General Linux — at 8:56 am on Thursday, August 2, 2007

A wall paper contest was posted this morning on Digg and many other blogs. The contest is simple, upload wall papers that you created and you have the possibility of getting them included in the next release of KDE.

After viewing the blog and homepage of the link submitted in the article, I was a bit skeptical as to whether this was just a scheme for a blogger to get some publicity, so I did some research. Turns out that Riccardo Laconelli is not listed in the main credits for the KDE project, but is listed in the KDE lists []. It also seems as if he is the developer of the Oxygen theme and has committed various icons to the KDE project.

Should you participate in this contest?

I believe if you have any artistic skills that you should design a wall paper and submit it to the competition. For your efforts you may have your wall paper included one of the most popular window managers and it will make you feel good for contributing. If you enter the competition and your entries are not specific to KDE I urge you to also post your wallpapers on your own site/blog/photo gallery and other Linux wall paper sites. Some people like to be able to use wall papers on other window managers. If I had any artistic skills I would most defiantly be entering this competition myself.

KDE Wallpaper Contest is []

Hard drive set up and tuning.

Filed under: General Linux — at 11:49 am on Wednesday, August 1, 2007

One question people often ask me is
“What is the best way to partition a hard drive?”
With graphical installations becoming more popular often hard drive partitioning is overlooked.

If you already have a working installation you can check how your system is currently partitioned by running the command:

bash-3.1# fdisk -l /dev/hdX (depending on your drive)

If you are happy with the performance of your system then reinstalling is not really needed. If you would like to possibly gain a performance increase then you may want to consider reinstalling with a better partitioning method.

Repartitioning your drive
The first thing that I recommend doing when deciding how to partition the hard drive is to figure out what the system is for. Is the system going to be a Linux workstation, desktop, server or application. Knowing this information is not necessary as sometimes computer often have multiple roles but it is good start into setting up your hard drive properly.
There are many ways that a hard drive can be partitioned. Depending on the role of the computer I have different partitioning methods.

bash-3.1# fdisk -l /dev/hda
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 124 995998+ 82 Linux swap
/dev/hda2 7236 7296 489982+ 5 Extended
/dev/hda3 125 7235 57119107+ 83 Linux
/dev/hda5 * 7236 7296 489951 83 Linux

Firstly, my hda1 is swap. I always make my swap disk the first primary partition on the hard drive. This is because its the fasted to access. If your currently running an install, check to make sure your swap is hda1.

My hda2 is not used, this is just a preference that I have, to my knowledge there is nothing wrong with using hda2 as root. I just like to use /dev/hda3 as my root. My root file system for this particular machine is about 95% of the total drive. The other 5% is used for my swap partition and my /boot/ partition. I used /dev/hda5 for my boot partition as this is not so important as it only gets accessed at boot time and when copying kernels to the partition. You don’t have to have a separate boot partition, but I like to just in case I want to export it as an NFS share.

Once your happy with your disk partitioning scheme, the next thing that needs to be done in the partitioning manager is to choose a file system. The file system type for Linux Swap partition is 82 and 83 for the Linux type.

Choosing a filesystem and formatting it.
Most installations will take care of the formatting and adding swap, you just have to choose what type of file system you want to use. I would advise to use the ext3 or Reiser file systems for your root and boot partition. Ext2 is depreciated and has been replaced with ext3. If ext2 is still in your distributions setup it is for legacy reasons and should not be used. I like to use ext3 because its more mature, but I have no problem with using Reiser. Choose one and install your distro as usual.

Basic Tuning
Once your install has finished and is booted it is good to check to make sure your disk is being used correctly.
I like to double check this because I want to make sure that I am getting the most out of my system. Some times certain distributions don’t set up the drive correctly for stability issues (I’m not pointing any fingers here).

To do this I use the hdparm tool. Quote [man pages]:

hdparm provides a command line interface to various hard disk ioctls
supported by the Linux SATA/PATA/SAS "libata" subsystem and the older
IDE driver subsystem. Some options may work correctly only with the
latest kernels.

The first thing to do is run hdparm /dev/hdX (depending on your drive)
I have changed some options for the purpose of this tutorial but here is my current setup:

bash-3.1# hdparm /dev/hda
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 117210240, start = 0

Turning DMA on.
Notice, that IO_support and using_dma are set to off.
For performance reasons this should change.
As I know my controller supports DMA I should turn this on. If your unsure if your controller supports DMA you should refer to your motherboard specifications or try it at your own risk.

bash-3.1# hdparm -d1 /dev/hda
setting using_dma to 1 (on)
using_dma = 1 (on)

If you just try it without knowing if DMA is supported, it will either error or may become unstable. Whenever installing a new system, if DMA or 32-bit transfers are turned off, I like to keep the system running for a while and copy large files around to make sure there are no stability issues.

Turning 32-bit transfers on
Now that DMA has been turned on successfully and the system is still stable, I will turn 32-bit transfers on. The same applise for 32-bit transfers as to DMA. The command is the same as before but with the -c1 switch.

bash-3.1# hdparm -c1 /dev/hda
setting 32-bit IO_support flag to 1
IO_support = 1 (32-bit)

Now the basic hard drive tuning has been set up I will run stability tests for a while and make sure the settings work as desired. If the system is not stable, you can try using 32-bit transfers or DMA independently and try to find out which one is guilty or if they both work separately. Which one to use should probably be measured with a bench mark test. This can be done with a benchmarking script, or just by copying a file and measuring the time it takes with both.

Final Notes
Check out your hard drive settings and partitioning scheme and make sure you are happy with the way its set up. If you have the time and want to tweak your system these basic steps should help you with your quest of having lean mean Linux machine.