This is mostly just a bunch of links and personal notes.
"Microsoft seems to have gotten a lot of mileage out of the C2 rating for NT with no network connection. I wonder if a B3 rating for Linux with no power cord might be of value." — Michael Driscoll on the kernel mailing list.
I've been using Linux professionally for quite a while: first SGI IRIX machines in 2000, then custom-built RAID PCs with Linux, then Mosix clusters, then driver development which is much easier on the Linux kernel than on modern versions of Windows, and finally full fledged embedded Linux systems where every bit of the bootloader and operating system is under my control and not under the control of Bill Gates. But there remains the issue of my home computer with its 10 year history of upgrades and cruft.
Why would I want to change OS on a system that works fine with XP ? Well, really I don't. Except that Bill gates in his infinite wisdom decided that if I change too much hardware he will deny the licence. I wanted to change the motherboard/processor/memory combo but was afraid to do so. Also the main system disk was always on its knees on its olden days 80Gb, never mind the other 2Tb of disk inside the unit on which I cannot just 'move' the operating system.
So when the system drive had a major brain fart one day in early 2009, I decided to skip a ski-mountaineering trips to jump ship and install kubuntu on a new hard drive, import my data, and then try to figure out how to replace some of my faithfull applications and Windows-only hardware. The installation of Linux was basically painless, with only two major glitches: the lack of a proper graphics mode in X for my monitor and the failure of the WiFi.
So I had to give up on my Belkin DWL-G122 wireless which I replaced with faster and more reliable
PLC (power Line Carrier) units. No driver necessary. Anyway, the wifi did work fine 2 years ago but now with the ubiquity of wireless ADSL modems, there are more than 15 competing networks in range, leading to crap performance. A note of importance to all those with PLC devices: don't plug them into surge protected power strips. Those will filter out the high frequencies used to transmit leading to abysmal performances.
Among the first things I noticed is that the keyboard is too fast, I often type dooublee characters. I briefly saw a kcontrol tab to take care of it, but it disapeared forever after the first sytem update (while clearly visible on other identical systems). Now all I have is this flimsy "xset r rate 200 30"
Knode for usenet, Kmail for email and Kontact instead of wab take some getting used to after using outlook express for 15 years. Thunderbird had a bug where links would not be clickable.
The main reason I held onto Windows for so long was my photo processing software: Paint Shop Pro, PTgui, SilkyPix, HS-V3, monitor calibration, etc... It takes years to get the most out of those programs.
So 2 years after the thorough review of raw processing sofware I did, I tried out the offerings for Linux. In short they are sub-par and I want my
SilkyPix back. I installed it both in Wine (a Windows API implementation under Linux) and in VirtualBox (a virtual machine that runs a WinXP install simply). Both have pros and cons: Wine is faster but has some user interface hiccups. I did the same for PTgui and installed Paint Shop Pro in VirtualBox.
For scanning, the linux version of VueScan is flawless with my Nikon Coolscan 4000 slide scanner. But not so on the Epson Perfection V500. After reading quite a bit, I downloaded the DEB 32bit package [libltdl7] files from http://www.avasys.jp/ and installed them with sudo dpkg --force-architecture --install iscan*386.deb, never mind that I'm on a 64-bit system.
But for monitor and printer calibration, the expensive and shitty
DataColor equipement is far from working. The software installs but won't run under Wine. Linux won't recognize the Spyder probes, although some people have managed to use LCms and Argyll to generate profile files but I can't figure out how. The software installs and runs on VirtualBox, and it works fine for generating printer profiles, but it generates empty monitor profiles.
I had kept my previous monitor profile which can be used simply in Linux with the command "xcalib Profile.icm", but the inability to generate a new one (if I change graphic card or monitor for instance) is nagging. Also the printer profiles generated work fine as long as I print under the virtualized WindowsXP, but I have found absolutely no way to use them in Linux.
About VirtualBox, this system is awesome as it can pass an arbitrary USB device to the virtual OS, even if the Linux host doesn't recognizes it ! For instance I can use my
Epson R1800 under Linux, or pass it to Windows when I need to make a profiled print. I also (try to) use the spyder probes through VirtualBox. Make sure to set the number of processors before you install XP, as it doesn't like a change in the number of CPUs afterwards.
Finally about graphics, never mind what you can find on some forums, I could not get my recent Hercules webcam to work. But a new
Logitech QuickCam Pro 9000 worked out of the box. If going shopping, pick from this list.
There are several ways to do disk encryption on Linux:
Where I work we are now required by law to encrypt all laptops. Since hardware-level disk encryption wasn't available to me, I used an LVM container. Very easy to install, with some caveats.
On Windows I had an NTFS disk encrypted by TrueCrypt at the device level. I failed to mount it on Linux directly. Ubuntu would mount new drives via TrueCrypt, but not this one, saying it was corrupted with the very unhelpful message: "$MFTMirr does not match $MFT (record 36)". Mounting it temporarily on Windows, doing "chkdsk /F" on it then allowed me to mount it on Linux and copy its content to another encrypted disk, this time using Linux native ext3 filesystem.
Doing a backup and then data extraction of my failing former Windows disk was easy: dd if=/dev/sda1 of=WinSysDisk.img bs=1M conv=noerror. Then I can just mount that file as an ntfs partition and copy its content over.
One of the reasons I wanted to move to Linux was the ease of installation. Yes, times have changed ! On Windows you install the OS and reboot. Then install the security updates and reboot. Then the service packs and reboot. Then the various system update and reboot. Then the secondary updates and reboot. Then at this stage you still you have a unusably bare system and you need to google for all the current versions of your usual software, download them, install, reboot, launch, customize. Damn, that license doesn't work anymore with the new version, etc... Usually it takes me a good 3 days. I've wasted months of my life installing windows and associated software according to this method.
Linux makes it all so much simpler: you install the OS and reboot. The installer pops up with updates; apply and reboot. So far, not much difference. Then you launch the application installer and select all those you want. Click OK, that's it, no reboot necessary. And each time there's a new version of either the OS or the various applications, the updates are automated and all together. Magic.
For years I had a
LAMP stack running on Windows: Apache web server, Php, MySQL server, PhpMyAdmin, gallery2, svn, etc... All very delicate to install and keep up to date. On Linux you just click them in the installer and then all you need to do is fine tune their config files according to your needs.
My former svn repositories required a bit of massaging to move to Linux. I had to run the following on each of them: svnadmin recover /path/to/repos and just ignore the errors. I miss TortoiseSvn though, although KdeSvn is not bad and learning the command line for basic stuff is no biggie.
By the way, it is a good idea to pass the /etc directory under version control. All your critical system configuration files are there and you never know if a silly upgrade will break things. For this you first create an etc repository in your svn server directory: svnadmin create /var/www/SVN/etc (as www-data, not as root). Then you create an empty etc directory somewhere (not in '/') which you check out as root: cd /tmp; sudo svn co http://localhost/svn/etc. You then move the .svn to the real /etc and delete the temporary one: sudo mv /tmp/etc/.svn /etc/; sudo rmdir etc; cd /etc; sudo svn add ...; sudo svn commit when you can add whatever /etc files you fancy under version control. Always remember to sudo before svn'ing anything in /etc
Installing the ssh server is a no brainer, just remember to NAT port 22 on the router.
I got VNC to work in order to remotely access my Ubuntu box the following 4 steps:
Here's just the summary of what needs to be done when you do a sudo aptitude full-upgrade, receive a new kernel and then end up with a text terminal because you broke the nVidia driver kernel integration. First you must have downloaded a recent NVIDIA driver, which may be hard to do in text only.
$ sudo service kdm stop # or "gdm" for Ubuntu)
$ sudo apt-get update
$ sudo apt-get install linux-headers-$(uname -r) build-essential
$ sudo sh NV{Tab-to-complete} # Wherever the nVidia installation file is
$ sudo service kdm start
By now everybody knows that OpenOffice is a perfect replacement for MS Office: it's free and it doesn't have the horribly messy ribbon menus of Office2007. And it can open tab separated .csv files !
So shortly after installing, I tested two of the reasons why Linux can beat Windows to a pulp. First one is a complete motherboard+processor+memory change. I had a Tyan mobo with Athlon 64 X2 with the AMD64 version of Ubuntu, so I had to stay in that line. I got a different brand of mobo (
AsRock),
more cores and 4 times the amount of
memory. Assemble, put the old drive in... and it boots without even a tweak of the BIOS or GRUB. And it doesn't bring up a message telling me that either I copied Windows illegally or that I changed too much hardware, either way pay up, thank you bitch.
The only hitch is the ethernet driver that no longer works. I have to compile a slightly different version, which took all of 5 minutes, but then the next kernel upgrade fixed the issue... So now it's a non issue.
The second test was upgrading the hard drive. This time I used a Knoppix live CD to boot, used dd to copy one partition to the next drive and then enlarged the partition to fill the whole drive. Rather painless.
Have a mouse with plenty of buttons but some of them don't work under Linux ? Fear not, here's a not so simple tutorial on how to configure those extra buttons. But before we get to the configuration of the buttons proper, my RAT7 mouse had two problems: it's too fast even at its lowest dpi setting, and it doesn't let you click normally on windows !
First, let's identify the mouse name and its id. We'll use this later:
$ xinput list Saitek Cyborg R.A.T.7 Mouse id=12 [slave pointer (2)]
Note: Some mice, like Logitech, show up double: the first is actualy the mouse driver while the 2nd is a keyboard driver making their configuration simpler, normally all the buttons work out of the box on any OS.
The following command can slow down any mouse that goes too fast on Linux. Play around with the '5' if the speed is not to your liking:
$ xinput --set-prop "Saitek Cyborg R.A.T.7 Mouse" "Device Accel Constant Deceleration" 5And in order to have it activated automatically, I set up the following script in ~/bin/SetMouse.sh:
#!/bin/sh xinput --set-prop "Saitek Cyborg R.A.T.7 Mouse" "Device Accel Constant Deceleration" 5 #xinput --set-prop "Saitek Cyborg R.A.T.7 Mouse" "Device Accel Velocity Scaling" 1
And in [System settings][Startup and shutdown][Autostart] I add an entry in [Script file] pointing to that script. Done.
Run the following, then click on the window that appears with your various buttons and rotate you various wheels. Write down their numbers.
$ xev | grep button
state 0x10, button 1, same_screen YES
state 0x110, button 1, same_screen YES
state 0x10, button 3, same_screen YES
state 0x410, button 3, same_screen YES
state 0x10, button 5, same_screen YES
state 0x1010, button 5, same_screen YES
...
Apparently the RAT7 mouse has a 'mode' button with 3 configurations and one of them is always pressed, so it interfere with the other buttons. We'll simply remove it. As root, edit /etc/X11/xorg.conf and add (or change) the following section in order to remove the 'buttons' 13, 14 and 15. You can also use this to switch button (for instance "3 2 1 4..." will invert left and right click):
Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Saitek Cyborg R.A.T.7 Mouse"
MatchDevicePath "/dev/input/event*"
# Specific to the Saitek RAT7 mouse
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 16 17 18 19 20 21"
EndSection
You'll need to restart X or reboot before this comes into effect:
sudo service kdm restart
$ sudo aptitude install imwheel
Edit the file /etc/X11/imwheel/startup.conf with the buttons you want imwheel to take care of (as root). It's not very clear but the various numbers correspond to the following actions, in order: Left, Right, Up, Down, Thumb1, Thumb2, ExtBt7, ExtBt8, ExtBt9... A zero means imwheel doesn't act on this button (it lets the default X11 action). So here it basically mean that we let X11 handle the left/right buttons as well as the wheel, but we ask ImWheel to assign button 8 to action Thumb1, button 9 to action Thumb2, button 10 to action ExtBt7, etc...
IMWHEEL_START=1 IMWHEEL_PARAMS='-b "0 0 0 0 8 9 10 11 12"'
Now configure the actions themselves in the file /etc/X11/imwheel/imwheelrc (as root):
".*" None, Thumb1, End None, Thumb2, Home None, ExtBt7, Page_Down None, ExtBt8, Page_Up None, ExtBt9, Alt_L|Left
Here I have set the red thumb button to [Back] in Firefox, the thumb buttons to Home/End and the thumb wheel the PageUp/PageDown so that it works in any application.
Here's another simpler example with the Logitech G9 Laser Mouse whose two sideways wheel buttons don't have default functions in KDE. Those are the actions you get when you wiggle the wheel to the left or right. Some of the above points are not necessary, like modifying the xorg.conf file.
$ xinput list Logitech G9 Laser Mouse id=10 [slave pointer (2)] Logitech G9 Laser Mouse id=11 [slave pointer (2)]
I have no idea why it shows twice...
$ cat bin/SetMouse.sh #!/bin/sh xinput --set-prop 10 "Device Accel Constant Deceleration" 5 #xinput --set-prop "Logitech G9 Laser Mouse" "Device Accel Velocity Scaling" 1
In [System settings][Startup and shutdown][Autostart] I add an entry in [Script file] pointing to that script. Done.
xev shows that the 2 buttons I want are # 11 and 12.
$ sudo aptitude install imwheel
Update the file /etc/X11/imwheel/startup.conf to tell it to consider only button 11 and 12, and assign them to ExtBt7 and ExtBt8:
IMWHEEL_START=1 IMWHEEL_PARAMS='-b "0 0 0 0 0 0 11 12"'
Now configure the button actions themselves in the file /etc/X11/imwheel/imwheelrc (as root):
".*" None, ExtBt7, Alt_L|Left None, ExtBt8, Home
Here I have set the left wheel to [Back] in Firefox, and the right wheel to [Home].
What is the command line to get the content of the clipboard ? Or to pipe something in it ? In cygwin I used it very often, for instance to sort the content of the clipboard getclip | sort | putclip I'm aware that there are two different clipboards in Ubuntu, the Ctrl-C/Ctrl-V KDE facility and the select/middle-click ancient X-clipboard, so if they are two different commands, that's OK... but I couldn't find them !
Couldn't get KDevelop to compile even a simple hello world. I'll stay with makefiles for now.
The sound works fine, including the multimedia keys of my old Microsoft Multimedia Keyboard... somehow. The volume up and down keys would raise the PCM volume used by most apps, but Amarok uses the separate Master channel. The solution is to go in [System settings][Keyboard & Mouse][Global][Kmix] and to change the key assignement from [Decrease Volume] to [Decrease Volume - Master ...]. There may be more than one choice, try them out. Do the same thing for the [Mute] key.
The sort order of konqueror/dolphin file manager makes no sense to me: it sorts A, _B and C in that order, instead of the correct _B, A, C. I can find no information on what characters are ignored or treated peculiarly.
I write daily in 3 languages but I prefer a US keyboard for programming. Unlike Windows there's no magical set of keys that will type any char: on any Windows box since at least version 3 I can do Alt+135 for a 'ç' and it will work on any keyboard setup and any installed language. On Linux I can define custom actions to bring a specific char, but it needs to be configured on every PC... I can add foreign keyboards and try to remember the key positions, sell my firstborn for an Optimus keyboard, or use the more useful 'US'intl' keyboard for accents. I don't like the Intl keyboard much because you need to use the mouse to activate the keyboard, and also some keys are missing, like the 'ç'. Besides using intl keyboard, I found that the best solution is to use the Caps Lock key as a Compose key. You go in [System Settings][Regional & Language][Keyboard layout][Advanced][Compose key position] and select Caps Lock. Now when you press [Caps lock] at the same time than ` and then e, you'll get a è, same thing with [Caps lock][,] followed by C which'll give a Ç. It works with various combinations of ' " , . ` ^ ~ as first character and just about anything as a second character. You get the picture.
Finding hardware devices can be daunting. Here's a list of commands that do it in different ways. Some of those need you to be root and some reside in /sbin/:
As long as I'm doing big changes, I might as well keep going. After all, KDE is a window manager not unlike Windows ! There are other window managers that operate on completely different principles. I tried 'Awesome' which is an interesting concept... except that with the utter lack of a tutorial, I couldn't even figure out how to close an application, or hide it, or fullscreen it, or anything except drop to a console and kill it.
A couple months after I started using Ubuntu as my main PC, I was in my parents home, upgrading their old computer. New mobo, new HD. Of course XP refused to restart after I clone the disk. So I start the painful install / configure / patch process. After 24 hours and everything nearly ready, SP3 crashes during its post-install. The whole install is now a brick. It's sunday afternoon and I leave in an hour...
I go in a rage, put my Kubuntu install CD and after 30 minutes I have the full system and all its applications up and configured. I spend the rest of the allotted time to customize the system: obvious icons on the desktop to firefox, Redmond theme to ease the transition, kmail (with the old messages imported), Xsane, OpenOffice, Dolphin, Gimp, my image import script and the few other apps they are likely to use. I rename some of them to make it clear what they do. I setup ssh so that I can login remotely to fix issues. And I leave, only telling them that with the new upgrade things will be a 'little different'. I cross my fingers on this understatement, waiting for the complaints calls to pour in.
After 2 weeks, I get the first call: "Yeah, it works fine but we don't have Skype anymore". Clickety click, ssh login, install. Done. "Is that it?". "Yeah, pretty much". I consider this experiment widely successful.
Counters: Page:9034, Section:4082771, Site:31008644.
Forward to the next Hack page. Back to my contact page, my computer page or my home page.