Peter's Blog

Redefining the Impossible

Items filed under linux


I've tried various ways (cygwin, andLinux, vmware, even remote X etc) to get a mixed linux/windows working environment. I think I've almost found the nicest solution, certainly it is looking good so far.

Seamless

Seamless

A nice mix of linux and windows. How is it done? The host is kubuntu, a desktop environment that I am appreciating more and more. The windows boxes are running in windows 2000 under the open source version of VirtualBox. Why Windows 2000? Well if I only need windows running to be able to tweek access permissions on the file server and check how things look in ie6 then windows 2000 is all I need. Windows 2000 runs blazingly fast, by modern standards it is a bloat-free o/s.

VirtualBox is set up in 'Seamless' mode which means the windows desktop background disappears and the windows windows appear on my kde desktop. Windows 2000 has the virtualbox applications installed and hence I can cut and paste between systems.

For the kind of linux/rails development I am doing at the moment it is much nicer to be running on linux than windows. NetBeans rails integration runs much more smoothly, rspec tests run many times faster, networking is seamless, it's just better all round.

Note that in the DOS box I am looking at my linux home directory, accessed via VirtualBox's shared folder mechanism.

I'm liking VirtualBox more than vmware. When I tried running linux in vmware on windows I found it annoying to have to wait two minutes for the machine state to be saved when I was closing down my pc to go home. VirtualBox under linux is doing it in seconds. Startup time for snapshots is good too.

I've set VirtualBox up with a permutation of networking that lets me log into the windows domain network from Windows 2000 as the VirtualBox instance appears as a pc on our network. By default it appeared behind a NAT translation and windows networking (Netbios and all that ancient stuff) was broken.

Incidently, trying to install windows 2000 on VirtualBox I kept getting end endless reboot loop. The fix for this is in the VirtualBox user manual. Apparently when they wrote the windows 2000 setup program they didn't allow for 2GHz dual core processors and virtual disks so the setup program crashes due to a timing condition. So much has changed in the last eight years.


Add a comment

I recently bought a new USB Memory thingy, a Corsair Voyager 4G, to replace a rather nice verbatim that I had for about a month before I lost it (with important files on sad ). I fancied a rugged replacement that I could put on my keyring. Some research told me that the most rugged are reputedly Corsair and Sandisk. The comments on Amazon.co.uk revealed people moaning about their Sandisks and being very happy with their Corsairs so I bought the latter. The Sandisks come with some invasive 'feature' called U3 which can be a particularly annoying piece of tat-you-didn't-ask-for. The Corsair comes with some cryptographic thing if you happen to be between the I-need-encryption and the all-encryption-systems-have-government-backdoors levels of paranoia.

It seems rugged enough as it has a rubberised finish which feels rather unpleasant in the hand so I will not be inclined to keep fondling it in my pocket. Even better, the cap is rubber and so I won't be habitually clicking it. I would prefer a capless design but Corsair don't make one and then I would be fiddling with the cap mechanism. The rubber cap is downright unpleasant and I will only use it when necessary. The rubber seems to attract pocket lint sad

So I had a look around at the state of the art in Linuxes that boot from USB and I come across a little gem: DSL USB Embedded. DSL is Damn Small Linux and is an old 2.4 kernel and 50 megabytes of applications, a minimal system with hand-picked useful apps. The beauty of this particular distrbution is that it includes a QEMU virtual machine so you can be running windows, bung the USB memory in the hole, run a batch file and have your own linux running in a virtual machine under windows without having to install linux or reboot into a live CD. Amaze and bewilder your friends by running linux on their cruddy windows boxes! Remove your USB key and all traces of linux with it!

DSL USB Embedded

DSL USB Embedded

DSL USB Embedded under Vista with IE7 to prove it is Windows. It boots quite quickly too (less than a minute) which is much better than Ubuntu/Knoppix live CDs.

The USB key can also be set up to boot a pc straight into linux for some light Windows password resetting and it can have some persistant memory allocated to it should you not wish to cover your tracks.


Filed under: dsl linux

Add a comment

andLinux is designed to make any sentence sound ungrammatical. It is also a linux distribution that runs under Windows 2000/XP/Vista. I was put onto it by long-time commenter spikeles and I am really impressed with it.

You install it on your Windows box and it creates a Windows service that is a linux kernel. It also includes enough X smarts to be able to run X applications alongside your windows apps. Here is the obligatory screenshot of IE7 peacefully coexisting with Krusader and Konsole on a Windows Vista desktop:

