Skip to content

Linux Kernel Source Code Screensaver

I consider myself to be a geek. Linux and geeks have a long history together. So, naturally there are a bunch of geeky things available for Linux. In this case, I’m talking about screensavers. I was looking for a screensaver that would show me something really cool about my system. Then I got the idea for a screensaver that shows you random parts of the source code for the Linux kernel. I couldn’t find anything out there already that would do what I needed, so I decided to put it together myself. I also wrote my own command line utility for accomplishing this called Argument Shuffle.

Now just to clarify, I did not write my own screensaver. I’m actually using the phosphor screensaver under xscreensaver. Phosphor can actually be used as a terminal emulator, so you can pipe any kind of program output into it. It’s pretty customizable. On Ubuntu, here’s how you install the phosphor screensaver:

sudo apt-get install xscreensaver-data-extra

Next we need to make sure that the Linux source code is installed on our system. Chances are your kernel source code will be installed in the /usr/src directory. If it’s not installed there, check with whoever maintains your distribution of Linux to find out where they keep it. Here’s how to install the source package on Ubuntu:

cd /usr/src
sudo apt-get install linux-source
sudo tar -xpjf linux-source-2.6.22.tar.bz2
sudo ln -sf linux-source-2.6.22 linux-source

Continue reading ›

, , , , ,

Gutsy Gibbon Released

Version 7.10 of Ubuntu Linux codenamed “Gutsy Gibbon” was released today. This release is the first Ubuntu release to include Compiz Fusion desktop effects by default. I played with this feature during Gutsy’s beta testing phase, and there are a lot of interesting features. There were only a few minor bugs when I was testing it, but hopefully they’ve cleared those up for the final release.

This release will also finally support full read/write access to NTFS partitions. In a nutshell, this means that if you have Linux and Windows installed on your computer, you will be able to read and write to your Windows partition. This makes dual booting less painful since you don’t have to worry about how to share files between the two operating systems.

This release includes a host of other features, include Gnome 2.20, fast user switching, improved firefox plugins support, a graphical configuration tool for X, automated printer support, a new Linux kernel with power saving features, and much more. A more complete list of new features and their descriptions is available here.

I love how a new version of Ubuntu comes out every 6 months. It keeps the experience fresh and interesting. With so many people having issues with upgrading their Windows XP computer to Windows Vista, hopefully they will find Ubuntu to be a great alternative.

