Monday, September 24, 2007

Wednesday, August 29, 2007

Beta Try

Very nice coverage of the 1 CD KDE 10.3 Beta2 of openSUSE by Linuxseekers.com. Plenty of screenshots and notes. I tried the Beta 1 and found it a really smooth experience, with barely a glitch (only a small one setting up the NTP daemon comes to mind).

Linuxseekers - Preview of the 1-CD openSUSE-10.3-Beta2-KDE-i386.

Tuesday, August 28, 2007

Broken Update

So I had my first broken update yesterday. Given how many different things I'm always installing, and how many different "unofficial" repositories I'm using, I would say openSUSE has done a pretty good job of maintaining its sanity. But I was trying to figure out how to check what apps I had installed that needed updating. This is one thing that Linux in general, and openSUSE in particular, have all over Windows - a central clearing point for application updates. On Windows, every vendor has their own update checker. But with the idea of central clearing spots for application updates, you don't have all this redundant checking going on.


So I wandered through YaST's Software Management to figure out how to get it to tell me what needed to be updated. It isn't obvious and every time I try to do it, I get lost. But actually, it isn't that hard. Package -> All Packages -> Update if newer version available does what I want. It shows a list of all the packages with updates. I don't generally do them all, en masse, but this time I took a chance (even despite the fact it was going to update some base KDE packages too).


All went smoothly, except for the Emacs update. For some reason, the big jump from v21 to v22 isn't available in the mostly standard places I use, but that's okay, as I'm not ready for it. My crfty old .emacs file will require some serious cleanup before it will work with v22 (I still have some v17 stuff in there!). But it did upgrade from 21.3 to 21.4, but in a very half-hearted fashion. It left /usr/bin/emacs, which was the 21.3 version and created a new /usr/bin/emacs21 (which was linked to a non-existent emacs21-nox), as well as a new emacs21-x version, which was the new 21.4. But even that didn't work too well, as it was expecting some lisp folders that weren't linked correctly. And there were some missing lisp files, like url, that I had to install. And then I needed to fix the /etc/emacs folder, as it created a nearly empty /etc/emacs21 folder. Ditto with the /usr/share/emacs and /usr/share/emacs21, where all the system wide lisp gets installed. The /usr/share/emacs21 folder was practically empty, except for the magic subdirs.el file, which I had to copy into the /usr/share/emacs folder. This files makes it so that emacs will find lisp files in subdirectories of /usr/hsare/emacs, like the url package.


So it took some tweaking to get Emacs to work again. I'm not sure what went wrong. Perhaps I grabbed the 21.4 update from a different repository, which used a different directory structure. Dunno. But Emacs is working again, so all is good with the world!



Saturday, August 18, 2007

Game Linux

Yes, you can game with Linux. While many people, including myself, dual boot into Windows in order to get the latest and greatest games, there are a few interesting games that play on Linux. This group of hackers got together and created a Live (ie., bootable) CD based on ArchLinux that plays Linux games without anything being installed. What a great idea!

live.linux-gamers.net
The project live.linuX-gamers.net was founded with the idea to present Linux games at the Linuxtag exhibition in a novel way.


Friday, August 17, 2007

Collaboration

I am going to be contributing to the Linux Brain Dump blog, tossing a few posts over for James to use. I added in a little bit o' bloggage on how to restore GRUB. The Linux Brain Dump blog posts little quizzes, gives short, concise HowTos, and otherwise comments generally on the Linux world. I like the look and style, and have been looking for a blog to contribute to, so I'm glad to join up. Be sure to see James' post The 10 Commandments for New Linux Users, which has generated plenty of comments.

Linux Brain Dump
The goal of this site is to be a one stop source for Linux HowTo’s and Tutorials. While we don’t publish articles specifically targeted at any certain Linux certification test, the information available here would certainly help in attaining that level of knowledge.


Wednesday, August 15, 2007

Forecast for Linux

Whither the Linux kernel? Well, here's a page with your answer:

Linux Weather Forecast - The Linux Foundation
Welcome to the Linux Weather Forecast. This page is an attempt to track ongoing developments in the Linux development community that have a good chance of appearing in a mainline kernel and/or major distros sometime in the near future.


Display This

The newest version of the ATI Proprietary display driver is out, and maybe it is time to really give this a try. I guess there isn't anything too revolutionary in this release (it just went from 8.39.4 to 8.40.4), but I haven't tried this at all. I'm not really into fancy eye candy, so not begin able to run Compiz or some such isn't a big deal. And I don't worry about 3d gaming either. But I could be tempted, I guess.

ATI Proprietary Linux x86 Display Driver 8.40.4



Information Overload

One thing I've talked about before, coming from a FreeBSD world, is the vast amount of Linux information available. Everywhere I look, there's another  Linux news portal, blog, software review site... And that is not even taking into account the sites specifically for a particular distro! But one that I have recently added to my startup bookmarks is The Linux Home Page. Much like daemonnews, it is a news aggregator (in fact, it even includes daemonnews). It has a pretty stark layout, but is information dense and is a good overview of the major Linux and BSD news sites. I give it a quick once over when I fire up my machine and like what I see so far.

Linux Home Page

Tuesday, August 14, 2007

Underappreciated CLI

Eight underutilized CLI tools are examined and explained in this very interesting page from Novell. Here's the eight tools under the microscope:




  • watch - a builtin command

  • jumpgate - 3rd party utility

  • lsof - builtin

  • atop - 3rd party

  • iftop - 3rd party

  • pstree - standard command, albeit with some weird terminal requirements

  • netcat - 3rd party GNU utility

  • strace - standard utility



It's a little strange then, the title and the fact that half of them are third party apps. I would have thought it would concentrate more on standard tools that are underused, not 3rd party apps that you might not know about. But still, a nice list of CLI utilities. I only knew about lsof, iftop, pstree and strace, and only lsof and iftop are part of my standard CLI arsenal, so I was glad to get a refresher course on these tools. Off to YaST to install the 3rd party ones!



Cool Solutions: 8 CLI Tools that are Under-utilized, Sometimes Unknown, or Unappreciated and Yet Pack a Powerful Punch



Monday, August 13, 2007

Stick It to the Man

Cool free software project stickers you can print out and stick on your computer case, either over that silly  3D windows one or after removing it. As I always build my own boxes, I don't have any Windows stickers on them, but I like the looks of these!

Free Software Sticker Book

(from nixCraft)


Simple SUSE

An rpm I wish I knew of when I first installed openSUSE, konvenientSUSE does all the basics to make openSUSE truly usable. Like many Linux distros, openSUSE maintains a "Chinese wall" between the official release and many more-or-less closed pieces often found in the Windows world, like license MP3 compressions and Flash. There's a constant push 'n' pull between providing a "free" distribution and providing a usable one and trying to find a balance between them.

This looks like a nice compromise. The official release doesn't have things like DVD playback (licensed and copyrighted encryption), Java, and Flash. This rpm quickly and easily purports to add them to a base 10.2 installation, as well as adding in some recommended 3rd party package repositories and closed source display drivers. I still need to try and play with the ATI proprietary drivers.

 konvenientSUSE KDE-Apps.org

Thursday, August 9, 2007

How SMART am I?

So I started getting a SMART error on my main hard drive, which means it is on its way out:



SMART Failure Predicted on Primary Master

WARNING: Immediately back-up(sic) your data and replace your hard disk drive. A failure may be imminent.


Scary enough, eh? I think it mostly has to do with the fact it is pretty hot in my office these days, now that I've moved it all the way downstairs. It stopped complaining for a little while, but then started again, so I hurried my replacement steps. Although reading the Wikipedia entry makes me wonder if it really is that big a deal? Maybe I'll use it as a backup drive or something.



Hardware-wise, it wasn't too big a deal. I have an old 800mhz overclocked machine (my Frankenstein machine) that I had pretty much given up on. In it, there are two 160gb hard drives, so I had plenty of disk options. So I cannibalized the Frankenstein machine and off to the dumpster it goes.



One thing I had hoped to use from it was the PC133 memory sticks. It had 768mb of RAM (3 256mb sticks), and my Asus P4S533 motherboard said it could take two DDR sticks and two DIMM PC133 sticks. As I've been limping along with "only" 1gb of RAM, I've been looking to upgrade for a while now. So I figured I would throw in two sticks and get up to 1.5 gb anyway. But no such luck. After I put in the sticks, it was only reporting that I had 512mb of RAM. So I looked more closely at the manual, and there, in small print, was the warning that you couldn't mix the memory types. Oh well, back to 1gb.



Lucky for my hard drive problem, I had one more slot for a hard drive and two more IDE connections via the Promise IDE controller. So after much squeezing and pushing, I wedged one of the 160gb hard drives into the case and proceeded to try and figure out how to best copy my failing partitions.



My first thought was to just format the partitions and use 'rsync'. But of course, that wouldn't work with my NTFS and my DOS partition. I have four partitions on the disk:



sudo /sbin/fdisk -l

