Peter's Blog

Redefining the Impossible

Items filed under ubuntu


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

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 have a number of pcs running linux now that I have hooked together. Copying files between them is a matter of uttering scp invocations along the lines of

scp me@there:/path/to/file ~/put/it/there

With ssh keys set up there is no need to enter a password but still this precludes the use of luxuries like file browsers. To cover this there is sshfs which invisibly turns an sftp login into a file system so the files on the remote box look like they are on the local hard disk. But then there is still the hassle of mounting them when you want to use them.

Along comes autofs and this is coolness, it means that the connection to the server is made automatically whenever one tries to access the file. The connection will disconnect automatically if it is not used so it is not permanently using resources like an fstab entry would.

Peter's notes:

  • switch to root
    sudo -i
    
  • enter
    ssh-keygen
    
    and keep pressing enter until it stops hassling you
  • enter
    ssh-copy-id user@server
    
    where user@server is the remote account you want to sftp to. ssh-copy-id is my BIG discovery today, it sticks your public key in the remote servers ~/.ssh/authorized_keys file saving much tedium.
  • run
    aptitude install autofs sshfs
    
    and press Y if it asks.
  • vim /etc/auto.master and add:
    /mnt/ssh /etc/auto.sshfs        uid=1000,gid=1000,--timeout=30,--ghost
    
    which maps anything in /mnt/ssh to an automatic file system. Your /mnt directory should already exist but /mnt/ssh will be created for you by autofs.
  • vim /etc/auto.sshfs and add your shares:
    desktop  -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#peter@desktop\:/
    
    this links /mnt/ssh/desktop to the root directory of my desktop pc.
  • run
    /etc/init.d/autofs restart
    
  • exit out of the sudo
  • run
    ls /mnt/ssh/desktop
    
    and relish how cool all this is.
Autofs plus Sshfs

Autofs plus Sshfs

On the left, my desktop as viewed from the Mythical Convergence Box, on the right Peter's Blog on Slicehost.

An important thing to underline is that since the connection is made as root it is necessary for root to have an ssh key to the ssh account that is sharing the files, NOT from your own user account.

Since this uses sftp it is secure and easy to pass through firewalls etc. I copied 9G of photos over the link from desktop to convergence box in maybe ten minutes so the performance is reasonable.

Thanks to this guy who figured out the incantations.


Add a comment

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 have been living with the Mythical Convergence Box for nearly two weeks and have found the first batch of shortcomings:

  • Recordings on Dave channel and CBeebies had intermittent noise on sound and vision, a glitch every ten seconds or so. Very irritating, even when babies are watching lazytown. Reception on Channel 4 and ITV2 were immaculate so babies watched Dora the Explorer. Once I noticed it said 49% signal strength on the banner when I changed channels I decided a more sensitive tuner was in order.
  • It was programmed to record Top Gear and Dragons Den on Dave channel plus various baby programs and hence the tuner was almost always busy and unavailable for live tv.
  • As a PC it is sluggish.
  • The cordless keyboard is intermittent at the far reaches of my room, e.g. my computer desk.
  • The commercial skipping does not work on Dave channel sad Top Gear is edited down from one hour to about forty minutes then they stick 20 minutes of ads on during the program (not between programs). Top Gear looks wonderful on the 42" plasma.

So I bought a hauppauge WinTV Nova-T-500 dual tuner DVB card. This has two tuners and both are (purportedly) more sensitive. It comes with a remote and an IR receiver.

Installation on Ubuntu (gutsy 7.10) was simplicity. The MythTV Wiki goes into great depth about compiling kernel modules but none of this is necessary with ubuntu it Just Works smile