andLinux

andLinux

Notice how the different 'linux' apps have their own windows taskbar entries. And you can NEVER have enough dual-pane file managers. And yes, konsole is about a billion times better than the windows command terminal. Oh, and note that the last quicklaunch bar entry is for Konsole and was created by the andLinux installer.

It's support for linux is about as deep as I can trawl, I was able to get autofs running exactly as I would under ubuntu. It is based on Kubuntu (most of the apps that come with it are KDE) and while the current install gives you a version of gutsy I was able to upgrade it to hardy from the standard ubuntu repositories.

I can cut and paste between linux and windows apps. The linux apps can access the windows files using Samba: there is an alternative method of accessing the windows files called cofs but the cofs website says:

Please note: The cofs device is new in coLinux 0.6.2. It's still in the experimental phase and is very buggy! So don't blame us if it breaks your disk ;)... YES it is, it crashed my server when I tried to rename a file from within coLinux This and other crashes are fixed in coLinux 0.6.3. Please see Cofs in 0.6.3 for a description how to use it there.

so sod that.

One bugbear at the moment is that with a dual-screen setup, andLinux seems to think there is just one big monitor and so windows pop up in the centre of the big screen, windows tend to be too large for one monitor etc. It is something I can live with.

andLinux makes cygwin look mighty primitive. There is always an element of finger crossing to using cygwin and I have struggled to get it working properly with NetBeans. andLinux makes running linux in a vm look like a cludge. If you want to use apps written by developers for developers rather than apps designed by marketing for management and you are compelled by your corporate overlords to do it on a windows box then this is what you want.

Thanks spike!

UPDATE: OMG Konsole is good.


Filed under: andlinux linux ubuntu

Add a comment

Could this be the best of both worlds?

Best of Both Worlds

Best of Both Worlds

On the left we have kubuntu running under vmware player on Windows Vista. To the right we have Outlook and some Vista widgets running on the Vista host.

Vmware player is incredibly solid and linux installs nicely unlike Microsoft Virtual PC which runs into various problems (which Microsoft aren't rushing to fix). Vmware player is free and I prefer it to Vmware server as I don't need the 'server' element. It's missing features like pause/rewind/snapshot so it is less useful for testing setup programs (cannot roll back to a clean o/s install) but is ok if all you want is a simple desktop os. It supports USB, unlike the free versions of VirtualBox.

I found a site called Easy VMX that allows me to make new virtual machines for vmware player so I can build whatever vm's I like.

Somehow (not sure how) the seamless mouse thing works and I can switch between kubuntu and windows just be moving the mouse. Unfortunately cut and paste between them does not seem to be working.

So why use Vista as the host? Because I'd need another license to run it in a vm on a linux host sad

I'm giving kubuntu/KDE a try. Compared to gnome it is either more suited to the power user or more bloated, depending on your viewpoint. I think I'm leaning to krusader as a file manager, I could probably run it under gnome but it costs nothing to try KDE.

TBH there's something about the gnome philosophy of cloning windows that irritates me. KDE may have once used 'non free' software but I don't really care.

Good to see the blog works in Konquerer and the text editor has a spell checker! Ironically Konquerer is flagged in red.


Filed under: kubuntu linux vista vmware

2 Comments

My Mythical Convergence Box was working ok as a mythtv backend but as a server it was frustratingly slow: slow to boot firefox, task switch, run wow, whatever. I was itching to upgrade it.

I decided the cheapest solution was a good old processor/motherboard/memory upgrade so now the box has a Dual Core 64 bit AMD processor, a AMD690GM motherboard and 2g of 800Mhz ram. I also splurged on a 750G SATA hard disk since they were on special offer. I installed the native Ubuntu 64 bit version for a free 64 bit state of the art operating system. Why pay more?

This fixed the performance problems smile

Myth and everything all worked fine, 64 bits did not cause any compatability problems. The 750G disk will hold about 375 hours of TV recordings, should I have 15 solid days (and nights) spare to watch tv.

The motherboard I bought had an AMD/ATI chipset so my biggest problems were getting WoW to run without crashing, ATI's linux drivers not being the best. I used the ones installed by ubuntu, I tried installing newer ones at one point but they made no difference. I tweeked more things than I can remember googling for but the most important thing is to add

SET gxAPI "opengl"

to WTF/Config.wtf as otherwise it tries to runs in direct 3d mode and immediately dies with a fatal exception. The frame rate was then crap and I had to turn all the settings down but it does run wow acceptably: while setting it up I became preoccupied with gathering turtle meat.

The graphics are still odd, there is something wrong with the colour balance that makes everything looks cartoonish and when watching recordings the top line on the display flickers. It's awfully tempting to get an nvidia card..

On my desktop Wow still runs just fine, even with mythtv showing Alien vs Predator on the second monitor. Add a nice mug of coffee and life is sweet.


Filed under: linux moneypit mythtv ubuntu wow

4 Comments

I resolved my issues with Ubuntu hardy heron. Extensive googling revealed I was pretty much alone in my misery so I fixed it the Windows way, with a clean install. To be more accurate, I installed Xubuntu rather than Ubuntu and I'm glad I did. The difference is that I am using xfce rather than gnome and so I'm missing a lot of gee whiz features but, oddly enough, I've never found anything extra in gnome that I can't live without. Gnome development seems to be going in the direction of dumbing it down to make Windows converts feel at ease and all the brilliant new features of gnome are cunningly hidden in case Windows folk turn them on by mistake and their brains explode from the amazement and confusion.

I reinstalled as follows:

  • backed up my xorg.conf in case I broke my carefully crafted X setup.
  • backed up assorted irreplacable stuff in my home directory. How nice it is having a home directory, one place to store all my files.
  • downloaded and blew xubuntu install cd
  • swapped my primary and secondary monitor leads as I am sooo sick of my small secondary monitor being considered the primary monitor (despite my protests).
  • booted cd
  • selected install option
  • cd booted and gaved me a totally orange desktop
  • rebooted cd and pressed f4 for safe graphics mode
  • ran install, carefully overwriting my old linux setup
  • install complete.
  • make sure the nvidia restricted (urgh nasty closed source) driver is installed.
  • Most importantly, run
    sudo aptitude install nvidia-settings
    nvidia-settings
    
    to set up the multi-monitor. I've learn from my last install not to touch the main display control panel.

Um, that's it. It was easy and took maybe 30 minutes (which didn't include downloading the cd image).