, [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Restarting a Locked Linux Box Without Using Reset

Everybody always talks about how Linux is a very stable operating system. That may be true, but once in a while a Linux machine can become unstable. A lot of times, a Linux machine becomes unstable not because of Linux itself, but because of the software that’s running on top of it. For example, if X (which is the program that controls your graphics and your keyboard/mouse) crashes, then your computer may appear to be locked up when in fact Linux is still operating properly underneath X. Linux has a feature called Magic SysRq Key which allows you to communicate directly with the kernel in these types of scenarios. The Magic SysRq Key allows you to send signals to the Linux kernel for safely rebooting your computer in a last-ditch effort. Using this method instead of the reset button should greatly reduce the possibility of data loss or corruption. Only use the reset button on your computer if the Magic SysRq Key method doesn’t work.

Before using the Magic SysRq Key method, try recovering your computer using these methods:

  • Ctrl + Alt + F1 - this attempts to switch to a regular Linux terminal. Also try the same combination with F2 - F6. From here you can try to recover your computer by killing the locked process, or issuing a reboot command.
  • Ctrl + Alt + Backspace - this sends a signal to X to restart itself. If X is not completely locked up, then it should respond to this and then give you a normal login screen. If this method works, you may not need to reboot the whole computer.

Continue reading ›

, ,

Quick Tip: Toggle Previous Directory

People who use the Linux/Unix command line to any extent are certainly familiar with the cd (change directory) command. In fact, this is probably one of the first commands you ever learned on the command line. When you’re working with the command line, a lot of times you need to switch to a directory and then come back to the same directory. The cd command allows you to use a dash as an operand for just such a situation.

/var/log $ cd /etc
/etc $ cd -
/var/log
/var/log $

Using cd with a dash instead of a directory location, you can easily jump back to the previous directory. In this example, I started at /var/log and then jumped to /etc and then back to /var/log. It also acts like a toggle, so if you keep doing cd - you will go back and forth between the two most recent directories.

, , , , [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Note Taking on Linux!

basket-note-pads-3d.pngWhen I started college at UCF a few years ago, I received a free copy of Microsoft OneNote 2003. I was running Windows XP on my laptop at that time. OneNote was very useful for taking notes during class. I could organize each lecture onto its own note page, and organize all of my note pages into categories for each class. It took care of a lot of the little annoying problems that you encounter when using a plain text editor or a word processor to take notes. Those programs are really not geared towards taking notes.

A couple of semesters later, I upgraded my laptop from Windows XP to Linux. I’m currently running Ubuntu Linux 7.04 on my laptop. Obviously, I cannot run OneNote on my laptop anymore. I have a separate box at home running windows, but OneNote is really only useful on a laptop, right? I tried taking notes with OpenOffice, AbiWord and various other applications, but they’re not note taking programs.

I recently discovered a program in the KDE suite called BasKet Note Pads. BasKet is the first application on Linux that I’ve discovered that is intended for serious notetaking. I have used programs like Tomboy, but these programs are simple note taking applications. The post-it note style applications are nice for quick notes, but for taking class notes, I need a 3-ring binder. BasKet is still somewhat early in its development (version 1.02 on the homepage, version 1.01 in Ubuntu’s repository) but it is surprisingly feature-rich despite being so new.

With BasKet, all notes are organized into “Baskets.” Baskets may contain sub-baskets, which are the same as regular baskets but they are organized beneath their parent basket. Eventually you have a “Basket Tree” in which your notes are logically organized. The baskets can be organized in two main ways: columns or free-form. In column style, you can specify 1, 2, 3, etc. number of columns in which to organize your notes. In free-form, you can place and drag notes anywhere you want, or create groups and subgroups of notes which can behave in tandem. You can also easily drag notes from one basket to another.

Continue reading ›

, , , , , ,

Upgrade Your Linux Process Manager

In the Unix/Linux command line environment, exploring the running processes is accomplished chiefly by two programs. top gives you a real-time list of running processes which updates periodically showing the most active processes at the top (hence the name.) ps takes a snapshot of the running processes and dumps them to the command line for you. Both of these methods work well, but a program called htop brings a little bit more sanity and convenience to the situation.

htop is ‘an interactive process-viewer for linux.’ It runs on the command line in real time like top does, but it utilizes ncurses and allows you to browse and interact with the processes. htop also features a colored interface making process management easier and more visually appealing.

htop has easy-to-read resource meters at the top of the interface which make it easy to survey the status of your system at a quick glance. The CPU meter shows you your CPU usage in a way that makes sense to humans. Where top breaks the CPU usage into several different categories, htop combines them into a simple collected usage meter. It is certainly useful to get the very specific CPU usage statistics that top offers, but most people don’t need this much information and are often confused by it. htop does, however, provide some of this information by dividing the meter into different colored sections. Blue for low priority processes, green for normal processes, and red for kernel processes. It also provides the standard CPU load averages, which is another very common representation of CPU load in Unix. htop provides resource meters for memory and swap usage as well. The memory meter is also color coded. Refer to the help section for more specifics about the color codes.

htop allows you to scroll through the list of processes either with the up/down keys, or the page-up/page-down keys. You can specify which attribute you want htop to sort the processes by (e.g. CPU%, Memory Usage, etc.) You can toggle a tree-style display showing you which processes were spawned by which other processes. You can even increase or decrease the nice value of any process. (The nice value is the priority level that the process will receive within the kernel’s scheduler. Simply put, the lower the nice value, the more critical the process and the more CPU time it will be given. ‘Nicer’ processes with a higher nice value will yield to more critical processes and will receive less CPU time. More information here.) Finally, if you’re using htop in a windowed environment with a mouse, you can use the mouse to select processes and options.

Another of the more interesting features of htop is the ability to tag multiple processes and then perform a single action on all tagged processes. So, for example, if you need to kill a group of several processes, you can tag all of the processes in the list with the space bar and then using the “F9 Kill” option. All of the tagged processes would then be killed. htop is a convenient, easy-to-use, and feature-rich replacement for top on your Linux system. It can be installed easily under Ubuntu with the following command:

sudo apt-get install htop

It can also be downloaded directly from the project website at http://htop.sourceforge.net.

, , , , , , [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Ubuntu 30-Mount Check Annoyance

If you’ve used Ubuntu Linux for longer than a month, you’ve no doubt realized that every 30 times you boot up you are forced to run a filesystem check. This filesystem check is necessary in order to keep your filesystem healthy. Some people advise turning the check off completely, but that is generally not a recommended solution. Another solution is to increase the number of maximum mounts from 30 to some larger number like 100. That way it’s about 3 times less annoying. But this solution is also not recommended. Enter AutoFsck.

AutoFsck is a set of scripts that replaces the file system check script that comes shipped with Ubuntu. The difference is that AutoFsck doesn’t ruin your day if you are so unfortunate to encounter the 30th mount. The most important difference is that AutoFsck does its dirty work when you shut your computer down, not during boot when you need your computer the most!

The 30th time you mount your filesystem, AutoFsck will wait until you shut down your computer. It will then ask you if it is convenient for you to check your filesystem. If it is convenient for you, then AutoFsck will restart your computer, automatically execute the filesystem check, and then immediately power down your system. If it is not convenient for you to check your filesystem at that moment, then AutoFsck will wait until the next time you shut down your computer to ask you again. Being prompted for a file system check during shutdown is infinitely more convenient than being forced to sit through a 15 minute check during boot up.

So, here’s how you get going with AutoFsck.

  • First, you need to download the package. It is available on the project page, but here is a direct link.
  • Extract the contents of the archive to anywhere that’s convenient for you.
  • Inside that folder, run the script called ‘install’.
  • Follow the on-screen instructions.
  • AutoFsck will start working immediately.

I haven’t done much reading about whether or not this script will be included in the next release of Ubuntu, but I definitely think it should be. AutoFsck finally makes Ubuntu the ultimate distribution of Linux.

– EDIT–

As many visitors have suggested, Bonager is also a good solution for this issue. Bonager sits in your system tray and lets you easily see how many boots you have left until a scan is required. It will warn you if a scan is about to happen, and it also lets you force a scan early if you want to get it out of the way. This solution does not check the filesystem on shutdown like AutoFsck does, so if you’re not paying attention or you forget that a check is coming, you might still be surprised.

, , , , , , , , [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Optimize Google For Your Website

googlewebmastertools.jpgIf you have your own website, then getting your website to cooperate with search engines is critical to getting traffic to your site. There are many strategies for optimizing your website for Google, but optimizing Google for your website can also be beneficial. Google Webmaster Tools allows you to submit information to Google about your website and tweak how Google crawls and indexes your website. It also gives you feedback and statistics about how Google’s search bot sees your website. With Webmaster Tools you can be sure that Google is bringing the most amount of traffic to your website.

The first thing you can do with Webmaster Tools is to verify your website with Google. You can either insert a special meta tag within the HTML of your homepage which Google would then verify, or you can create a specific filename on your server. Once you’re verified, Google gives you access to the rest of their tools for your site.

In order to ensure that Google can get to every content page within your website, Google allows you to submit a sitemap of your website. A sitemap is an XML file which specifies page locations and update times for your website. Many server-side web applications like Wordpress can automatically generate a sitemap file for you. Once Google has the sitemap, it can more efficiently cover your entire website in their index.

If your website makes uses of the robots.txt file for restricting areas where you don’t want the bot to crawl, then Webmaster Tools has a feature for verifying that your robots.txt file is being properly interpreted by the Google crawl bot. Webmaster tools also gives you the ability to keep an eye on how high your Google PageRank is doing. It gives you an indicator that tells you what the PageRank distribution is across pages on your site.

Finally, Google Webmaster tools gives you an interesting look into exactly how your site is being indexed within Google. They give you charts that list all of the keywords that the crawler picked up when they crawled your site. They also give you tables indicating which search queries have had your content turn up in the search results, and how far down in the search results your site showed up. Also useful is the tool which shows you all of the other places on the Internet that Google found a link to your site. For each page within your site, Google Webmaster Tools lists every page on the Internet that links to that page. This is very helpful for discovering how much your site is interlinked from other sites and who is doing the linking. Also it allows you to see what kind of sites link to you and in what context they link to you. Finally, Google has a tool for summarizing what terms have been used in linking to your site. So, for example, if another site links to your site with a hyperlink that uses your full name then your full name will show up in the link text tool. These statistics are important for understanding what keywords are driving your page up in the search results.

There are several other features within Google Webmaster Tools which can help you better integrate your site with Google, but I’ve tried to cover just the main ones here. I’m sure that other search engines have tools similar to these, but since the majority of traffic to my website comes from Google, I’ve focused most of my energy on Google’s tools.

, , , , , , , [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

New House

This is off-topic, but I’m probably going to be a bit slow on the updates over the next few days because I’m moving into my new place. I’ll try to get to posting by the end of the day, but moving can be pretty exhausting. I do have a few writeups coming down the pipe, so all hope is not lost.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Fixing Azureus Core Dump Issue

The following solution did not end up working for me. Azureus kept on crashing and erasing the log file didn’t really fix the problem. After more research, I discovered that the better solution is to download the original Jar file from here and uninstall the one from the Ubuntu repositories. I believe there is a bug filed for this under Ubuntu, so it should be fixed in future releases. The following is my original post in case you’re still interested.

I’ve been running the Azureus BitTorrent client on Ubuntu for a while. Recently it’s started having problems starting up. Usually it will be running and then it will crash spontaneously, and then when I restart it it loads until it gets to the main window and then immediately crashes. It will then crash every time I load it after that. Launching Azureus from the command line yielded a Java core dump error message. After searching around on the Internet and in forums, I found a tip that if you delete the files in ~/.azureus/logs, and then start it again it won’t crash. It works every time for me. The problem now is that this issue keeps popping up. A few days after fixing it, Azureus will crash again in the same fashion. So, here’s how you can modify Azureus to make sure that this issue gets taken care of automatically.

Before I continue, I should mention that I don’t have much experience with shell scripting. I just hacked around with this and it worked. If you need to keep your Azureus log files for some reason, then this hack probably isn’t for you. But I have never found these files to be useful and I assume most of the rest of you won’t be needing them either. The idea here is to modify the Azureus startup script so that it automatically cleans out your ~/.azureus/logs folder automatically every time it starts. Theoretically you should never have this crashing issue again. Or if it does crash, then it should automatically correct itself the next time you start Azureus. Here’s the drill:

From the command line, open the Azureus startup script:

gksudo gedit /usr/bin/azureus

Now find this line in the file (make sure you don’t delete this line):

exec java -Djava.library.path=/usr/lib/jni:/usr/lib \

And just above this line, add this line:

rm -r ~/.azureus/logs/*

This will tell the script to clean out the logs directory every time Azureus is started just before the actual application gets running. Now just save the file, and restart Azureus. Like I said before, shell scripting isn’t my forte, so if anybody else knows a better way to do this, feel free to comment.

, , , , , [Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • Categories

  • Blogroll

  • Other Links

  • RSS Feed




  • TopOfBlogs
    Top Computers blogs
    Computers blogs
    Top Blogs
    Computer Blogs - Blog Catalog Blog Directory

    Green Web Hosting! This site hosted by DreamHost.