Here are the steps I took:

  • plug card in
  • download firmware and copy to /lib/firmware. The link to the firmware is on this page which is more likely to be maintained than this one blog post.
  • edit /etc/modprobe.d/options and add
    options dvb-usb-dib0700 force_lna_activation=1
    
  • rmmod dvb-usb-dib0700
  • modprobe dvb-usb-dib0700
  • run
    dmesg
    
    and the ending should give some blurb about dvb loading successfully. Mine didn't first time, I had to rename the firmware file to the name it complained that was missing, then rmmod/modprobe again.
  • Go into MythTV and add the two tuners as capture cards on adapters 0 and 1.

(ok maybe 'Just Works' is a bit strong).

It seems to have cured my noisy recording problems (signal strengths now about 60%) and the scheduler is recording even more voraciously now it has two tuners available: the second tuner is picking up missed lazytown while the first is recording Top Gear four times a day (it is supposed to avoid duplicate recordings but it still managed to scoop up 63 episodes in less than two weeks: maybe 'Dave' channel should have been called 'Jeremy'?).

I found I was able to watch a recording while it simultaneously recorded two other programs. That is pretty good but:

  • even a 1.7 psuedogig cpu must be as good as the thing in my old sky plus box
  • recording DVB-T is just a matter of dumping the mpg stream to the disk.

The recordings have subtitles which I need while exercising as my equipment, especially the exercise bike, is very noisy. I can't exercise without entertainment.

I haven't set up the remote yet but the MythTV Wiki seems to have that covered. Hopefully the remote will be more reliable in the 10-15 feet range and, more importantly, I won't be the only person in the house who can work it.


Filed under: 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

My XFX GX5200 graphics card came and I fitted it in my MythTV box. Ok a GX5200 is an old card but it had to be AGP with DVI and I found nothing more recent that would suit. It cured my playback problems and worked fine with my 42PFP5532D.

Now It's a PVR

/images/MythAsTV.jpg

Immaculate viewing of Tellytubbies. The box is that thing on the floor bottom left. I'm going to hide it behind the TV once the dust settles. I have MythTV doing the following:

  • PVR
  • Photo Gallery
  • DVD Player/Ripper/Burner

it can do more but I haven't set that up yet. Critiques:

PVR
my reception sometimes gets compression artifact noise but I haven't pinned this down to TV reception or cpu loading or both. It is bad on 'Dave' channel but then I record 'Top Gear' and 'Dragons Den' all the time on that channel. It was bad while rsyncing 10g of Wow over the network AND watching Dave so I need to take out some variables to trace this one. The CPU is 1700 gigahertz but if I recall correctly, AMD have their own definition of gigahertz. CBeebies and CITV (i.e. Dora the Explorer) are fine.
Photo Gallery
Copied 5G of family photo's on it. The folders are shown in random order and changing settings doesn't seem to have any effect. The photo's look great on a 42" plasma, like posters. Very sluggish if I open a 20M scan file.
DVD Player/Ripper/Burner
seem to have to tell the DVD burner two or three times what tracks you want on the DVD. When it is blowing the DVD it runs some python scripts that do the transcoding and blowing. During this time you sit and look at the command line output in a window, no progress bars and I didn't try to see if I could watch TV while it was going on. In tests it couldn't rip my legally purchased Gladiator CD due to IO errors but that one has always been problematic. It ripped a number of other DVD's but didn't compress the files so the four dvd's are occupying 90G of disk space.

It is interesting that Ubuntu doesn't come with any packages to crack DVD's but it does include a command line script that makes setting this up quite easy.

Now It's a PC

/images/MythAsLinux.jpg

CTRL-ALT-Right on the logitech wireless keyboard (which, with mouse was a bargain for £20) switches me to a linux desktop and a terminal prompt. I need to wear my glasses to read anything. Here I have firefox etc so I'm all set up to cheat at TV quiz shows.

Now It's a Game Station

/images/MythAsWow.jpg