Xubutu has a great advantage over ubuntu: a crisp blue theme instead of that brown!

One problem I am having with all the (x)ubuntu work: I have to type my password about 300 times a day, both for ssh and sudo and it is driving me MAD.


Filed under: linux ubuntu xubuntu

2 Comments

I upgraded my home desktop to Ubuntu 8.04 (Hardy Heron) as soon as it came out last week. I used the feature in the Upgrade Manager which told me the new version was available so doing the actual upgrade was fairly idiot proof.

Since then Firefox (version 3 beta) has been broken, the menu's don't work, I click on them and nothing happens, as if they were disabled. Also the user interface locks up after five to ten minutes of doing anything. When it happens again the menu's die, the mouse moves about and some of the panel widgets work but essentially it is useless. Ctrl-alt-backspace fortunately works so I can reboot the desktop and start again.

World of Warcraft is the only thing that works for any period of time ( smile ). Apart from that the system is useless and I've had to use Windows.

I've googled and found other people complaining about 8.04 but they appear to have kernel lockups which would be much more dire.

It's a pity as I had been enjoying using a linux desktop. The only thing that didn't work before was my printer and I hadn't put any effort into fixing that.

I had already upgraded my Mythical Convergence Box to Xubuntu 8.04 which is Ubuntu with a lean mean xfce user interface rather than gnome. Xfce gives a passable Windowsy level of functionality. That box is running just fine and now reacts to the Hauppauge Remote Control. Unfortunately 8.04 has a newer version of mythtv so if I rolled my desktop back to the previous version (gutsy gibbbon) I wouldn't be able to use a gutsy mythtv frontend with the hardy backend and I don't want to roll the myth box back.

When gnome is working on Hardy it has changed it's behaviour somewhat. The application menu works in a contrary way such that the menu is only there while your mouse button is down so you press your mouse down to open it, find your menu item while holding the button down and then release to activate. I can see that this needs just a mouse down and up rather than two clicks but it's annoyingly different, especially as I can't find a way to turn it off.

Gnome also has interesting behaviour when moving windows around in that it tries to guess where you are dragging it to and how big the window will be. I can drag a maximised app from one screen to another and even though the screens are different sizes I get the result I want. I think this may actually be useful once I learn to predict what it is going to do.

