Archive for the ‘Stuff’ Category

Am I Open Source or What? (on a Windows 7 PC ?)

Thursday, March 11th, 2010

Because so much good open source software has been ported to Windows, its possible to do just about everything on Windows with the open source programs I use regularly on my main Xubuntu 9.10 system:

Open Office
Abiword
Gnumeric (a bit buggy)
Gimp
Inkscape
Gwhere
Geany
Audacity
ProjectX (java)
HJSplit (java)
Frostwire (java)
VirtualBox
FireFTP (firefox extension)
This list will grow. Keep up the good work guys :)

Create GeeXBoX LiveUSB using UnetBootIn on Linux

Monday, January 4th, 2010

I know we have the win32 installer,
I know we can install to USB from CD,
but I wanted to use only Linux to
create a live USB that replicates the CD.

Requirements

UnetBootIn (in Xubuntu repos)
Standard or Custom GeexBox iso ( I used a Custom GeexBox 1.2.3)
USB Flash Drive (Used a Buffalo 1GB)

This all carried out on Xubuntu 9.04

Part I - Create Bootable USB Drive

Insert USB Drive to your PC running Linux (Ubuntu etc)
Start UnetBootIn
Tick the Disk Image Radio Button, ensure ISO is selected in the drop down and then select your GeexBox iso
Select your USB drive from the drop down box
Click OK and Wait until you get the Reboot or Exit buttons appear
Click Exit

Part II - Get the right GEEXBOX directory

Mount the GeexBox iso so you can access files
I use Gmountiso but you can create a directory and issue a command in the terminal

sudo mkdir /media/gb-iso
sudo mount -o loop /path/to/geexbox.iso /media/gb-iso

Go to your root directory of your USB drive and delete (yes, delete!) the entire GEEXBOX directory
Got to /media/gb-iso and copy the GEEXBOX directory, pasting it to the root of your USB drive.

Why have we done this? UnetBootIn does something to the GEEXBOX directory files, you need the unadulterated ones on the iso.

Part III - Edit syslinux.cfg

In a terminal, run the command:

sudo blkid -L

On newer systems (e.g. Karmic) run

sudo blkid

or

sudo blkid -o full

You will get all the UUID’s from your drives and partitions.
Note down the UUID for your USB drive
Mine was 0633-157B

Open up syslinux.cfg on the USB drive in your favourite text editor
Make it look like this:

########################################
default vesamenu.c32
prompt 0
timeout 20

MENU BACKGROUND /GEEXBOX/boot/splash.png
MENU TITLE Welcome to GeeXboX i386 1.2.3 (C) 2002-2009
MENU VSHIFT 11
MENU ROWS 6
MENU TABMSGROW 15
MENU CMDLINEROW 14
MENU HELPMSGROW 16
MENU TABMSG Press [Tab] to edit options, [F1] for boot options.
MENU COLOR sel 7;37;40 #e0000000 #fa833b all
MENU COLOR border 30;44 #00000000 #00000000 none

label ubnentry0
menu label Start GeeXboX …
kernel /GEEXBOX/boot/vmlinuz
append initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=UUID=0633-157B lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789 video=vesafb:ywrap,mtrr quiet

label ubnentry1
menu label Start GeeXboX for HDTV …
kernel /GEEXBOX/boot/vmlinuz
append initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=UUID=0633-157B lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789 video=vesafb:ywrap,mtrr hdtv quiet

label ubnentry2
menu label Install GeeXboX to disk …
kernel /GEEXBOX/boot/vmlinuz
append initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=UUID=0633-157B lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789 video=vesafb:ywrap,mtrr installator quiet

label ubnentry3
menu label Start in debugging mode …
kernel /GEEXBOX/boot/vmlinuz
append initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=UUID=0633-157B lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=0 vga=789 video=vesafb:ywrap,mtrr debugging

label ubnentry4
menu label Start HDTV edition in debugging mode …
kernel /GEEXBOX/boot/vmlinuz
append initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=UUID=0633-157B lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=0 vga=789 video=vesafb:ywrap,mtrr hdtv debugging

########################################

Make sure you replace my UUID entry with your own for each stanza

Save syslinux.cfg

Part IV - Clean Up

Unmount the iso

sudo umount /media/gb-iso

Delete the directory if you wish

sudo rmdir /media/gb-iso

You are done. Either safely remove your USB drive, or leave it in and reboot.
You may need to edit your bios settings to allow booting from USB.
And there you have it, LiveUSB, just like the CD, but you can edit settings if you wish.

Grub Menu not Visible after attaching new widescreen Monitor! Solved!

Wednesday, November 18th, 2009

Was time to treat myself to an early Christmas present, so splashed out on the ridiculously cheap HannsG HH241 24″, 1980×1080 WUXGA monitor @ £140. Comes with a VGA-VGAcable abd a DVI-HDMI cable (monitor has an HDMI port)

Plugged it in, powered up.

Nvidia Geoforce 6200 Graphics card with DVI/VGA output
HannsG HH241 24″ widescreen 1980×1080 WUXGA, HDMI 1.3 compatible
Multibooting @ 5 OS’s