Disk /dev/hda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 261 2096451 6 FAT16
/dev/hda2 262 6629 51150960 7 HPFS/NTFS
/dev/hda3 * 6630 20023 107587305 f W95 Ext'd (LBA)
/dev/hda5 * 6630 10453 30716248+ 83 Linux
/dev/hda6 10454 20023 76870993+ 83 Linux


So looked into some partition copying software. It seemed like there were four possibilities:





Funny, while I was looking at this, I noticed a small article on Distrowatch comparing the GParted LiveCD and PartedMagic, I figured I'd also look into GParted, which I was going to use to originally partition my disk anyway. So I booted the GParted cd, repartitioned the new drive to match the old one (well, sort of, as the new one is 160gb and the old one "only" 120gb). Then I noticed you could copy/paste the partition right there in GParted, which I hadn't realized before, so I tried that. It took quite awhile but seemed to work. I rebooted into openSUSE, and /dev/hde looked pretty much like a copy of /dev/hda, which was good. The NTFS partition, however, didn't seem to copy very well.



So I decided to check out Clonezilla, but that experiment didn't last too long, as it refused to boot. A couple of lines of it uncompressing the image and then just hang city. So I tried the SystemRescueCd, which includes GParted. I had a problem with the refresh rates being beyond the ken of either of my monitors, but I tried the Ctrl-Alt-Keypad + trick to change the resolution and sure enough I eventually found one my monitors could deal with. It seems nice, but I'm not sure what it adds to the GParted package, so I tried PartedMagic. It too had a refresh rate problem, so I had to Ctrl-Alt-+ until I found a working one. But it is a pretty nice setup, as Distrowatch mentions. For whatever reason, GParted seemed to work slower on both SystemRescueCd and PartedMagic than on the GParted LiveCD. But still, all three are nice weapons to have in the rescue kit.



But none of them really made it clear to me what I should do next, so I went back to GParted and did the copy / paste thing again. It seemed to work a little better, and so I decided to play some GRUB games and see if I could get the /dev/hde partition to boot. I used the YaST->System->Boot Loader, but the "Suggest Configuration" option just generated a weird menu.lst file, so I didn't use it. Instead, I just copied the boot item for the /dev/hda5 openSUSE partion, changed the root options and booted away. My new entry looked like this:



title XEN -- openSUSE 10.2 - 2.6.18.8-0.5
root (hd2,4)
kernel /boot/xen.gz
module /boot/vmlinuz-2.6.18.8-0.5-xen root=/dev/hde5 vga=0x317 resume=/dev/hdb5 splash=silent showopts
module /boot/initrd-2.6.18.8-0.5-xen


But that didn't really work. It was weird, because the new partition, despite being on the third hard drive, insisted on being call /dev/hda after I booted it. After I changed the root= back to /dev/hda5 (which seemed weird), it would actually boot. I even created a test file, and sure enough, when I booted back into my original openSUSE, the test file was on /dev/hde5. So the drive letters aren't necessarily the "first" drive found (as that is the dying one), but the boot drive. So I went back into GParted, recopied the partitions, and started again.



This time, it seemed ready to try and boot. Oh, I also played some games with Super Grub Disk, which puts a prettier front end on GRUB, as I couldn't seem to get the boot to work correctly. But that just seemed more confusing that the grub commandline, so I gave up after it trashed the MBR for my BootITNg boot manager. After I removed the dying one, and plugged the new one into the old spot, I rebooted. Due to my Super Grub messing around, it booted directly into my openSUSE menu. I picked the default option, and voila, I was into my replacement openSUSE. Woo Hoo!



But my elation was short lived when I re-installed BootItNG. When I selected my openSUSE partition, I got the dreaded "GRUB..." in to the top left corner, then nothing. So I tried to find my page that told me how to re-install grub onto the openSUSE partition, but they seemed to have gone and ruined it on the Ubuntu wiki. There was a very short, concise, formula for installing GRUB onto any ol' partition, but now it has pages and pages of verbose instructions with nary a word as to what is going on. But I dug deep into my Google-fu and found the correct instructions. They are actually pretty straightforward, so I booted the PartedMagic CD, went to the commandline, and:



# grub
grub> find /boot/grub/stage1
(hd0,4)
(hd1,5)

grub> root (hd0,4)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,4)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0,4)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,4)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,4) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub> quit


The first line finds all the partitions that have GRUB installed on them. The second line sets GRUBs root to a partition. The third line tells it to install the changes into the correct partition (as opposed to hd0, which overwrites the main MBR again). Then you quit and reboot. Once again, I was back in business.



So the end result was really just to use GParted. Like I said, I thought the GParted LiveCD seemed to work faster, although I'm pretty sure all the rescue CDs had the same version of GParted. I liked PartedMagic as a rescue CD and will continue to use that. Windows XP booted okay, but now it is hanging somewhere, so I'm not sure what to make of that. I just boot into it to play games, but I need to figure that out.




Beta Time

I figure as a plaything, I'll give the new openSUSE 10.3 Beta 1 a try, so I'm downloading the DVD version via Bittorrent as we "speak".

openSUSE News » Blog Archive » Announcing openSUSE 10.3 Beta 1
The openSUSE team is proud to announce the first Beta release of openSUSE 10.3.


Tuesday, August 7, 2007

More Wallpapers

A good list of high quality, free, photos to use as wallpapers. This includes really big sizes like 2560x1600 and really small sizes, like for an iPhone or iPod.

InterfaceLIFT: High-Resolution Widescreen Wallpaper (by date)

Monday, August 6, 2007

Kick the tires on an HP machine

Cool site using virtual technology that allows you to try out new HP hardware with cutting edge software.  I'm checking out a Blade server as we speak! Basically, you get telnet access to the systems, and you can try out some commercial software, like Intel's compilers and Oracle's database. Here's the list of operatings systems available:




  1. HP-UX 11

  2. Windows Server 2003

  3. Debian GNU Linux 4.0

  4. Mandriva Corporpate Server 4.0

  5. Oracle Enterprise Linux 4

  6. Red Hant Enterprise 5

  7. SuSE Enterprise 10

  8. FreeBSD 6.2



Otherwise, it is mostly just to check out some tools, mostly HP ones (like Code Advisor). Still, pretty cool.



Hewlett-Packard Test Drive


Want to try the latest technologies over the Internet? This program allows you to testdrive some of the hottest hardware and operating systems available today. Have you ever wanted to try out HP's exciting 64-bit Integrity and PA-RISC technology? Get time on SMP x86 and Opteron ProLiant servers? Try out a Blade server. Try different Open Source operating systems. Do it here! Just register for an account and fasten your seatbelt!


Thursday, August 2, 2007

Faster Web Sites

Here are some rules to make your web site faster and gooder. These thirteen rules can be enforced via the new Yahoo Firefox plugin called YSlow, which will examine a web site and tell you how well it does using these rules. In my recent Javascript fixation, I am particularly interested in rule 11. Here are the rules:

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires Header
  4. Gzip Components
  5. Put CSS at the Top
  6. Move Scripts to the Bottom
  7. Avoid CSS Expressions
  8. Make JavaScript and CSS External
  9. Reduce DNS Lookups
  10. Minify JavaScript
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags

Thirteen Simple Rules for Speeding Up Your Web Site

Sunday, July 29, 2007

Kiddie Koruption

A few great pages if you are like me and would like to lead your kids down the programming path. I haven't tried any of them yet, but watching the passively play lame Webkinz games is driving me crazy. I have to get them creating things, instead of watching things. I'll let you know of any progress I make.

How To: Teach a child to program - Lifehacker
Teach a Kid to Program / Wired How To's
O'Reilly Radar > Why Johnny Can't Program

Wednesday, July 25, 2007

Leaving Linux Kernels

Interesting interview with Con Kolivas, prolific kernel contributor. He talks about the whys and wherefores when it comes to kernel developing, and dealing with Linux people.

Why I quit: kernel developer Con Kolivas | APC Magazine

Tuesday, July 24, 2007

The One True Alt-Tab

Here I described how to get Alt-Tab to work like it is supposed to work - including all the windows on all the screens by setting a new option SeparateScreenFocus to true. Well, it turns out that there was a bug in the option and, in fact, you are supposed to set the option to be false in order to get the One True Behaviour. So after my latest KDE upgrade, Alt-Tab stopped working the way it was supposed to work and went back to the braindead way of just showing windows on the current screen. But after reading the bug report, I went back and set the option to false and once again, I'm in Alt-Tab heaven. I'll update that page too.


Wednesday, July 18, 2007

Now Now, be a good mailing list

An interesting paper on mailing lists, and how to both effectively use them and be a good mailing list citizen. I'm a huge mailing list fan, as I find them so much easier to read than every forum I have ever found on the web.  This is especially true when you read them via Gmane, which lets me use the even more effective newsreader ui from Thunderbird. I have yet to find a forum that lets me read and contribute information nearly as well as a threaded newsreader.

