How to Enable Toggling a KVM with Linux Mint

I just got this KVM from Monoprice (for only $27!), and had difficulty setting it up with Linux Mint 11. Specifically, when running under X, hitting the Scroll Lock key twice resulted in no response. However, when running in a VT (that is, switching from X via ctrl-alt-F1), it worked, so my guess is that there is some issue with Gnome misdirecting or misinterpreting the key event.

I eliminated the KVM itself as the problem by running a very long command (“find /”), and hitting Scroll Lock did not stop the output from scrolling, when running in a Gnome terminal. As with the KVM, Scroll Lock did stop the command output when I was running in a VT.

Online there were examples of using xmodmap to enable the Scroll Lock key, but these didn’t work for me. I tried to:

xmodmap -pm
xmodmap -e 'add mod3 = Scroll_Lock'

But neither the KVM nor the command-output tests worked. Then I found this snippet:

xset led 3 && sleep 0.2 && xset -led 3 

I ran it, and lo and behold, it worked. So I wrote it to a script:

echo "xset led 3 && sleep 0.2 && xset -led 3" > ~/bin/toggle_kvm
chmod +x ~/bin/toggle_kvm

Then went to Keyboard Preferences, added that command, and gave it a shortcut of “Scroll Lock”.

So the only difference now is that in Windows, the Scroll Lock key has to be hit twice, but only once in Linux.

… and Back to Gnome from KDE

I recently switched from Gnome to KDE, after a couple of Gnome quirks proved to be quite irritating. However, KDE became even more bothersome. Specifically the performance was dreadful. This is a new(ish) machine, just a few months old, with a six-core processor, 8 GB of memory, and an SSD, so I expect good if not extraordinary performance. However, under KDE the response within windows was very sluggish, on the order of a second or two to scroll down in applications.

Fonts were also a problem, where the fonts under KDE, for both KDE and Gnome applications, lacking smoothness. Despite much fiddling of font preferences, I could not get them to look as good as they do under Gnome.

Switching back to Gnome hasn’t resolved its irritations, although it’s put them in context. The main problem is that to get the title and task bars working properly (showing the currently focused application) I have to restart the window manager after login, and after launching Gnome Terminal I have to switch in and out of each tab so that the focus of the cursor is correct.

Migrating from Fedora 5 to Linux Mint 10

My four-year-old system, castor, was in dire need of upgrading, so based on the pleasant experience of installing Linux Mint on my latest laptop, I decided to switch from Fedora to Mint.

I’ve been a long-time Fedora user (and before that, Red Hat, going back to version 4, as I recall). It has always felt very “solid” yet incomplete. By that I mean that after installing Fedora, I’ve had to go install all the various media packages, adding livna and rpmfusion (?) to the RPM configuration, finding the plugins, MP3 support, and whatnot.

I’ve wanted an out-of-the-box (“It Just Works”) distribution for a while, and Mint seemed to have it: all the media packages, plugins, proprietary drivers, etc. So that’s what I installed on my laptop back in January, with Mint 8, and I was willing to do it again, with the latest version, Mint 10.

Overall, Mint 10 looks much better than 9. Granted, that may be because this installation was on a 24″ monitor running at 1920×1200 resolution, but even the themes look better. My primary complaint with Mint is the usage of so much light green — probably my least favorite color — but that has been toned down for a background of metallic grey — my favorite color.

The out-of-the-box experience was great. There was some dorking around with setting up the disk partitions, since I prefer hardware- and software-independent disks, meaning that I can take (and have taken) a drive from a fail(ing) box, pop it into a good one, mount it, and pull all the files off, without the added stress of having to configure it via software. A failed RAID controller years ago set me on the path of resisting the easy of using LVM, and going the more difficult route.

One aspect of the older versions of Fedora was that I could choose the option to install every available package during installation, and never need to track down packages in the middle of working on a project that called for additional software. Of course, that resulted in many packages I didn’t need, cluttering up the menus, but I figured it was worth the long-term benefit. It also avoided the pre-yum hassle of RPM hell.

But that changed around Fedora 9, as I recall, where only a minimal set of packages were installed. So that was another strike against Fedora.

If you haven’t figured it out by now, yes, I have no lack of laziness (nor impatience nor hubris). I want to boot the machine with the installation DVD, click a couple of boxes, hit “next” a few times, walk away, and sit down an hour later at a machine ready to work and/or play (both the machine, and I).

Mint solves much of that issue. However, there is the need to find the correct packages, but the synaptic package manager is so easy to use that it’s essentially trivial.

So, some minor issues here, which others may encounter:

mplayer

Running videos with mplayer -fs resulted in many errors such as:

X11 error: BadAlloc (insufficient resources for operation)

But this works properly: mplayer -fs -vo x11 -zoom

XEmacs

Listing directories with many entries became very time-consuming, a problem with dired.el. Additionally there was cruft at the end of the listing, evidently output from the change in how dired uses ls. So I added this to my .xemacs/init.el file:


(add-hook 'dired-load-hook
  (lambda ()
    (set-variable 'dired-use-ls-dired
      (and (string-match "gnu" system-configuration)
           ;; Only supported for XEmacs >= 21.5 and GNU Emacs >= 21.4 (I think)
           (if (featurep 'xemacs)
               (and
		(fboundp 'emacs-version>=)
		(emacs-version>= 21 5))
             (and (boundp 'emacs-major-version)
                  (boundp 'emacs-minor-version)
                  (or (> emacs-major-version 21)
                      (and (= emacs-major-version 21)
                           (>= emacs-minor-version 4)))))))))

Eclipse

One of the main reasons for my upgrade was to do Android development. However, after installing Eclipse and the Android Development Toolkit, there were errors when creating a new Android project:

…/platform-tools/adb: No such file or directory

Fortunately (for me) a friend had run into the same problem a few days ago, and this showed the fix to get the i386 compatibility libraries:

apt-get install ia32-libs

Rails

In short: Rails 3.0.3 (the current version) does not seem to run Rails apps written in 2.3, as is my site. So I downgraded by installing the 2.3.5 version of the Rails gem, and it works properly.

Reverse Printing

I very much like my printer, an HP C7250, but from Linux, pages are printed so that the first page of the document is printed face up, with the next page on top of it, etc., so the pages are printed collated in reverse.

From this post, I went to Control Center > Printing, right-clicked on my printer, went to Properties > Job Options, then at the bottom, under “Other Options (Advanced)”, typed “outputorder”, clicked on “Add”, then filled in the newly-added field with “reverse”. After pressing “Apply”, joy was had, since pages now come out in the proper, “reversed”, order.

Configuring Ubuntu

The good news: it was trivial to set up Ubuntu with my wireless printer (HP C7250), just as an HP JetDirect, using the HP Photosmart C7200 settings. Far easier than setting that up on my Fedora machine.

Alas, when I activated “Enhanced Desktop Settings” (I’ll go look this up), there was a popup to install the nVidia drivers. So, away it went … and down went my wireless connection for that machine. I deactivated the nVidia driver, but the wireless problem persisted. From the popup, I could see the list of local wireless networks, including mine, but the handshaking seemed to fail, with lines similar to the output here, that read “wifi0: invalid skb->cb magic (0×00000168, expected 0xf08a36a2)” (I’m copying from the link, since I didn’t save the output from my machine).

Although I back out the nVidia drivers, the problem remained, so I reinstalled Ubuntu on that machine. This has made me skittish about nVidia drivers, after having excellent experiences with nVidia and Linux. I wonder if there are similar problems with ATI graphics, which I have not used for quite a while. I’m starting to contemplate a new primary home machine, and will possible (likely?) switch to Ubuntu, although this type of issue is one that makes me appreciate the stability of Debian, and the argument against Ubuntu for being inadequately tested. I wonder how Fedora compares in this situation.

Alternative Linux File System Hierarchy

The GoboLinux project looks interesting, in terms of their alternative file system hierarchy for Linux. As a long-term Linux user (10+ years), and Unix before that, I still do not grok where files should go. I view the home directory of a user as being private, so my common files (such as audio) as well as projects (work) do not seem to fit. I like the idea of /Files and /Depot directories, respectively for those two issues.

This may be pedantic, but it also seems that bin is wrong, in a conventional distribution, since those files are actually executables, not binary — many are scripts — and one would not think of putting true binary files, such as MP3s, in /usr/local/bin. That also raises the question — unsatisfactorily answered, to me — about what “local” means. Not shared? Not public?

I also like that Opera — my preferred browser — is included. It doesn’t seem that the bane of my favorite distribution, Fedora, is “fixed”, in that for example, proprietary (non-GPLed) codecs are included in the core distribution of GoboLinux.

The GoboLinux project seems to borrow from the design of the OS X file system hierarchy, which I’ve liked. I’d like to see programs filed according to the “domain” of their source, such as /Programs/org/apache/....

Linux Network Woes, Redux

Once again, the network connection failed on my Linux machine. No helpful error messages, no warnings … nothing of use to a prole like me. But a reboot “solved” the problem. Oddly, once again, my Windows box was a sanity check, as it continued to maintain the connection, even through resetting both the cable modem and the router.

Gads. Is Linux becoming more like (classic?) Windows, for better and for worse?

Linux Network Woes

Much fun this fine evening.

I had to reboot the machine today — doing some work that required the electricity to that room to be shut off — and after rebooting, I noticed that the network connection would go down. There was nothing in /var/log/messages. I could restart the connection (/etc/rc.d/init.d/network restart), and ping my router (192.168.0.1) for a while. But within 45 seconds to 3 minutes, the connection would be lost.

Oddly, I could do a broadcast ping (ping -b 192.168.0.255), and see other machines on my network.

After a while, I ventured over to my newest laptop, given to me yesterday at my company, which had a nice helpful error message, that there was another machine on the network with the same IP address.

I’m shocked … shocked, I tell you. Because for the first time, in my 12 years of Linux usage, I found Linux to be harder to diagnose than Windows (this was XP). Would it really have been that difficult for Linux to add a nice little message, saying the same thing?