Cooking with Linux - The Virtual Streets of $HOME
François, what are you looking for on Freshmeat? Quoi? A program to digitize you so you can go inside the computer? Yes, I know what it looks like in the movies, but virtual reality hasn't quite made it there yet. I thought you understood that when we discussed lightcycles months ago. No, François, I don't think people are going to be living inside computers anytime soon. I'm not laughing at you, mon ami. I am just amused, that's all. No, I'm sorry to disappoint you, but I don't think there are cities or people in your Linux system either. We will discuss this later. Our guests will be here any moment, and we must be ready for them.
What did you say, mon ami? They are already here? Quickly, François, help our guests to their tables. Welcome, everyone, to Chez Marcel, where fine wine meets exceptional Linux fare and the most superb clientele. When you have finished seating our guests, François, head down to the wine cellar and bring back the 2002 Ctôes du Roussillon Villages.
François and I were just discussing the possibility of virtual worlds inside our computers, a truly amazing prospect but one that is still fantasy. It's true that amazing things have happened in the time I've been working with computers. Your Linux system is one of those things, and its open nature means a freedom to explore that simply doesn't exist elsewhere. Still, I keep thinking that the computing model in general is still in its infancy. Maybe it's because I watched too much science fiction and as a result, my expectations are a bit high. Think back to the movie Tron, for instance. In the opening sequence, Flynn the hero of the show, sends a program named CLU into the system to locate some missing files. CLU, the program, looks like Flynn and moves around in a 3-D tank while a companion bit offers yes or no advice. There are towering skyscraper-like structures all around as he navigates his tank down digital streets. That's the virtual computer world I wanted to experience in my younger days.
Ah, François, you have returned with the wine. Please, pour for our guests. May I suggest, mes amis, that you enjoy the many hidden flavors in this excellent red.
Although there may be no hidden worlds inside the system, plenty of things are otherwise hidden from view. Virtual consoles, for instance, scroll information that is hidden from view once your graphical desktop starts up. Sure, you could jump out of your graphical session with a Ctrl-Alt-F1 to see what is happening out there, but there is a better way. To view the hidden contents of that virtual console, type the following at a shell prompt (you will need root permissions for this):
You see, what you may not know is that your system keeps track of the contents of those virtual consoles (1-6) in a special device file, /dev/sdaX, where X is the number of your virtual console. For example, here is a sample of the output of the first VT on my Ubuntu test system:
* Starting OpenBSD Secure Shell server... [ ok ] * Starting Bluetooth services... hcid sdpd [ ok ] * Starting RAID monitoring services... [ ok ] * Starting anac(h)ronistic cron: anacron [ ok ] * Starting deferred execution scheduler... [ ok ] * Starting periodic command scheduler... [ ok ] * Checking battery state... [ ok ] * Starting TiMidity++ ALSA midi emulation... [ ok ] Ubuntu 6.04 "Dapper Drake" Development Branch francois tty1
This is interesting stuff, but it hardly qualifies as a hidden world, and it just doesn't have the Wow! factor my humble waiter is looking for. Yet, despite what I said to François, there are ways to see cities inside your Linux system. It's a bit of a stretch, but some fascinating visualization programs exist—experimental in nature—that try to create a real-world view of the virtual world of processes, memory and, of course, programs. One of these is Rudolf Hersen's ps3 (see the on-line Resources), and to take full advantage of ps3, you need a 3-D video card with acceleration.
Compiling the program is fairly simple, but it does require that you have the SDL development libraries:
tar -xjvf ps3-0.3.0.tar.bz2 cd ps3-0.3.0 make
To run the program, type ./ps3 from the same directory, and you should see a 3-D representation of your process table. When it starts, you may get something other than an ideal view, but that's the whole point of ps3. You can rotate the views in all three axes and look at the process table from above or below. If the processes are too high at the beginning, simply scale them down to something more reasonable. Each process is identified by its program name and its process ID.
Navigating the ps3 display is done entirely with the mouse. Click the left-mouse button and drag to rotate and adjust the height and speed of horizontal rotation. Click and and drag using the right-mouse button to rotate the view horizontally and vertically. The wheel on your mouse lets you zoom in and out. To quit the ps3 viewer, press the letter Q on the keyboard.
ps3 is in no way a scientifically accurate means of viewing system processes, but it is enlightening and entertaining. So now we have virtual buildings and the makings of a virtual city somewhere inside your system. All we're missing now are tanks. Well, I may have an answer to that one as well. It's called BZFlag, and this certainly calls for François to refill our glasses. Mon ami, if you please.
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- RSS Feeds
- Readers' Choice Awards
- Automatically updating Guest Additions
46 min 58 sec ago
- I like your topic on android
1 hour 33 min ago
- Reply to comment | Linux Journal
1 hour 54 min ago
- This is the easiest tutorial
8 hours 9 min ago
- Ahh, the Koolaid.
13 hours 47 min ago
- git-annex assistant
19 hours 47 min ago
- direct cable connection
20 hours 9 min ago
- Agreed on AirDroid. With my
20 hours 20 min ago
- I just learned this
20 hours 24 min ago
20 hours 54 min ago