How to Help Mailing Lists Help Readers (Results of Recent Data Analysis)

Monday, July 16, 2007

Yet Another Linux Page

Here's Yet Another Linux page. Linux Links pulls together links, news, software descriptions and the like, but is organized very cleanly. It calls itself "The Linux Portal", so I guess that explains it all...

Linux Links - The Linux Portal

Friday, July 13, 2007

Twittery

Okay, so I started using Twitter and, of course, whenever I start to use something like this, I start trying to use it as efficiently as possible. Unfortunately, the Emacs Twitter tool on the Emacs wiki doesn't seem to work for me very well. I'm using v21, which gives me some kind of error return from the URL fetch. And I would like something easy to use from the command line too, so I worked up this little bash function, which uses curl (obviously):


function twit() {
curl -s -u twituser:twitpass -d "status=$*" http://twitter.com/statuses/update.xml >/dev/null
}


Now I can just type in twit This is an update and the update goes right to twitter. Oh, goodie goodie!



Twitter Fan Wiki / API Docs






Sunday, July 1, 2007

Google Linux Repositories

Cool page showing how to configure various Linux distros for including updates to Google Linux apps (which at this point is only Google Desktop and Google Picasa). The step by step GUI configuration lists Ubuntu 7.04 (Feisty), Debian GNU/Linux 4.0 and openSUES 10.2, while the command line list includes APT, YUM, urpmi, YaST2, and RPM.



Google Linux Software Repositories




Monday, June 25, 2007

Novell Linux Hack Week

Again, say what you will about "sleeping with the devil", but I still like the way Novell is going about embracing Linux. openSUSE has just been working for me and I've been very happy with the support. Now, they just announced "Hack Week", where the Linux engineers get a week to work on whatever Linux or open source project they want. Here's the blog documenting their efforts.

start @ Idea Pool


Hack Week is here! For the week of June 25 - 29, Novell is setting our entire Linux engineering team loose to hack on Linux or open source projects that they are personally passionate about. To make it easier for hackers to find and publicize their projects, we’ve created this web site where our ideas are shared and where we’ll post updates.


Thursday, June 21, 2007

Symbolic Help

Today's obscure Unix command is namei, or the ol' "follow a pathname until a terminal point is found" command. You pass it a pathname and it will print out each "piece" of that path name, tell you what it is, and move down. This is particularly handy for figuring out what, if any, parts of a path are some kind of symbolic link. For instance, I have a partition mounted on /data, where I've created a folder for my user to use:


$ ls -l /data
total 20K
drwxr-xr-x 8 jdarnold users 4.0K Jun 21 14:58 jdarnold
drwx------ 2 root root 16K May 4 15:54 lost+found
$ ls -ld data
lrwxrwxrwx 1 jdarnold users 14 May 7 10:21 data -> /data/jdarnold
$ namei /home/jdarnold/data/message.backup
f: /home/jdarnold/data/message.backup
d /
d home
d jdarnold
l data -> /data/jdarnold
d /
d data
d jdarnold
- message.backup


Not the most critical tool in your belt, but it still might come in handy, especially, as the man page says, in those times of "too many levels of symbolic links" errors.




Another cool KDE shortcut

Perusing the KDE FAQ, I can across this:

Chapter 14. Useful tips
Move or resize windows quickly To move a window, use Alt+left mouse button. Alt+right mouse button will resize the window. Last but not least, Alt+middle mouse button raises/lowers the window. The KDE Control Center allows you to change these mouse bindings.


Thursday, June 14, 2007

Walking on Sunshine

Sorry it has been so quiet, but it has been that way for two very good and positive reasons:




  1. Everything has been working all too smoothly. openSUSE has just been solid, needing virtually no twiddling at all. Complain all you might want about Novell, but when something works as well as openSUSE does, I'm all over it!

  2. And I just haven't had the time to fiddle. There's a few things I want to try, but with summer coming, and a new release imminent, I just haven't had the time or desire to futz about with the computer.



I have a few things in the queue to work on, and I'll post my results. But until then, I'll leave you with these little KDE shortcuts that I truly miss on Windows:




  • Maximize a window, both vertically and horizontally - left click on the Maximize button (duh)

  • Maximize a window, just vertically - middle click on the Maximize button

  • Maximize a window, just horizontally - right click on the Maximize button




Friday, June 1, 2007

Religious War, continued

A fairly balanced, even look at the similarities and differences between Linux and FreeBSD, which are actually much more alike, especially at the user level, than you might think.

Comparing GNU/Linux and FreeBSD

Thursday, May 31, 2007

Prettier Firefox

Some kind of theme/style hack to make the buttons and other form controls look nicer under Linux. Not being much of a gourmet when it comes to visual niceties, I don't really see too much difference. And it does require you to register at the Ubuntu forums to download it, so I probably won't bother. But I would guess it would work for any KDE or Gnome based Firefox installation. If you try it, let me know.

Hackszine.com: Beautify Firefox widgets in Ubuntu

Tuesday, May 29, 2007

Monday, May 28, 2007

Tuning your LAMP

Nice set of articles from Big Blue on LAMP (Linux, Apache, MySQL, PHP/Perl), covering how to tune your setup to its most efficient.

developerWorks : Linux : Tuning LAMP systems


(Thanks to nixCraft for the pointer)


Friday, May 25, 2007

Equivalence

A couple of nice pages listing Linux equivalents to popular Windows software. I've blogged about the first one before, but the second one is new to me. It is a little out of date, but seems to be more encompassing.


The Linux Equivalent Project - linuxeq.com

The table of equivalents / replacements / analogs of Windows software in Linux



Tuesday, May 22, 2007

Get Closer To Windows

Nice, short, to the point posting about how to easily and efficiently integrate your Linux box into a Windows network. It allows for easy navigation to Windows shares. I gotta try this!



Cool Solutions: Integrating Your Linux Host into a Windows Environment




Sunday, May 20, 2007

Becoming SMART

I have started to run into a couple of small problems with the YaST software installer, besides the general slowness of everything, so I have decided to embark upon my SMART journey. I'm going to follow the instructions found here (man, there sure are a lot of wiki's out there!).



The first thing I learned was about the existence of /etc/SuSE-release, which is a simple text file describing the installed version of openSUSE:



$ cat /etc/SuSE-release
openSUSE 10.2 (i586)
VERSION = 10.2


Okay, so as predicted, I'm running openSUSE 10.2. And I think I have all the correct files installed:



$ rpm -q python-xml python-elementtree rpm-python
python-xml-2.5-19
package python-elementtree is not installed
rpm-python-4.4.2-76


Oops, I guess I don't. I wonder if python-elementtree is really necessary, as I'm sure if it was that my YaST installation would have taken care of it? Looking into it, it isn't listed as a dependency and YaST says it isn't installed alright. So I'll install it via YaST, rather than use the commandline as found in the web page. Hold on a sec... Okay, let's check again:



$ rpm -q python-xml python-elementtree rpm-python
python-xml-2.5-19
python-elementtree-1.2.6-41
rpm-python-4.4.2-76


There, that's better. Now, it's time to fire up SMART as root.



$ su -c "smart update"
Password:
New channel 'Packman 3rd Party Package Repository (packman)' detected.
Include it? (Y/n):

New channel 'Current KDE applications (suse-kde-backports)' detected.
Include it? (Y/n):

New channel 'Guru smart repository (smart)' detected.
Include it? (Y/n):

New channel 'Latest mozilla.org packages (suse-mozilla)' detected.
Include it? (Y/n):

New channel 'Latest KDE packages (suse-kde)' detected.
Include it? (Y/n): n

New channel 'SUSE 10.2 Repository (suse)' detected.
Include it? (Y/n):

New channel 'SUSE 10.2 Add-On Repository with non-OSS Packages (suse-non-oss)' detected.
Include it? (Y/n):

New channel 'Guru 3rd party package repository (guru)' detected.
Include it? (Y/n):

New channel 'Latest wine packages (suse-wine)' detected.
Include it? (Y/n):

New channel 'SUSE Linux Online Updates (suse-update)' detected.
Include it? (Y/n):

Updating cache...


I didn't enable 'Latest KDE packages (suse-kde)' because of the warning on the web page, although I'm a little confused. I really don't want to be cutting edge. I have no need for the latest in graphical ui technology, so I'm pretty happy to stay with the stable release when it comes to my desktop environment. But I have to wonder if 'suse-kde' is really the "highly experimental" version? After the "Updating cache", it did plenty of fetching. Let this be a warning - don't do it in your Emacs shell window, as it wants to do the kinds of redrawing found only in Konsole. It took about five minutes to do all my channels. Then I installed the gui.



$ su
Password:
# rpm --import http://linux01.gwdg.de/~pbleser/guru-rpm.asc
# smart install smart-gui
Updating cache... ######################################################### [100%]

Computing transaction...

Upgrading packages (4):
smart-0.51-1.guru.suse102@i686 smart-gui-0.51-1.guru.suse102@i686
smart-addons-0.51-1.guru.suse102@i686 smart-ksmarttray-0.51-1.guru.suse102@i686