PC booted up fine with post/bios screen viewable, then a blank screen for a few seconds (where grub menu usually is, then usual starting up for Xubuntu 9.04 (the default OS in my grub menu (grub legacy)

Once X was running everything fine.

Tried all sorts, reinstalling grub to mbr, reconfiguring X, checked for settings in bios (none obvious), but nothing changed.

So switched to VGA-VGA cable, and grub menu was back. So I am kind of sorted, but wavy lines and distorted image during post and splash, and was getting a better picture and all round performance using the hdmi connection.

Previous monitor, an Iiyama 17″ LCD worked fine on a DVI-DVI cable.

Also, Xubuntu Progess screen during boot up was not centred, off to the right a bit.

After hours and hours and hours of googling, finally found a post about toshiba laptop owners not getting grub on a cold reboot. The recommendation was to install grub2
To install grub2 on Jaunty or below

sudo apt-get install grub2

Test it by loading grub2 as chainloader (this option is offered on installation)
You’ll need to “e” “e” and change root to uuid to get the chainloader to work

If you are happy run

sudo upgrade-from-grub-legacy

and grub2 will take over, And lo and behold, the grub menu is back! New things to learn in order to customise grub2 menu, and set up a splash image for it.  Xubuntu progress splash also nicely centred.

Best place to go for just about everything grub2 is here

get_iplayer - Command Line Downloader for BBC iplayer

Saturday, November 7th, 2009

get_iplayer

My favourite program of the moment which exceeds the delivery of the iPlayer on Windows in just about every way!

To get the best out of it, download the latest version (and everything else you need) from here, and also make sure you have the following installed to make the most of the features available:

flvstreamer
ffmpeg
mplayer

(If you must install on Windows, there is an installer which takes care of everything for you)

flvstreamer is especially useful for getting higher quality versions of programmes, but you may have to fiddle about with the location of the file and its permissions to get things working correctly.

Ok, here are the commands I use the most:

get_iplayer
(this gathers a full index of programmes available)

get_iplayer keyword
(gathers index but also finds matches for “keyword” of your choice, e.g. Dr Who or Casualty)

Running the two above will show you the index number for the programme. Use this as follows:

get_iplayer –info 123
(will provide detailed info about the programme, including the various versions and qualities available)

get_iplayer -get 123
(will download the default version, usually iPhone - mov quality)

get_iplayer -get 123 modes=flashhigh flvstreamer=’/usr/bin/flvstreamer’
(will download a higher quality version in mp4 format using flvstreamer, my binary is located in /usr/bin/)

Finally

get_iplayer –update
(simply checks for any updates to get_iplayer and installs them)

Further commands, help and information here

Dual Booting Karmic and Jaunty and then using grub-legacy

Saturday, November 7th, 2009

What a palava. Grub2 will become the defacto standard in time, but right now I am not quite ready to switch over. Having installed Karmic to a separate partition, and chosen to install grub2 to the local root (not mbr) I could not chainload boot to karmic from grub legacy.

So, bootedup the live cd again and installed Grub2 to the mbr. Instructions on how to do this can be found here.

OK, good. Boot up Karmic now, and run “sudo update-grub” in order to load up all the other OS’s into Grub2 menu.

While you are in Karmic, open up the grub.cfg file and copy out the boot menu info for Karmic (you will need this later to put into your grub-legacy menu.lst) Should look something like this:

“sudo nano /boot/grub/grub.cfg”

menuentry “Ubuntu, Linux 2.6.31-14-generic” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,10)
search –no-floppy –fs-uuid –set b50237f3-c90c-4af6-a275-892a09165ea3
linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=b50237f3-c90c-4af6-a275-892a09165ea3 ro   quiet splash
initrd    /boot/initrd.img-2.6.31-14-generic

Now reboot, and you should be OK to boot back into Jaunty.

In Jaunty, open up menu.lst, and add the following entry to your “Other Operating Systems” section

title       Xubuntu Karmic Koala
uuid       b50237f3-c90c-4af6-a275-892a09165ea3
kernel    /vmlinuz root=UUID=b50237f3-c90c-4af6-a275-892a09165ea3 ro  quiet splash
initrd    /initrd.img
quiet

You’ll see why you needed the info from grub.cfg to insert the UUID information. This layout, I believe also has the benefit of coping with kernal updates to Karmic.

Save your menu.lst file, and reboot. You should now have an entry for Karmic and it should boot.  :)

HJSplit with Zenity (Thunar custom action)

Saturday, November 7th, 2009

Lots of large files come down split up into pieces using HJSplit. It’s a bit of a slog to do the joining manually, so here is a simple command line that solves the problem as a thunar custom action

java -jar /path_to/hjsplit_g.jar -c join -f %f

of course you need sun java installed  :)

Permanently Remove Files with Zenity (Thunar custom action)

Saturday, November 7th, 2009

 Have previously used xdialog for this, but it was time to update to zenity

zenity –question –width 640 –height 240 –title=”Permanently Remove Files” –text=”Are you sure you want to remove these files? \n\n %N”; if [ $? = 0 ] ; then rm -r %F ; else exit; fi

You do get a sanity check before you decide to delete, and of course, DON’T run this on /        :)

Set Firefox mailto links to GMail/Googlemail

Saturday, September 5th, 2009

Nice easy tip this one.

Open Firefox, and open up  GMail/Googlemail.

Paste this command into the address bar with the GMail/Googlemail page on view

javascript:window.navigator.registerProtocolHandler(”mailto”,”https://mail.google.com/mail/?extsrc=mailto&url=%s“,”GMail”)      << all one line

and click on green arrow

Firefox will ask if you want to add the application, to which you say yes.

Now click on a mailto link, and Firefox will ask you which email client you wish to use. Select Googlemail and also tick the box to allow this to persist.

Job done :)

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.