It took me a while to get Wow running smoothly (that's Maexyn). It turns out that it doesn't cooperate well with compiz so turning that off made it viable. I lose the shadows and stuff but I don't care when it comes to getting Wow running. The box isn't that beefy and Wow runs like it does on my laptop, not as nice as the desktop but usable although I need my glasses again in the auction house. Since the MythTV box is always on, a quick transmute is only a minute away. WoW runs at 1280x768 on the plasma, the same resolution asf the desktop so I can still CTRL-ALT-RIGHT to the desktop with no nasty clunky resolution changes. For a proper playing session I would still use the desktop.

Now It's a Server

/images/MythDesktop.jpg

My desktop pc running MythFrontend on the small screen to watch a Balamory from the myth backend (Balamory for demonstration purposes!) and Wow on the big screen (that's Maevyn), both on an Ubuntu desktop. Disabling compiz made both applications run MUCH better, for example they both had borders and could be moved around the screen! Disabling compiz doesn't seem to have cost me any functionality, just eye candy (no wobbly windows sad). The server box doesn't have a DVD burner in it but I can use the burner in my desktop pc.

If anyone is wondering why I bothered with a MythTV box rather than some off-the-shelf appliance:

  • the hardware upgrades for my old box cost me less than a Vista upgrade.
  • no DRM
  • automatic commercial skipping
  • it is fundamentally a linux server box and hence is infinitely flexible. I can back up my web sites to it VERY cheaply, just by rsyncing through ssh tunnels. If my ADSL upload speed wasn't so poor it could host my web sites.

One thing missing is iTunes... come back DRM laden appliances, all is forgiven.

Ironically, something I have been recording is The Big Bang Theory. I think those guys would love my setup...


Filed under: mythtv ubuntu wow

4 Comments

My home server currently has no monitor attached (new video card today?) and it would be useful to have access to a gui, mainly for the benefit of mythtv where not everything can be done from the command line.

I suddenly realised there is an easy way to get a remote desktop, good old vnc.

So I installed the tightvncserver package and started it with

vncserver

and sure enough I had a remote desktop but a very stark one with nothing but a terminal window, none of the gnome desktop panels (i.e. the gnome equivalent of the 'start' menu, taskbars etc).

Some research determined that these could be added thusly:

  • edit ~/.vnc/xstartup
  • add this at the bottom:
    gnome-panel 2> /dev/null &
    

The background is still stark (grey, no wallpaper etc) but that is ok for a vnc connection. The important thing is that the menus are there.

I'm editing this via firefox on the remote desktop using vnc over an ssh tunnel. I'm trying to think of ways to get more links in the chain.


Filed under: ubuntu vnc

5 Comments

I had all kinds of things planned for the easter break but got massively sidetracked.

I picked up a copy of 'Linux Format' magazine and it had an article about Wine, saying how it was possible to run Dreamweaver and World of Warcraft on Linux and I decided to have a try.

Picking up from my last try I decided to try installing on my home desktop but that I wouldn't worry if the compiz/beryl flashy eye candy didn't work. I installed ubuntu 7.10 from the Linux Format cover disk and it seemed to be a newer version of ubuntu than I tried before so I gave the compiz stuff a go anyway. I soon had the same problems as before, broken desktop and xorg.conf angst. I broke the system so hard I decided to just reinstall and try again.

This time I avoided using the ubuntu 'Screens and Resolutions' thing in the system menu but instead used the proper nvidia tools: 'nvidia-settings'. This tool allowed me to set up twinhead and get both desktop monitors running. Ubuntu still treats my second monitor as the main (the login prompt comes up there) but I can live with it. I could swap the two monitor cables but...

I was able to get some nice compiz gimmicks going such as the wobbly windows: you move a window and it wobbles like jelly. I played with themes and got the desktop setup up with something with nice transluscent effects in blue: I really dislike the ubuntu brown!

The system I set up was very nice. I am very fluent with linux command prompts at the moment through tweeking remote servers all the time so a linux system seems natural. Ubuntu is very nicely set up and most things Just Work. I installed ruby on it and was surprised how fast a rails application boots in a more native linux environment compared to booting on windows on the same box. Rails development on this system is going to be fine.

I copied World of Warcraft from the windows partition, tweeked it to use opengl rather than directX and that worked too, albeit with some funnies related to having a preference for the second monitor and the mouse not working if I started it on the primary (24" widescreen) monitor. When I did get it running it was nice and smooth and perfectly playable although I had the sound off (haven't used sound in wow for a long time, last time I turned it on I found it annoying, in the AH the continual uuuurgh noise of people dismounting as they came in).

What next? I had a server box under my desk that I have been planning to set up as a mythtv backend, the plan being to have it running all the time as a PVR driving my 42" philips plasma. I had been planning to buy a new TV tuner card, probably a Hauppauge Nova-t 500 dual tuner, but decided to try it with my old nova-t usb which has been gathering dust since 2006 due to the dire state of software at that time. It turned out that ubuntu 7.10 had all the support I needed and found the nova-t automatically. I had to find a copy of the firmware to get it running but eventually I got it to find all the stations on the local transmitter. This is DVB-T aka freeview so has about 30 TV channels and more radio stations than I care about (as long as there is radio 2 in the car I have all the radio I need).

I installed the ubuntu mythtv backend package and Ubuntu proceeded to install about 80 sub-packages including mysql database server and exim mail server (?). I ran through mythtv-settings and got it going.

I found to my horror that my 42" plasma didn't have a vga port so I had to plug a monitor into the box to see anything (thus far I had been using an ssh terminal from my laptop). I set it running cbeebies as my daughter was helping me and the picture was poor: much stuttering. I decided the problem may be cpu speed of an older system trying to display video using an integrated chipset so I thought I'd try watching on a remote client. I installed the mythtv frontend on my laptop and it again installed 80 packages, including mysql and exim! On a client! Anyway I tuned it into the server and got a good picture, smooth and no stuttering, my daughter was suitably engrossed in Lazytown. I was impressed and decided to install the myth frontend on my desktop. It couldn't connect to the live tv as it was in use but myth records every program you watch and I could watch the recordings. And it handled it! I had live tv on the laptop and a recording running on the desktop at the same time from the same server box and pretty smoothly too! I found that when I did the alt-tab thing to change the active application, the preview window had live video in it! I had compiz set up to make inactive applications slightly grey and transluscent and I could see the desktop through the video!

The more I looked at mythtv the more impressed I was. I installed the 'mythweb' package on the server which installed apache and php (sad) but gave me a web-based front end that shows me 8 days worth of scheduling (gathered from the dvb-t). I can click on a program and get it to record that program, that timeslot or any program of that name on that channel- brilliant! I can search for program by name! The listing of recorded programs includes a screenshot from the recording!

/images/TopGear.jpg

Jeremy Clarkson never looked so good.

My one mythtv problem.. the damn picture still keeps coming up on the second screen on my desktop and there are no borders to allow it to be moved or resized like a normal application (it has an option to specify a xinerama screen number but I'm not using xinerama, I'm using twinview...).

Despite this I rushed out and bought a 250g hard disk which will store about 125 hours of recordings and got a Logitech cordless mouse and keyboard for £20. There were no video cards in the shops with DVI (which will connect to the HDMI port on my TV) and AGP (modern cards are all PCI-E) so I've ordered one from Amazon for £25.

I'm all inspired by mythtv and the potential:

  • schedule recordings by emailing it from my mobile
  • saving recordings to DVD
  • family photo album easily available to spouse
  • central tv recorder that could be viewed all round the house (long term dream of mine)
  • now sure about this but maybe download video podcasts to watch like tv recordings? It includes an rss reader. Surely in five years time this will be how tv is done?
  • automatic commercial skipping (!)
  • transcoding overnight to save disk space

I'm also quite looking forward to running wow on a 42" plasma... where's that postman?


Filed under: mythtv ubuntu wow

Add a comment