2.8MB of package files are needed. 1.2MB will be freed.

Confirm changes? (Y/n):

Fetching packages...
-> http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/RPMS/i686/smart-0.51-1.guru.suse102.i686.rpm
-> http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/.../smart-ksmarttray-0.51-1.guru.suse102.i686.rpm
smart-ksmarttray-0.51-1.guru.suse102.i6.. ######################################################### [ 25%]
-> http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/RPMS/i686/smart-gui-0.51-1.guru.suse102.i686.rpm
smart-gui-0.51-1.guru.suse102.i686.rpm ######################################################### [ 50%]
-> http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/.../smart-addons-0.51-1.guru.suse102.i686.rpm
smart-0.51-1.guru.suse102.i686.rpm ######################################################### [100%]


Committing transaction...
Preparing... ######################################################### [ 0%]
1:Installing smart ######################################################### [ 12%]
2:Cleaning smart ######################################################### [ 25%]
3:Installing smart-ksmarttray ######################################################### [ 37%]
4:Cleaning smart-ksmarttray ######################################################### [ 50%]
5:Installing smart-gui ######################################################### [ 62%]
6:Cleaning smart-gui ######################################################### [ 75%]
7:Installing smart-addons ######################################################### [ 87%]
8:Cleaning smart-addons ######################################################### [100%]

Saving cache...

# smart --gui




I have to admit, I like the YaST window a little more, as there seems to be more options, but it surely is faster. From command to dialog takes about 30 seconds, while YaST takes a good couple of minutes. And it seems to have found lots and lots of packages to update. We'll see how screwed up it makes my system!




Does anyone really know what time it is?

There was an interesting discussion on the opensuse mailing list about finding out which command is going to get used when you type something in. The Original Poster (OP) couldn't figure out why some options found in the time man page weren't working:



$ time -o ls
bash: -o: command not found

real 0m0.008s
user 0m0.000s
sys 0m0.000s
$ time --help
bash: --help: command not found

real 0m0.003s
user 0m0.000s
sys 0m0.008s
$


Of course, any veteran of the commandline could tell you it is not executing the time command as documented in the man page, but some other time command, in this case bash's builtin time command, which doesn't have the -o or the --help options. So you have to tell the shell exactly which command you are looking to execute, or use bash's man page or help command to get info on its version:



$ /usr/bin/time -o t.out ls
$ /usr/bin/time --help
Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append] [--verbose]
[--portability] [--format=format] [--output=file] [--version]
[--help] command [arg...]
$ help time
time: time [-p] PIPELINE
Execute PIPELINE and print a summary of the real time, user CPU time,
and system CPU time spent executing PIPELINE when it terminates.
The return status is the return status of PIPELINE. The `-p' option
prints the timing summary in a slightly different format. This uses
the value of the TIMEFORMAT variable as the output format.
times: times
Print the accumulated user and system times for processes run from
the shell.


So the discussion evolved into answering the important question - "How can you tell which command is actually getting executed when you don't type in the full path?" One hint is in the question - use the which command:



$ which time
/usr/bin/time
$ which -a time
/usr/bin/time
$


Hmm, now that doesn't work! That's what I had always used, especially the -a flag, which should show all versions of the command, rather than just the first one. It turns out a better option is bash's builtin type command, which does know about aliases and builtins:



$ type time
time is a shell keyword
$ type -a time
time is a shell keyword
time is /usr/bin/time
$


Okay, that's much better, although the suggestion to use the -p option just makes it revert back to the mysteriously incomplete which output:



$ type -ap time
/usr/bin/time
$ help type
type: type [-afptP] name [name ...]
For each NAME, indicate how it would be interpreted if used as a
command name.

If the -t option is used, `type' outputs a single word which is one of
`alias', `keyword', `function', `builtin', `file' or `', if NAME is an
alias, shell reserved word, shell function, shell builtin, disk file,
or unfound, respectively.

If the -p flag is used, `type' either returns the name of the disk
file that would be executed, or nothing if `type -t NAME' would not
return `file'.

If the -a flag is used, `type' displays all of the places that contain
an executable named `file'. This includes aliases, builtins, and
functions, if and only if the -p flag is not also used.

The -f flag suppresses shell function lookup.

The -P flag forces a PATH search for each NAME, even if it is an alias,
builtin, or function, and returns the name of the disk file that would
be executed.
typeset: typeset [-afFirtx] [-p] name[=value] ...
Obsolete. See `declare'.


So I learned about the type command, which is really what you want to use. But then I started investigating the which command, which led to a surprise:



$ type -a which
which is aliased to `_which'
which is /usr/bin/which
$ type -a _which
_which is a function
_which ()
{
local file=$(type -p ${1+"$@"} 2>/dev/null);
if test -n "$file" -a -x "$file"; then
echo "$file";
return 0;
fi;
hash -r;
type -P ${1+"$@"}
}


Whoa, where did that come from? A quick perusal of the bash man page tells me bash, on start up:



       When  bash  is  invoked  as an interactive login shell, or as a non-interactive shell
with the --login option, it first reads and executes commands from the file /etc/pro-
file, if that file exists. After reading that file, it looks for ~/.bash_profile,
~/.bash_login, and ~/.profile, in that order, and reads and executes commands from
the first one that exists and is readable. The --noprofile option may be used when
the shell is started to inhibit this behavior.


So I checked out /etc/profile, which is a very long shell script doing all kinds of interesting things, worth a post all in its own. But one of the last things it does is to execute /etc/bash.bashrc, which again is a fascinating script setting a whole bunch of mostly bash-specific things, again worth a look at in itself. In there, a whole bunch of aliases get set up and there is this section:




if test "$is" = "bash" ; then
#
# Other shells use the which command in path (e.g. ash) or
# their own builtin for the which command (e.g. ksh and zsh).
#
_which () {
local file=$(type -p ${1+"$@"} 2>/dev/null)
if test -n "$file" -a -x "$file"; then
echo "$file"
return 0
fi
hash -r
type -P ${1+"$@"}
}
alias which=_which
fi


Interesting. I wonder why they do this instead of using the /usr/bin/which command in the path? It doesn't seem to improve anything over the system which command except add an unnecessary layer of obfuscation.



But I will look over my .bashrc file, which, much like my .emacs file, has accompanied me for many years, to see what I should remove as redundant, as the openSUSE standard one does a lot of it already. I wonder how standard it is on other Linux distros? Looks like I'll have to check the MACHTYPE environment variable for the Linux type:



jdarnold@opensuse $ echo $MACHTYPE
i686-suse-linux
$


jarnold@redhat $ echo $MACHTYPE
i386-redhat-linux-gnu
$




Thursday, May 17, 2007

Terminally Yours

Most Unix and Linux distros have what are called "virtual terminals". You reach these by hitting Ctrl-Alt-F key, where F1-F12 bring you to virtual terminal 1 through 12. A couple of them are special ones:




  • F1 : Virtual terminal 1 is the 'boot terminal', where you will see all the boot up messages. In FreeBSD, it is also where system console messages are displayed.

  • F7 or F8 : In most Linux distros, F7 is the X server terminal, while in FreeBSD it is generally F8

  • F10 : In openSUSE anyway, the F10 terminal is where console messages get dumped after boot up, much like F1 is used in FreeBSD. Not sure if this is true in other Linux distros, but I imagine it is.



So if you hit Ctrl-Alt-F2 (all at the same time), you will be brought to a text mode login screen. From here you can login and do what you want. I usually have a root login on my F2 terminal, just to make admin easy.



You can even set up another X server on other virtual terminals. This means you can do cool stuff like run both GNOME and KDE at the same time. This command will fire up a GNOME session and associate it with the Ctrl-Alt-F8 terminal:



# startx gnome -- :3


Now, for me, Ctrl-Alt-F7 brings me to my KDE desktop, while Ctrl-Alt-F8 brings me to my GNOME desktop. Of course, I need lots more RAM to actually do this. 1gb just isn't going to hack it!



Another thing to note is that from a text mode terminal, you only have to use the Alt-Fkey shortcut. Ctrl-Alt-Fkey works too, so I just use that. And most installations don't have terminals on F9-F12, although you can turn them on. In FreeBSD, check the /etc/ttys file, and in Linux check the /etc/inittab file.




Wednesday, May 16, 2007

Out Damned Spot!

Want a quick way to kill a frozen process? If it has a window, you can use the KDE shortcut of ctrl-alt-esc. This turns the mouse cursor into a skull and crossbones (argh!) and the controlling application of the next window you click on will be sent a 'kill -9'. It's a very abrupt but final death. Another related KDE shortcut is "ctrl-esc", which brings up Ksysguard, its Task Manager.



See this page for some more info:



Dealing with Runaway Processes - Yet Another Linux Blog



Tuesday, May 15, 2007

More Linux Words

One thing I have really come to appreciate Linux for - the wealth of information sources out there, both printed and on the web. I'm a real glutton for information, especially printed information, even in today's web-based world, as my groaning bookshelves can attest. And this even after throwing away 3 boxes of books during the great office move! And moving to Linux has opened up a whole brave new world of hernia-inducing books and magazines.



As I mentioned before, I've been checking out the plethora of Linux magazines. My most recent purchase was Linux Format, a UK import. Wow, what a great magazine! Jam packed with excellent articles,including short blurbs, solid reviews, in-depth explorations of things like source code control software, and tutorials for both the beginner and expert. The layout is splashy without being annoying, the editing is tight, with no annoying typos or other graphical glitches (hello, Linux+, are you listening?). The included DVD is a triple boot DVD, with openSUSE 10.2, Mandriva One Metisse and GNewSense 1.0, plus a bunch of eBoooks and 500 HTML pages of documentation. I am tempted to subscribe, but US$180 for 13 issues is a little steep, especially as I feel most of the cost is for two things I won't get full use out of - the tran-Atlantic postage and the DVD. I'm just not sure I need a DVD, as any distro I'm interested in I would just download and any packages I want to use I would prefer to get from an "official" openSUSE source. But I am sorely tempted.



They also have a couple of book reviews, including one for a recent purchase that has really wowed me. They give Linux Administration Handbook, 2nd Edition a 9 out 10, but personally I would go to 11 for it. Every page is densely packed with information and new stuff shows up so often I had to run out and pick up a three pack of highlight markers with page Post-its just to save the information for later! Really clever writing and solid information - a winning combination. Glad I scarfed this up at 50% off. Run, don't walk, to pick this book up.



Linux Administration Handbook, Second Edition, reflects the current versions
of these leading distributions:



  • Red Hat Enterprise Linux

  • Fedora Core

  • SUSE Linux Enterprise

  • Debian GNU/Linux

  • Ubuntu Linux





Wednesday, May 9, 2007

SMART Installing


I have decided to give SMART a chance on my openSUSE machine. YaST has been working fine, it is just remarkably slow when it first starts up. It has to load all the dependencies, foreign package source info files, etc, and can take three or four minutes to start up. I suppose I should follow my usual maxim and not try to fix something that isn't broken, because beside the slow start up time, I haven't been able to break YaST, and I'm usually pretty good at breaking application installers. So to complain about a 3 minute startup delay seems to be looking a gift horse in the mouth.



So that makes three package managers available with openSUSE - YaST is the standard one, ZMD is the new "corporate" one and SMART is the third party "better faster smaller" one. Zmd is the ZENworks Management Daemon, introduced as the default installer in 10.1, much to the chagrin of many. It remained the default in 10.2 but it seems in the latest news for 10.3, ZMD will be dropped in favor of getting YaST working better.



At its core, openSUSE uses RPMs as its packages, and these other things are just nice front ends to the remarkably complex flexible RPM command:



$ rpm --help
Usage: rpm [OPTION...]

Query options (with -q or --query):
-c, --configfiles list all configuration files
-d, --docfiles list all documentation files
--dump dump basic file information
-l, --list list files in package
-P, --patches list patches or patched files
--queryformat=QUERYFORMAT use the following query format
-s, --state display the states of the listed files
-a, --all query/verify all packages
-f, --file query/verify package(s) owning file
-g, --group query/verify package(s) in group
-p, --package query/verify a package file
-W, --ftswalk query/verify package(s) from TOP file tree
walk
--pkgid query/verify package(s) with package
identifier
--hdrid query/verify package(s) with header
identifier
--fileid query/verify package(s) with file identifier
--specfile query a spec file
--triggeredby query the package(s) triggered by the
package
--whatrequires query/verify the package(s) which require a
dependency
--whatprovides query/verify the package(s) which provide a
dependency
--nomanifest do not process non-package files as
manifests

Verify options (with -V or --verify):
--nomd5 don't verify MD5 digest of files
--nofiles don't verify files in package
--nodeps don't verify package dependencies
--noscript don't execute verify script(s)
-a, --all query/verify all packages
-f, --file query/verify package(s) owning file
-g, --group query/verify package(s) in group
-p, --package query/verify a package file
-W, --ftswalk query/verify package(s) from TOP file tree
walk
--pkgid query/verify package(s) with package
identifier
--hdrid query/verify package(s) with header
identifier
--fileid query/verify package(s) with file identifier
--specfile query a spec file
--triggeredby query the package(s) triggered by the
package
--whatrequires query/verify the package(s) which require a
dependency
--whatprovides query/verify the package(s) which provide a
dependency
--nomanifest do not process non-package files as
manifests

File tree walk options (with --ftswalk):
--comfollow FTS_COMFOLLOW: follow command line symlinks
--logical FTS_LOGICAL: logical walk
--nochdir FTS_NOCHDIR: don't change directories
--nostat FTS_NOSTAT: don't get stat info
--physical FTS_PHYSICAL: physical walk
--seedot FTS_SEEDOT: return dot and dot-dot
--xdev FTS_XDEV: don't cross devices
--whiteout FTS_WHITEOUT: return whiteout information

Signature options:
--addsign sign package(s) (identical to --resign)
-K, --checksig verify package signature(s)
--delsign delete package signatures
--import import an armored public key
--resign sign package(s) (identical to --addsign)
--nodigest don't verify package digest(s)
--nosignature don't verify package signature(s)

Database options:
--initdb initialize database
--rebuilddb rebuild database inverted lists from
installed package headers

Install/Upgrade/Erase options:
--aid add suggested packages to transaction
--allfiles install all files, even configurations
which might otherwise be skipped
--allmatches remove all packages which match <package>
(normally an error is generated if
<package> specified multiple packages)
--badreloc relocate files in non-relocatable package
-e, --erase=<package>+ erase (uninstall) package
--excludedocs do not install documentation
--excludepath=<path> skip files with leading component <path>
--fileconflicts detect file conflicts between packages
--force short hand for --replacepkgs --replacefiles
-F, --freshen=<packagefile>+ upgrade package(s) if already installed
-h, --hash print hash marks as package installs (good
with -v)
--ignorearch don't verify package architecture
--ignoreos don't verify package operating system
--ignoresize don't check disk space before installing
-i, --install install package(s)
--justdb update the database, but do not modify the
filesystem
--nodeps do not verify package dependencies
--nomd5 don't verify MD5 digest of files
--nocontexts don't install file security contexts
--noorder do not reorder package installation to
satisfy dependencies
--nosuggest do not suggest missing dependency
resolution(s)
--noscripts do not execute package scriptlet(s)
--notriggers do not execute any scriptlet(s) triggered
by this package
--oldpackage upgrade to an old version of the package
(--force on upgrades does this
automatically)
--percent print percentages as package installs
--prefix=<dir> relocate the package to <dir>, if
relocatable
--relocate=<old>=<new> relocate files from path <old> to <new>
--repackage save erased package files by repackaging
--replacefiles ignore file conflicts between packages
--replacepkgs reinstall if the package is already present
--test don't install, but tell if it would work or
not
-U, --upgrade=<packagefile>+ upgrade package(s)

Common options for all rpm modes and executables:
-D, --define='MACRO EXPR' define MACRO with value EXPR
-E, --eval='EXPR' print macro expansion of EXPR
--macros=<FILE:...> read <FILE:...> instead of default file(s)
--nodigest don't verify package digest(s)
--nosignature don't verify package signature(s)
--rcfile=<FILE:...> read <FILE:...> instead of default file(s)
-r, --root=ROOT use ROOT as top level directory (default:
"/")
--querytags display known query tags
--showrc display final rpmrc and macro configuration
--quiet provide less detailed output
-v, --verbose provide more detailed output
--version print the version of rpm being used

Options implemented via popt alias/exec:
--scripts list install/erase scriptlets from
package(s)
--setperms set permissions of files in a package
--setugids set user/group ownership of files in a
package
--conflicts list capabilities this package conflicts
with
--obsoletes list other packages removed by installing
this package
--provides list capabilities that this package provides
--requires list capabilities required by package(s)
--suggests list capabilities this package suggests
--recommends list capabilities this package recommends
--enhances list capabilities this package enhances
--supplements list capabilities this package supplements
--basedon list packages this patch-rpm is based on
--info list descriptive information from package(s)
--changelog list change logs for this package
--xml list metadata in xml
--triggers list trigger scriptlets from package(s)
--last list package(s) by install time, most
recent first
--filesbypkg list all files from each package
--fileclass list file names with classes
--filecolor list file names with colors
--filecontext list file names with security context from
header
--fscontext list file names with security context from
file system
--recontext list file names with security context from
policy RE
--fileprovide list file names with provides
--filerequire list file names with requires
--fileclass list file names with classes
--filecolor list file names with colors
--buildpolicy=<policy> set buildroot <policy> (e.g. compress man
pages)
--with=<option> enable configure <option> for build
--without=<option> disable configure <option> for build

Help options:
-?, --help Show this help message
--usage Display brief usage message


SMART promises better package management, always a real trial for every distribution. It gets high marks from many openSUSErs, and I figure I'll give it a go to see what happens.



I actually installed my first non-YaST package the other day. You have to be careful when installing new software, especially using the standard ./configure && make install method, as this circumvents the rpm package stuff and makes the package database obsolete. So you should always use an rpm to install stuff. According to this page, you don't need to necessarily use a "SUSE rpm", that any rpm should work. But you can also use checkinstall to do your work and create an rpm for you. You just replace the make install step with checkinstall, and it creates an rpm for you. From there, you can just do an rpm -i to install it. I did this with Crypto++ library and it worked like a charm.



$ cd cryptopp
$ ./configure
$ su -c checkinstall
checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.



**************************************
**** RPM package creation selected ***
**************************************

This package will be built according to these values:

1 - Summary: [ libcryptopp, v5.5 ]
2 - Name: [ cryptopp ]
3 - Version: [ 20070510 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ cryptopp ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ cryptopp ]

Enter a number to change any of them or press ENTER to continue: 4
Enter new release number:
>> 5.5

This package will be built according to these values:

1 - Summary: [ libcryptopp, v5.5 ]
2 - Name: [ cryptopp ]
3 - Version: [ 20070510 ]
4 - Release: [ 5.5 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ cryptopp ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ cryptopp ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results ===========================
mkdir -p /usr/include/crypto /usr/lib /usr/bin
cp *.h /usr/include/crypto
cp *.a /usr/lib
cp *.exe /usr/bin

======================== Installation successful ==========================

Copying documentation directory...
./
./Readme.txt

Copying files to the temporary directory...OK

Compressing man pages...OK

Building file list...OK

Building RPM package...OK

NOTE: The package will not be installed

Erasing temporary files...OK

Writing backup package...OK

Deleting temp dir...OK


**********************************************************************

Done. The new package has been saved to

/usr/src/packages/RPMS/i386/cryptopp-20070510-5.5.i386.rpm
You can install it in your system anytime using:

rpm -i cryptopp-20070510-5.5.i386.rpm

**********************************************************************




Monday, May 7, 2007

Keeping the Agent Around

I answered an interesting question on the Suse Forums today, and I thought I would log my answer here too. Teresa wanted to know how to have ssh-agent remember her passkey across multiple shell logins and the like. I answered the question here for how to do it when you are using X, but she was doing everything from the console and so didn't have the luxury of an overarching environment.



When you run 'ssh-agent', it starts up a process that listens on a local socket, and prints out some info you can use to set environment variables with, which then tell other programs where to ask it for info:



$ ssh-agent -s
SSH_AUTH_SOCK=/tmp/ssh-CzngL4914/agent.4914; export SSH_AUTH_SOCK;
SSH_AGENT_PID=4915; export SSH_AGENT_PID;
echo Agent pid 4915;


So normally you "eval" the results of this to actually create the environment variables, so you put something like this in your .bashrc:



eval `ssh-agent -s`


But if instead you dump that to a file, you can now use this in any other virtual terminal, say, or another screen session, rather than killing the old one, starting up a new ssh-agent, and adding the key again.



$ ssh-agent -s > sshx
$ cat sshx
SSH_AUTH_SOCK=/tmp/ssh-CzngL4914/agent.4914; export SSH_AUTH_SOCK;
SSH_AGENT_PID=4915; export SSH_AGENT_PID;
echo Agent pid 4915;
$ eval `cat sshx`
Agent pid 4915
$ printenv |grep SSH_
SSH_AUTH_SOCK=/tmp/ssh-CzngL4914/agent.4914
SSH_AGENT_PID=4915


Now any keys you ssh-add to this ssh-agent will be effective in any other shell. It doesn't look like you need to use the nohup command with ssh-agent, as it automagically works as a daemon already, so as long as you use the correct environment variables, you should be communicated with that one no matter what.




Java Is Evil

Yeah, this is more or less how I feel about Java:



Classics Week: The Call of Codethulhu - Worse Than Failure



Sunday, May 6, 2007

Tab-way to Heaven

Yay! I finally solved the biggest small annoyance I currently had on my new openSUSE box. I'm using KDE, with dual monitors and two desktops, and Alt-Tab wasn't showing apps currently running on the "other" monitor. It was very weird. I did enable the setting to go through all the desktops, which is hard enough to find. KDE Control Center -> Desktop -> Window Behavior, and select the "Traverse windows on all desktops" option, which is the only right solution, as that is the easiest way to go from desktop to desktop. I'm not a huge fan of multiple desktops, but they work much better on KDE than they do using any of the various hacks to enable them on Windows.



But, oddly enough, ever since I began running openSUSE, Alt-Tab would only show me windows that were displayed on the current *monitor*. It would correctly show me ones on both desktops, but not both monitors, which drove me crazy. I asked a few different places for a solution, to no avail. But my latest plea on the opensuse-kde mailing list got me an answer!



It seems the latest version of KDE added a few Xinerama "improvements", as listed here. One of these "improvements" is that the Alt-tab list of windows can be restricted to a single screen (monitor), as someone even claimed that having alt-tab show all the windows was a bug, which is insane. And just about as crazy is that this new option was made the default! I could see that some deranged individuals might actually desire having alt-tab only show windows on the current monitor, but to make that the new default option is a mistake.



And, even better, another response showed me a quickie way to set this new, undocumented, no-UI option:



$ kwriteconfig --file kwinrc --group Windows --key SeparateScreenFocus --type bool true
$ dcop kwin default reconfigure


kwriteconfig is one of those well-nigh undocumented KDE helper apps, which abound, and include the vitally important dcop, which is a way of sending commands from the commandline to windows. So this makes the SeparateScreenFocus option true and tells KDE to re-read its configuration data. You can also edit ~/.kde/share/config/kwinrc by hand, setting the value to what you want:




  • true: show windows on all screens in alt+tab

  • false: only show windows on current screen in alt+tab


1

Thursday, May 3, 2007

Loopy on CDs

Have an .iso file and want to see what it looks like before you burn it to a DVD or CD? Simple - use mount's "-o loop" option:



$ mkdir myiso
$ sudo mount -o loop gparted-livecd-0.3.4-6.iso myiso
$ cd myiso
$ ls -F
boot/ gparted.dat* syslinux/
$ cd ..
$ umount myiso


Now that is pretty cool! Most Linux distributions are delivered on .iso files, which are snapshots of complete CDs (or, increasingly these days, DVDs). Using software like cdrecord or k3b, you can burn the ISO to a CD. Remember - don't copy it to the CD, but rather use the option to burn the ISO as a CD. In k3b, you use the Tools->Burn CD Image... or Burn DVD ISO Image... menu selections. You can't modify anything, as it is mounted read-only, but there are ways to modify an ISO file. See this Ultimate Boot CD page for some ways to do it.




Monday, April 30, 2007

Pick a Distro, any Distro

Excellent page from the ever-readable DistroWatch, talking about the ten most popular Linux distros on DistroWatch, plus 10a, which they give to FreeBSD.  Nice thumbnail sketches of each project, with pros and cons. I agree with most everything said, having just gone through most of them.

DistroWatch.com: Top Ten Distributions

Friday, April 27, 2007

Gear Up For Suse

Here's a cool Cafepress store for all things Suse Gecko, including t-shirts, mugs and even bibs. I think I need a new mug...

SuSE Linux Online Store : CafePress.com

Tuesday, April 17, 2007

Being GRUBby only once

The 'grubonce' command is a pretty little script if you are playing with various kernels. Basically, it lets you pick a GRUB menu boot option that it will boot from once and then go back to booting the old default. This is handy if you want to test out a new kernel and you want a safe way to check it out. This way, if the boot fails, your reboot will be back into the 'good' option. It is an undocumented perl script found in /usr/sbin, and looks like it implements this algorithm for you:



Booting once-only - GNU GRUB Manual 0.97


$ su -
Password: my root password
# grubonce
0: OpenSUSE 10.2 - Kernel-2.6.18.8-0.1-default
1: linux (/dev/hdb6)
2: Windows
3: Floppy
4: Kernel-2.6.18.8-0.1-xen
# grubonce 4
Using entry #4: Kernel-2.6.18.8-0.1-xen
# ^d
$


Pretty slick if you ask me!




Monday, April 16, 2007

Talking For Free

rms (also known as Richard Stallman) expounds on the reasons why he feels "open source" is, in some ways, bad for "free software", in that it doesn't emphasize the almost cultural aspects of software by touting its lack of cost.  A unique perspective from a software culture warrior:

Why Open Source misses the point of Free Software - GNU Project - Free Software Foundation (FSF)
When we call software “free,” we mean that it respects the users' essential freedoms: the freedom to run it, to study and change it, and to redistribute copies with or without changes. This is a matter of freedom, not price, so think of “free speech,”, not “free beer.”


Thursday, April 5, 2007

Perfect Match

Cool questionnaire to help you pick the right Linux distro.  No idea how good it is, although openSuSE was one of my picks (others included PCLinuxOS, Kubuntu, and SimpleyMEPIS, all likable distros).  See which ones you should try.



zegenie Studios Linux Distribution Chooser




Wednesday, April 4, 2007

Swap Market

How to find out if you are using swap? These days, you should have plenty of memory, even with the piggish apps we all use. So you might want to find out how often you are using the swap space, to see if it is time to splurge on a RAM. Well, it is vmstat to the rescue:



$ vmstat 5
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 2 204 4340 29984 140436 0 0 281 122 238 773 25 6 62 7
1 2 204 5636 26188 139620 0 0 1612 3793 1111 1953 5 5 1 89
0 2 204 8032 25420 133464 0 0 1516 30 1115 2342 6 6 0 87
1 1 204 7020 26068 130084 0 0 1444 89 1042 2289 10 7 0 83
0 1 204 13604 21472 129780 0 0 2158 65 937 1911 22 21 0 56
1 2 204 5884 22888 127960 0 0 1640 2 1180 2495 8 7 2 83


The main column you want to look at is the swap 'so' column. This tells you the amount of memory 'swapped out'. In my case, it is zero, so we're looking good, although I only have 1gb of RAM. I still think I'll grab another gigabyte. The '5' means to update the status every 5 seconds. And the first line shows the average of all the numbers since the machine was last rebooted, which is cool. As I've taken to shutting down all my machines every night, it isn't as interesting as it would have been a month ago, when the machine would run for weeks at a time.




Tuesday, April 3, 2007

Learn To Read

Continuing my quest for Linux knowledge, I picked up three Linux magazines yesterday. It's a wonderful thing, really, to have something popular enough to actually have a pretty big selection of magazines to choose from that concentrate on it. For now, anyway, I'm enjoying my time in the sun!




  • Linux Pro Magazine (US$10) : An oversized one from the UK, it includes a DVD with Knoppix 5.1.1 on it. Looks pretty solid. The issue I have (#77 from April 2007) has a nice overview of Mondo Rescue, a backup utility and several other interesting articles. Looks like a decent buy at US$10 for 3 issue trial subscription.

  • Linux+ (US$15) : Only the second issue, it is obviously going through some growing pains. But it includes two openSUSE ("open Soo-Sah") DVDs, which is really cool. I'm not sure if DVD 1, the 32 bit openSUSE 10.2 release, is the downloadable DVD, or the double-sided purchase DVD, which would be even cooler. Still, nice to have a SUSE-colored DVD. The second one is a 64bit openSUSE 10.2 release, plus a few other goodies. The articles themselves are light, and in need of some editing (markup still shows in several of them). I guess it is a long running foreign language magazine, but the English language one is still in its infancy. I'll probably just keep an eye out for more issues and see how it goes.

  • Linux Magazine (US$5) : (they don't stick their necks out when it comes to a title, do that?) Some nice coverage of the upcoming Red Hat Enterprise Linux 5, some cool expert colums (perl, LDAP and X), and a silly article about how Vista is better than Linux. The first few reasons are stupid show tricks like 3d desktops and Alt-Tab preview windows. Another one is the claim there is no Linux Media Center; one view of this will easily refute that claim. 12 issues for US$30 isn't too bad, but I might just keep looking.



I've also been casting about for a book. I've been using Safari for about six months now and enjoying it, but I want to have at least one real book in hand to read over. I liked the looks of Linux Administration Handbook, 2nd Edition and noticed it was 50% off at Bookpool.com, so I added Linux Bible 2007 Edition, which also looks real nice, with its discussion of 12 distros! And I see that openSUSE Linux Unleashed is on its way in June, so I pre-ordered that.




Monday, April 2, 2007

Tuesday, March 27, 2007

To the Darkside

So, to recap my previous two postings (1, 2) on my search for a new desktop OS - PC-BSD was too buggy and unsupported (plus the install CD wouldn't boot), Xandros's install CD also wouldn't boot, Ubuntu behaved flaky after a few days, SimplyMEPIS didn't integrate well, and PCLinuxOS wasn't an easy dual monitor setup. Plus, the latter two also had broken virtual terminals. Ctrl-Alt-F2 would either get me to a scrambled screen or just hang the computer immediately. I like my virtual terminals, and often do root commandline stuff from one. Plus, someone mentioned adding a Ctrl-Alt-F8 display terminal (Ctrl-Alt-F7 is the normal one under Linux), which seems cool - run both GNOME & KDE!



But I was pretty happy with PCLinuxOS. It looked nice, was easy to configure, showed me my local disks and even seemed to work with my Visor. I was starting to play the usual xorg.conf games in order to get my dual monitor setup working, when my torrent of the OpenSUSE 10.2 DVD finally finished. I remembered that from before - SUSE is one gigantic distro! So I burned it to a DVD and rebooted from it.



And immediately fell in love. The install went smoothly, although I did miss the part in the advanced section where I could choose where to install the boot loader, so I had to follow these instructions to get GRUB set up correctly once I rebooted into the OS on the hard drive. But otherwise it went smoothly, and I booted up into GNOME OpenSUSE 10.2.



And the love affair continued. I was especially blown away when I was actually able to run SaX2, the SUSE X Config program, to select my dual monitor setup, tell it to use the two as a single display, and it just worked! I had to make a few adjustments to the sync rates, as my tube display (a Samsung SyncMaster 997DF) shimmies and shakes if it uses a vertical refresh of anything but 60, so I just pretend it is a standard VESA 1280x1024 60hz display and it works like a charm. Wow, how cool was that?



And the good stuff continued. I was able to sync to my Palm Pilot (actually Visor), although I haven't had as much luck since I made the move back to KDE (very easy to switch around window managers in SUSE), but then again, I haven't worked on that yet. It saw all my Windows and DOS partitions and even mounted them for me in /windows/c, d and e. It saw my BSD disks, but didn't try to do anything with them. Amarok works like a charm with my CDs, although I'm disappointed it isn't a better ripper. I start the other one (Helix) to actually do the ripping.



I was able to find an install package for Teamspeak and it works great. It seems to notice my second CD drive, but there actually looks like there is a hardware problem, as Windows is having a problem reading things on it too. I've gotten printing to work, and it easily sees my Windows network. YaST (Yet another Setup Tool) works great for software packages, with plenty of options. You do have to take the time to add the recommended repositories, as mentioned here, to get the best choices. I'm sure it is only a matter of time before my voracious software package habits start confusing it, but so far so good!



The updates seem to work pretty well, although a couple of pages suggested turning off the new ZenWorks stuff and go back to YaST, so I did that. It may have been premature in 10.2, as the new Zen stuff seems to be better. The KVM switch works well, heck even better than on Windows, as lately every time I boot into Windows, I have to reboot as the keyboard isn't recognized, and I don't have that problem with OpenSUSE. The virtual terminals work like a champ and I finally got printing to work.



So life is good and I've settled on a distro. It's funny, as I was reading this review of 10.2 on Software in Review and I couldn't disagree more with most of his complaints. He even said to remove SaX, which is ridiculous, as it's the only X config tool I've found worth anything. And he's complaining about app bloat in KDE - big deal. That's another selling point to me for SUSE - it is a complete distro out of the box and works very well. Once you start adding packages, it tends to destabilize things, so working with a basic, yet hefty, initial install is a pretty good way to go about things. Ditto with the additional YaST repositories. First he complains about too hard to keep up, and then wants more. Funny, because his Hacking OpenSUSE 10.2 is well worth the read.



Now some have problems with Novell and its fingers all over the SUSE pie and for crawling into bed with Microsoft. But to me, if that's what it takes to put together a rock solid distro, then I'm all for it. The OpenSUSE community doesn't seem to be as well knit and centralized as other distros like Ubuntu, but I'm finding my niches. Opensuseforums.net works well, as do the mailing lists. Count me in as a happy OpenSUSE camper! Notice I've changed the subtitle of the blog to searching for Open OS nirvana, a more general term.



My server will continue to be a FreeBSD box, and my comments here are likely to be of interest to both BSD and Linux folks, although it will lean more towards Linux, I'm sorry to say. Plus ça change, I guess...




Monday, March 26, 2007

Suse OpenOffice Update links

Here is a list of the OpenOffice links to add if you want to get the latest updates to SUSE. Pick the one that matches up with your version.



Index of /download/OpenOffice.org



Powered by ScribeFire.



Sunday, March 25, 2007

Come Out Please, Panel


A seemingly common KDE bug is that the panel, after hiding, never comes back. Sometimes I found just logging out and logging back in will make it come back, but that isn't always true. Here's some methods I've come across to fix this problem, something that is even more common in dual monitor setups like mine:




  • $ rm ~/.kde/share/config/kickerr
    , then logout and back in.

  • Toggle the autohide mode

  • $ killall kicker
    , then restart kicker



See these bugs for more info:



http://bugs.kde.org/show_bug.cgi?id=118551

http://bugs.kde.org/show_bug.cgi?id=80469

http://bugs.kde.org/show_bug.cgi?id=39307



Wednesday, March 21, 2007

Dizzy Distro Dailies

To continue my story, after I had become a little frustrated with various inconsistencies with Ubuntu, I decided to check out some other choices. It's not that Ubuntu wasn't fixable, it just was going to take some work, and before I invested the time and energy into settling down permanently, I figured I might as well date some other distros to see if there was a better match.



Actually, I first decided to try a fresh install of PC-BSD. I was hoping that a brand new install of PC-BSD would clean up the various annoying problems I was having with my upgraded one. So I downloaded the latest install CD, burned it and tried to get it to boot on my main machine. I tried three different burn speeds, as in the past, the PC-BSD install ISO has been sensitive to that setting. But none of 40x, 16x or 8x would even boot. It go along a bit, but then I would get the "READ_BIG" error I'd seen in prior installation attempts and then it would have problems mounting various bits, finally deciding on a ttys complaint. So that wouldn't do.



So I moved on to Xandros. I used to recommend this distro, as my first experience with it was wonderful - easy install, easy Windows integration and just a nice experience. But my next experience wasn't quite so smooth, but I figured I would try it again. Another Xandros drawback is that the real version isn't free but rather costs anywhere from US$40 to US$80. But I thought that if it actually worked, it would be worth the money.



But, alas, it failed in a similar fashion to PC-BSD, only even earlier in the CD boot process. A couple lines of text, a blank screen, then nothing. And there's even a dozen or so boot options you can pick from, and none of them went any farther. Sigh. Back to the DistroWatch popular list.



Next up was MEPIS (meep-iss?). Finally, a CD installation that went smoothly! A very nice looking Live CD setup, I tried the SimplyMEPIS 6.5RC2, although I had been trying to avoid cutting edge. This looked pretty solid so I went ahead and installed it. I particularly loved how it let me choose where to install GRUB (I chose the root install in my hdc drive). Very nice. Lots of good options and it went on without a scratch. A quick tweak to my BootIT NG installation (I wish it picked up changes automatically like System Commander did), and I was off and running.



I liked the X Config, although it didn't quite work. I was scared off by the warning when I tried to add fglrx option for my ATI card, so I held off a bit. But it didn't seem to install correctly and I couldn't quite get my dual monitor setup working. Nor did it show any of my local Windows, Linux & BSD partitions, although by now I knew the magical command to mount a BSD partition:



$ sudo mount -t ufs -o ufstype=ufs2 -ro/dev/hdg1 /bsd 


You need to tell it what type of UFS it is, as I guess it has a hard time figuring it out. So SimplyMEPIS was a pretty good install, but I wanted more.



Next up was PCLinuxOS. What a very pretty boot up, LiveCD this was! I enjoyed the little bouncy balls. Once again I tempted fate by using the "Test Release 3", but again it was very solid (even if its 'livecd-TR3.iso' name is too generic!). The install went very nicely, including a very nice partition editing program which, if you go into the Expert mode, lets you pick where to install GRUB (again, a very important feature for me).



After installation, it went very well. The control center is nice, the screens are very pretty and it even listed all my local partitions in /etc/fstab. It, of course, didn't have the correct ufstype option for my bsd partitions, but it did know they were UFS, which is cool. But it still didn't do my dual monitor setup "out of the box", so I began my usual xorg.conf tweaking odyssey. Before I got too far, my download of the DVD OpenSUSE finally finished, so I figured I would try one last distro before settling down. More next time...





Monday, March 19, 2007

Dizzy Dizzy

It's been a crazy couple of weeks here at Daemon Dancing World Headquarters. I finally made the big internal office move, setting up all the way downstairs in the forlorn hope of getting a quieter work place. One where I can actually close a door to shut out some of the kid noise. The girls are actually very good in general, but they are only 7 and 6, so can be expected to be only so quiet. So I've been planning this office move for quite some time, and finally pulled it off. While I am by no means completely settled in, I do have two of the computers set up and running. Now to get the bookshelves restocked.



Another big time sink has been the effort to find a new OS. PC-BSD just wasn't working out. Ever since the 3.x upgrade and, I believe, the move to HAL, my hardware has been kinda screwed up. I no longer saw my local disks, the syslog was getting filled with a warning messages about some device, sound wasn't working, and the list went on and on. These problems, plus the fact that I just don't think FreeBSD is a good client machine. It is still a great server OS, but its lack of basic amenities like Flash and solid multimedia apps means it is too much ofa fight to use as a personal workstation.



So I went back to looking at Linux distros. Tired of playing with the lost stepchild of OSes in FreeBSD, I began looking at the most popular distros on Distrowatch. I wrote up a short list of things I wanted my OS to do for me:




  • Install, with extra credit given for those that understand I'm using my own boot loader and to give me an easy option for picking where and what to install for a boot. Installing from a LiveCD is also a plus.

  • Play audio CDs. I should just be able pop a CD into the player and listen to music, with an easy way to rip it.

  • Show me my local partitions. And I make it difficult, by having five different kinds of partitions - DOS, FAT-32, NTFS, ext3 and ufs2 (the BSD one). The latter one is vitally important, as I have six months of living done on it.

  • Dual monitor support. As I've documented in the past, dual monitor support is a real pain with X and I wanted a better way. I never could get it to work in PC-BSD with more than 16 bit color. And by using Linux, I could even go with an "official" driver from ATI, as I don't mind using proprietary stuff if it "just works".

  • Palm Pilot connectivity. Another thing I was never entirely successful in doing with BSD, getting my Palm Pilot (actually, an old Handspring Visor) to sync.

  • Teamspeak. This is a voice communications app I like to use and even had it working for a bit on PC-BSD. But the mic stopped working, just one of many things.

  • See both of my CD drives. I have a DVD writer and a plain old 50x CD-ROM drive, which was another device that disappeared in the HAL days of PC-BSD.

  • Connects to my Windows network. This is especially true in order to get to my printers, both of which are hooked off of Windows boxes.

  • Easily add apps. I'm a real glutton for apps, and I need to easily get at new ones.

  • Automatic OS updates. I just don't want to think about it. Make my updates happen.

  • Work with my KVM switch. It's been a little on the flakey side, as machines just miss out seeing the keyboard, but it has to easily work with my KVM switch.

  • Get to the text terminals, ones that work. I like to have a root login on one of the alternate ttys that you get to via Ctrl-Alt-Fn. I spent way too much time trying to get more resolution than 80x25 on the PC-BSD text terminals.

  • As mentioned in an earlier one, let me easily add a networked printer.



Seems like a pretty basic list, one that nearly anyone would need. Only the dual monitor support is pushing the limits, and even that isn't so strange these days. So I began my quest with the most popular Linux distro these days, Ubuntu. For some reason, I was bound and determined to go with a GNOME desktop this time. I'm not sure why I was being such a glutton for punishment, as I was pretty satisfied with PC-BSD's KDE desktop, and that's all I needed was Yet Another Thing to learn, but I just couldn't resist. So I stuck with the main Ubuntu line, as opposed to Kubuntu, which does the KDE desktop. It also had the added benefit of matching up with Edubuntu, which is a Ubuntu-based distro target at the educational market, which I hoped to install on the girls' computer.



So I downloaded the 6.10 "Edgy Eft" release and got busy installing. I resized an NTFS partition to give it 60gb to work with and installed pretty much the basic set. I've installed Ubuntu before and its LiveCD install is very nice. It's still annoying in how you tell it where to install the boot loader. There's a mysterious

(hd0)
in the middle of the last window that you are somehow supposed to know what to type in. This time I was ready though and knew I had to type in (hd1,6) to use the sixth partiion (second extended) of the second hard drive. It should do better, even though I realize most people will be happy with the default. The problem is, if they aren't it can be a pretty mysterious problem.



And so I settled in for the long haul. I figured if Ubuntu was good enough for so many people, it was probably good enough for me. But I only lasted about three days with it. The dual monitor setup was painful. Not quite so bad as for PC-BSD, but still a drag, and I could only get the "two displays" mode running, not the "one big display" (Xinerama or MergedFB) mode going. It wasn't too painful, as your mouse can go from one display to the other, just not windows. I don't know why the defaults are so weird. The basic setup has the displays in "Clone" mode, where one merely mimics the other - virtually useless. The next default is this one, with two displays. Slightly more useful, but still not what you want out of the box - just one big dislay.



But the gradually things started going awry. I couldn't get Teamspeak to work. It wasn't in any repository, and the installer from the website (GoTeamspeak.com also wouldn't work. The media players gave me headaches. It took me far too long to get the mixer settings correct so that CD playing worked. Amarok only worked intermittently, crashing or disappearing at startup. I had some problems getting the fglrx (ATI) driver to build without errors, although it seemed to work. But if I wanted these problems, I'd go back to Windows!-)



So I started looking around some more. Heck, much to the surprise of my Mac friend, I even checked out Mac prices, but I wasn't ready to go there yet! I list more distros that I tried in my next post.