Conclusion: I wish I'd waited for 8.0.5 sad I may go back to gutsy on the desktop and live without the myth frontend for a while. I don't want to go back to windows.


Filed under: linux mythtv ubuntu

Add a comment

I set up a cron job to backup my web sites to my Mythical Convergence Box, just a simple rsync of the subversion repository and, to be safe, /var/www. The latter was 500Mbytes.

Next morning the cron job had run and my server was inaccessable. Oops, with 10g of WoW and 10g of family photos I had filled the main disk up, my 250g Myth disk being mounted on /var/lib/mythtv. The box hadn't crashed but it was in a kind of coma, you ask it to do something and it went urgh.

I had to reboot into recovery mode and move the photos to the mythtv disk, leaving me 68%. Observations:

  • Interesting how hard the system failed when the disk filled up. Have to be careful.
  • Linux recovery mode is actually useful! Whenever I've tried the (admittedly pre-vista) Windows recovery modes it has spent a quarter of an hour loading drivers for obscure disk controllers, then I've tried the automated recovery that never works, then I've rebooted, I've waited another quarter hour, then it's given me something with the raw power of a 1985 dos prompt, then I've given up and reformatted the disk.

Last night my cron job worked fine and my websites are so thoroughly backed up that my head is spinning.


Filed under: backup linux ubuntu

Add a comment

I had a need to put an ftp server on my slicehost slice so someone could upload stuff to a site I was hosting. I'd rather avoid ftp as a potential security hole but the alternative is to try to convert them to sftp and also the E editor only supports ftp.

I settled for vsftpd as the ftp server but it took ages to get this person's login to work. I had him set up chrooted to the directory he needed to be in and with his shell set to /bin/false to prevent him logging into a shell. When testing I couldn't log in as him without getting a generic error 530, login denied according to the log file (which didn't feel the need to say why login was denied). Of course my own login was fine.

The answer was in the vsftpd faq, it seems that vsftpd looks through a file called /etc/shells to see if the person connecting has a legitimate login shell and /bin/false wasn't in there. It says this check can be disabled but the incantation didn't work so I had to add /bin/false to the shells file.

I don't quite understand the logic of this design. Isn't it fairly standard to have users who can ftp in but not login? The /bin/false trick was following a precedent from the noble ubuntu/debian distributions.

I'm getting into the habit now of adding any file I edit in /etc to subversion (as noted here), if only as a way to keep track of which ones I have fiddled with. The 95% that I don't need to touch are not in subversion. I like this, I can recall what I did and why (through subversion comments) which will help me restore the system or replicate it. That way, next time I need to install vsftpd I can recall what other obscure system files need tweeking.


Filed under: ftp linux subversion vsftpd

2 Comments

I forgot to blog that over christmas I had a brief look at the state of the art in linux desktop distributions. I tried three, two from cover disks in 'Linux Format' magazine:

Ubuntu 7.10
Interesting to see that the ubuntu CD is now a live CD that boots to let you play with it but the desktop has an 'install' shortcut so you can install it as well. Nice presentation.
Fedora 8
This installed nicely and was ok, a bit like Ubuntu but blue. Seen one gnome desktop, seen them all.
PCLinuxOS
This was an interesting new distribution that uses KDE rather than gnome and also uses apt for repositories which I still prefer to rpm/yum.

These distributions all have the nice new Beryl/Compiz guis to give Vista style windows animations (I like the bouncing effect) but what I really liked was the 'cube', a quick way to move between virtual desktops using the keyboard. Unfortunately none of them would work properly with my home desktop multi-monitor setup despite hours wasted editing X config files. Is it really at the limit of modern computer science for X to not get confused as to which monitor is which? Do microsoft have a patent on it? I got it running apart from the title bars not appearing on windows (ffs).

I ended up installing PCLinuxOS on my laptop (Dell D410) as I decided I like the depth of KDE compared to gnomes attempt to mimic windows 'simplicity'. Unfortunately I'm now in a situation where I have to sign in as root to get it to connect to a wireless network (argh). There's probably an easy way to do this but in the googling I have done it has eluded me thus far. If it weren't for this I'd be perfectly happy with it on the laptop. I'm not sure the battery life is as good as it is with Windows but with its extended life battery it runs for a couple of hours between charges which is about as long as I get to use it.

Conclusion: the year of the linux laptop maybe, probably not the desktop.


Filed under: linux ubuntu

Add a comment