Archive for August, 2009

Linux Nirvana - A webcam that actually works on my PC (also with Skype)

Monday, August 31st, 2009

It’s been a long time coming, over three and one half years, but I can finally put all the hardware in the house to good use and use my PC (internet wise) as I was using Windows. And using a Sony Playstation Eyetoy to boot!

From my post on ubuntuforums, here is how to get the eyetoy working with Skype:

Close Skype before continuing.

Using K/X/Ubuntu 9.04 +, the gspca module in the kernel will run the eyetoy cam as a webcam, but to use it under Skype, and to prevent the pink and green horizontal lines, you need to edit the config file. This is tucked away in your home directory:

/home/user/.Skype/skype-user/config.xml

where user is your login, and skype-user is your skype login

If you are the cautious type, back up this file first:

cp /home/user/.Skype/skype-user/config.xml /home/user/.Skype/skype-user/config.xml.bak

Open up the config.xml file in your text editor, and browse down through the file, you should find a <Video>…</Video> section.Add the following:

<CaptureHeight>480</CaptureHeight>
<CaptureWidth>640</CaptureWidth>
<RecvPolicy>callpolicy</RecvPolicy>

Mine looks like this:

…..</StatsSender>
<Video>
<AutoSend>1</AutoSend>
<CaptureHeight>480</CaptureHeight>
<CaptureWidth>640</CaptureWidth>
<Device>/dev/video3</Device>
<Disable>0</Disable>
<RecvPolicy>callpolicy</RecvPolicy>
</Video>
<table_insert_history>….

Start up Skype and head for video settings to select and test.

You can also select the Eyetoy Microphone to use, you may need to play around with your main sound settings to get this working. I had to change from Mic2 to Mic1 in Sound Settings / Mixer, and of course chose eyetoy microphone in audio settings in Skype

GeeXBoX playback at fullscreen on LCD TV

Sunday, August 30th, 2009

This has been an issue for me for quite a while, but I have simply overcome it by using the menu to change the aspect ratio.

It all stems from the perplexing confusion of recording dvb tv for later playback. Watching live TV on the TV, the picture fills the screen. It’s a 16:9 42″ TV (720p). When I record dvb tv using my main pc in its raw .ts state it is 720×576 (16:9). If I play this back using the GeexBox, mplayer squeezes the picture to a display of something like Cinemascope, so a change of aspect ratio to 4:3 usually sorts this out. But it got me thinking, if the original video is 16:9 why doesn’t play as such? The Pc in use to run GeexBox has an nvidia 6200 and is connected to the TV using VGA (DVI/HDMI went “pop” a while ago on the TV!).

First off, I tried all sorts of encoding options, changing the aspect ratio and resolution using mencoder. I got some success if I encoded with aspect=4/3 as an option. but this still didn’t make sense; if I had a 16:9 aspect ratio TV, why the original video didn’t fit.

This is what I did to sort things out. I have a HDD install of GeexBox so can ftp in to edit files. If you use a live cd, then you will need to edit the files before you generate a custom iso.

Boot up the GeexBox

FTP in, and make doubly sure you get into the right place

/mnt/GeexBox-partition/GEEXBOX/etc

Open up tvout in that directory and change the Aspect Ratio line to this:

TVOUT_ASPECT=”16:9″

and save.
By just making this change alone, it squeezed my display horizontally to make a 4:3 image, so more to do

Browse to /mnt/Geexbox-partition/GEEXBOX/etc/mplayer and open up mplayer.conf
In the [default] section, add the following two lines:

monitoraspect=”16:9″

aspect=”16:9″

and save. It may be worth noting that I have vo=vidix,vesa in the default section of mplayer.conf

Log out of the ftp and reboot the GeexBox. The Main Menu and background.avi should be filling the screen.

Now try playing any recorded dvb tv or video that was previously letterboxed, even though it was 16:9 ratio or 720×576 resolution. You should see it playback in full screen.

Caveats: This may not work in your setup, and you may not need to make all the adjustments to get this to work, this is what worked for me.

Useful copy command for backing up

Tuesday, August 18th, 2009

Don’t like backup programs, but I do like cp. I save all my work to an external HDD but I like to make a copy of this onto my server, prior to burning. As I don’t do things in sequence, I may need to make several “backups” before commiting to disk, so needed an easy way of only copying over changed or new files:

cp -urvp /pathto/externaldrive/* /pathto/backup/directory/

What does it all do?

cp         the copy command

-u         update only new or changed files with a newer date

-r          recursive to all sub directories

-v          verbose, tell me what is happening

-p          preserve file attributes

In my case, the path to the external HDD is /media/HANDY120/* - (the device is a Fujitsu HandyDrive 120GB) . Don’t forget the / and the * at the end to ensure everything on the drive is copied.

The path to the backup location can be anywhere, but you must use the same route each time

Surely Not? Linux User Moves to Windows 7?

Monday, August 10th, 2009

Windows 7 to replace Xubuntu?

Whenever a new version of Windows comes out, I am normally one of the first to go grab a copy. Think into “grab” what you like, from the past, but with the arrival of Windows 7 I went for the RC which was on off for free to use until June 2010.

I thought, we’ll have a look, but I can’t see how they will have learnt any lessons after the resource hog they created with Vista. How wrong, install was under half an hour on my Shuttle SN41, boot up time from cold was under a minute to usable desktop, and ram usage was around 380mb, down by 200 mb on Vista, whilst CPU activity was next to nothing. No drag, no delays, no problems…. hang on, all I have done in the last three years is use linux, and found the need to move towards lighter and lighter systems to maintain speed and productivity. Yep, but W7 seems to be a real contender, until June 2010 comes round!

OK, its one thing to get the OS up and running, can I “do” everything I can do on Xubuntu 9.04, and access my linux server (that one won’t be changing!). This is a work in progress, but here we go so far:

  1. Remove the watermark about evaluation. easily found on the net
  2. ExtFsd - provides access to ext3 partitions on the HDD
  3. Ensure samba server up and running on the linux server (it is, for my kids and their windows PCs)
  4. Install Winrar - I know I will have to download some rar files to get up to speed
  5. Firefox - IE8 shoved politely to one side, all required extensions installed nicely
  6. Putty - now able to ssh into server
  7. UltraVNC - now able to vnc to server and other boxes
  8. Geany - helps to overcome linux text files, and mirrors usage on Xubuntu. No need for any other text editor.
  9. VLC - mplayer won’t do dvb on Windows yet, so VLC for viewing and recording dvb streams. Will have to spend some time writing batch files to ease planned recordings and viewings, but had to do this on Linux.
  10. Brother MFP drivers - original CD no good for W7, but Vista drivers on the Brother site did the job.
  11. Gwhere - yes there is a Windows version - for cataloging DVDs
  12. Skype - and the Eyetoy webcam experience is here at last :)
  13. CDBurnerXP - on trial as I write. My trusty Nero OEM CD proved to be no good for W7

To come:

  • pdf access and creation
  • image editing (this will probably be photofiltre)
  • video encoding will get shunted off to the server for mencoder to deal with, don’t do video editing as a rule

Note: All mail is up on Google, so no need for a mail client, as with Calendar & To Do, and Google Docs will do if I do not install OO.  For work I have to use Windows, and need access to full Acrobat, Illustrator, IE6+ for Management
systems, and Sage for accounting. I try to emulate this at home, so do need Windows in some form.

Issues

  1. a. Several little crashes of programs, and on one occasion the vlc.exe file disappeared, requiring a reinstall
  2. Tried, but could not get NFS Services to work, so gave up and used samba instead
  3. vlc is a swine to use for dvb but I’ll get there
  4. mplayer / smplayer crashed and burned when trying to play video over smb shares and killed the Aero effect until I rebooted.
  5. WMP OK for occasional mp3 play, but never saves playlist automatically. Failed to play most of the videos I threw at it
  6. Windows Media Center just so unintuitive, and bring machine to its knees. such a shame, it looks great. Has been “dumbed down” so little chance to configure precisely
  7. Navigating the file system, and the layout of Windows Explorer is quite alien (might seek out something more simple!)
  8. Perhaps most worrying was the dirth of useful information on the net about how to get setup, in particular with regard to dvb and vlc.  (A new user coming from Linux would struggle!!! :)
  9. Seems to grind to a halt after a while, needing a reboot to get back to normal

It scares me just how much I have forgotten about Windows and how it works, but for an underlying OS, it seems pretty  stable and responsive, and very usable on my oldish hardware.

Watch this space for more adventures from a linux user on Windows :)

Two Servers Into One

Sunday, August 9th, 2009

For the last couple of years I have had two boxes running out in the garage providing up a variety of services to the rest of the house, and “the world”. Mostly used though for a storage repository.

Services running on Box1:

Ubuntu Fiesty
nfs sharing
Apache
GNUmp3d
ssh
vnc

Services running on Box 2

Ubuntu Fiesty
nfs sharing
ssh
virtualbox headless

I had eight hard drives in these two boxes, but some of the smaller ones were not in use, and also, due to not updating regularly Fiesty was now refusing to update on both machines.

Time for some rationalisation, so decided to cram everything into one box.

Box 2 seemed the one to go for, given that I had an IDE controller card in there, to allow for 4 x HDDs and a CDrom.

Did some fancy work on the partitions of the key drive in preparation for a fresh install of Jaunty, and shunted loads of data about (Music/Video and back ups from other PCs in the house). That which I could move immediately I saved for later to do across the network.

Jaunty Xubuntu install went fine (I do a full desktop install as this cuts down on dependency hell later on for things like virtualbox, but alos provides a desktop / vnc experience when I am feeling lazy! I usually log out of the desktop and kill gdm when not working on the server with gui)

Services installed:

gnump3d - just the best browser accessed music sharing server, now out of the Ubuntu repos, unbelievably!
nfs - the easiest way to share files on a linux network
samba - for my kids who won’t use linux ( I resisted samba like the plague for over two years, but this howto has redeemed it, IMHO!)
ssh - for command line access
screen - for running things when logged out
virtualbox - to run an XP for access via rdesktop
aria2 - command line file downloader
mplayer/mencoder - for encoding of TV programs as described here
moc - I have hooked up some speakers so I can listen to music in the garage when working on cars/boats etc
mc - command line file management
ushare - for upnp file sharing to GeexBox(this is brilliant!) and XBox(this is rubbish!)
vsftpd - ftp server for when I need one, directed at none media files :)
fail2ban - helps to cut down/protect ssh from outside attack
transmission - its there if I need a torrent/ want to seed, fortunately it runs in command line mode too, but aria2 can cope with torrents too

I have opened up a couple of ports on the router to allow external access, so I can get at things from work / elsewhere.

This was chugging away fine until we went away for a week. I switched the box off. On booting up when we came back, the IDE controller refused to work. So I had to unplug the cdrom, and go master/slave with the four drives. This is only annoying when its time to use a CD/DVD!

The Box?

Foxconn motherboard
AMD 1.4 mhz single core processor
RAM 1.5 gb
HDD Hitchi 500gb / Samsung 400gb / Samsung 250gb / Maxtor 160gb All PATA