Posts Tagged ‘Ubuntu’

XBMC on the O2 Joggler with touchscreen support

Sunday, May 9th, 2010

Equipment Required :

  • O2 Joggler - £50 on offer last month
  • 4GB or more USB stick
  • First off we must remember the O2 joggler uses the 'Poulsbo' or US15W chipset from Intel which is basically very badly supported software-wise in linux. We need to use the Intel proprietary IEGD driver to get any kind of openGL acceleration. Because of this, and the fact I did not have enough time to make it work nicely in Arch Linux nor Meego, I went for a prebuilt Ubuntu image for the joggler.

    I used disca's 1.3 build which requires a 4GB USB stick. Follow the instructions here to install it to your usb stick using dd or other.

    Open the joggler to fit your USB flash drive (or very cheap SSD!)
    This is not essential, however it leaves an empty USB port (to use with a USB sound card!) and makes the device look much neater. However you may want to leave that till the last minute. Also do not do this if you love Wifi. If you want wifi, buy a USB hub.

    Open the joggler - this is actually really easy - just carefully take away the sticker on the bottom of the device. Unscrew the 4 small screws, and just pull. There are plastic 'clips' on either side and two on the top. This should not be too hard to do. Here is a youtube video if you are still worried.

    Remove the Wifi card. This required me to take off two bits of tape, and pull away at the foam holding it in place a little. Then just place your USB stick inside. After all is done, close it up and boot. Bootup is actually faster than the original openpeak software! Once booted, an SSH server is in place (user: joggler, password: joggler) so I would ignore the onscreen keyboard and everything else.

    Installing XBMC
    I chose to go with an SVN build of XBMC, but feel free to get a stable build, there should be no difference. I shamelessely took the instructions from this blog. I'll make it quicker and up to date for Ubuntu 9.10 (karmic koala)

    Add the following repository to /etc/apt/sources.list:

    deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu karmic main
    deb-src http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu karmic main

    Import the key from the PPA, update our local database and install xbmc.

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 64234534
    sudo apt-get update
    sudo apt-get install xbmc

    We just need to launch XBMC once, and then set it to windowed mode using a USB keyboard or synergy - Settings -> System -> Video Output -> Resolution.

    Installing and configuring openbox
    You'll need a window manager in order to be able to start XBMC in non fullscreen mode to get the mouse emulating touchscreen to work. This is a little annoying but it's the easiest workaround (and only) I could find. Openbox was used because I'm (a little) familiar with it, otherwise this can work in gnome or anything else you want as long as you manage to take the decors and borders off completely.

    sudo apt-get install openbox
    mkdir ~/.config/openbox
    cp /etc/xdg/openbox/rc.xml ~/.config/openbox
    vi ~/.config/openbox/rc.xml

    You'll want to remove everything between the "applications" xml tags and insert something like this.

    <applications>
            <application name="*">
                    <decor>no</decor>
                    <shade>no</shade>
                    <maximized>true</maximized>
            </application>
    </applications>
    

    vi ~/.config/openbox/autostart.sh

    You'll want to use something like this to autostart XBMC. I also autostart a synergy client so I can use the mouse and keyboard from my desktop PC. If you don't know this great piece of software go take a look at their homepage.

    (sleep 3s && xbmc) &
    (sleep 3s && synergyc holm) &
    

    To get openbox to become the default choice, I got lazy. Just login to gnome, log out, then choose the openbox session at the GDM login. This will make it your default choice. I'm too used to having .xinitrc being so easy in Arch Linux, and after a lot of searching could not find an easy way to do it in ubuntu. If anyone knows of a way please tell me!

    Fixing the XBMC skin (SVN version only)
    If you have launched XBMC and are using the SVN version, then you'll notice a little graphical corruption. This is because the US15W in the joggler can't handle some of the unpacked textures that ship with the SVN builds. This fix was quite hard to find, but look here if you are interested in why this is this exact problem exists.

    It's actually quite a simple fix (i'm going to assume you don't want to install SVN on the joggler):

    svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/9.11_Camelot/skin/Confluence
    mv Confluence Confluence_stable
    scp -r Confluence_stable joggler@joggler:.xbmc/skin/

    Then just change the skin to Confluence_stable in Settings->Appearance->Skin

    Ok all is done! Now mount some music/video using some NFS/SMB shares and you're good to go! Also check out UPNP if like me you have other XBMC HTPCs around, it's very impressive if a little worrying. To make it a nice setup and not just an experiment, I use a USB soundcard to be able to have a good sound quality. Otherwise the joggler speakers and headphone jack are terrible. I use an old Edirol UA-1EX that I had lying about. Anything using the snd-usb-audio module in linux should work very well.

    Notice, some things are impossible to do with just touchscreen in confluence. I'd recommend having a go with Confluence Touch! skin. But there are quite a few different ones. So far I haven't found one I really like.

    Fixing sound playback
    This is a problem with XBMC and lots of audio sound cards. Basically the audio gets garbled as the sound buffer runs out of memory. I've had this on my acer revo and my O2 joggler with the external soundcard (I bet the problem is the same on the internal speakers). The easy fix is to use pulseaudio (which has a massive buffer). If you're using Gnome on the joggler ubuntu build then it will work. But using only openbox you'll need to start pulseaudio. Just add this to your autostart.sh

    (sleep 1s && pulse-session) &
    

    You'll have to make sure that your XBMC audio playback device is set to your default Pulseaudio sound card. gnome-volume-controller will help you set a default card.

    Making Confluence faster
    You'll notice the confluence skin is a little slow at displaying images. So i just resized and croped them all to the right size for the joggler (800x480). I also replaced the default music one and changed the apple to a tux... (i'm not even sure where that one gets displayed!). Grab the .tar.gz here. You'll have to extract it in the backgrounds folder in the confluence skin folder. My advice is to copy the confluence skin folder from '/usr/share/xbmc/skin/Confluence' to '~/.xbmc/skin/ConfluenceSmall'.

    installing multiple linux distributions easily

    Friday, February 27th, 2009

    Okay, so often it's nice to try out different linux distro's on a single box and try them on the native hardware and not in a vm.

    So here is an easy way on how to do it. I'm going to assume that you allready have a working grub where you boot ubuntu/Windows/freeBSD/Opensolaris etc... w/e you want to run, in fact even things that dont boot from grub.

    Essentialy we have grub in our MBR. There we are going to add entries to chainload grub but this time from the partition that has grub installed. So lets say we have ubuntu with grub installed in the MBR.

    So open /boot/grub/menu.lst on the partition that holds the grub that is in the MBR. Change these settings

    timeout 4 # you will want to change this to the wait in seconds you want at the boot menu
    #hiddenmenu # you will want to comment this out with '#'

    Once you've done this you can check out your grub by rebooting. You will see a menu if you didnt have one allready and different options.

    Now when installing a new OS, choose to install grub (or w/e boot loader lilo etc...) to go not onto the MBR but onto a partition, for example /dev/sda2. Then open menu.lst again and add a section as so :

    title Intel Moblin, Chainloading /dev/sda2
    root (hd0,1)
    makeactive
    chainloader +1

    The most important setting is "root (hd0,1). This basically tells grub the partition number, but it starts numbering from 0 instead of 1. So /dev/sda1 becomes (hd0,0), /dev/sdc3 becomes (hd2,2) etc...

    With this method you can chainload to logical partitions and not just primary partitions. So you can have as many OS's as you want.

    Okay I hope this made good sense and was helpfull!

    Compiz fusion autostart on xfce

    Friday, February 27th, 2009

    This is how i get compiz running on all my boxes, wether running xfce, kde3 or gnome. (i dont like kde4 at the moment, so I have no idea as to how fusion-icon does to load compiz on kde4.)

    I'm going to assume for this that compiz is allready installed and that you have the correct 3d drivers installed.

    Install compiz and get it running when the command

    compiz --replace is run.

    the install the package fusion-icon

    apt-get install fusion-icon

    then run

    xfce4-autostart-editor

    then just add through the gui the fusion-icon program. It will run
    in the taskbar if you are running one. (by default it is
    in xubuntu) It will enable you to swap between Xfwm4, compiz and metacity which can be usefull for running some programs especially wine directx games

    Rayman Gold in Dosbox

    Wednesday, February 25th, 2009

    Everyone probably remembers playing an old game in DOS. Personally i was very young, but I had a rayman Educational game that I loved. So I thought i'd try get the rayman non educational version working in linux. I bought the game for a pound in a second hand game shop and here I go with my first dosbox experiment.

    This will probably work for a lot of old dos games. Good luck!

    Make an iso of the cd (using k3b or other)
    Mount to /mnt
    sudo mount -o loop /files/rayman.iso /mnt
    cd /mnt
    wine setup.exe
    Install to a location (you can change what drives wine sees with winecfg)
    after this you will want to copy /mnt/* to /files/rayman
    or another directory so you can tell dosbox to use that as a cdrom drive.
    Dosbox does not take iso files directly.
    install dosbox (i use the distro dosbox with sudo apt-get install dosbox)

    From the dosbox.org site here is a fix for the up and down keys

    If you are running DOSBox on Ubuntu 8.10 (or some other distro that uses
    the evdev driver in X) you will notice that some keys don't work, most noticiable
    the arrow keys.

    This is because Ubuntu changed something related to the scancodes, we are working
    on it, but as none of us runs Ubuntu 8.10 it is not top priority. If you have an
    English/American keyboard layout then (and only then!) you can use the following
    workaround. Open a console and enter the following command:
    echo -e "[sdl]nusescancodes=falsen" >>~/.dosboxrc
    We will have it fixed in the next version though.

    Little script to start rayman from linux :

    #!/bin/sh
    dosbox -conf /home/brendan/.dosboxrcRayman /files/oldgames/RAYMAN.BAT -fullscreen &

    Dosbox config

    [autoexec]
    mount c /files/oldgames
    mount d /files/rayman -t cdrom

    So as you can c my cdrive i show to dosbox is /files/oldgames
    and i mount the .iso to d which is located in /files/rayman
    the -t option tells dosbox to mount it like a cdrom

    The game runs fine on my samsung NC10 so should be fine on most things ;-)

    Hibernation does not work / stopped working

    Wednesday, February 25th, 2009

    On linux, Hibernation is Suspend to disk (at least in XFCE).

    So the RAM is basically dumped in the swap partition. If you have 1gb of ram you need 1gb of swap to use hibernation. If you upgrade to 2gb of ram, don't be suprised it stops working, you need 2gb of swap... (yes I was silly enough and thought maybe some of you would appreciate the help ;-) )

    Usefull commands :

    swapoff -a
    // will unmount all swap partitions. Handy if you want to resize the lvm
    swapon -a
    // will mount all swap partitions in the fstab
    swapon -s
    // will display all swap paritions and their status

    mkfs.swap
    // make a swap fs

    You need to be root for all of these.

    Eduroam on Linux (Ubuntu,Arch, etc…)

    Wednesday, February 25th, 2009

    works at :
    University of Kent (Canterbury Campus)

    Settings in NetworkManager Gnome applet
    WPA & WPA2 Entreprise
    Protected EAP (PEAP)
    Anonymouse Identity : blank
    CA Certificate (None)
    PEAP Version : Version 0
    MSCHAPv2
    username : xxxx@kent.ac.uk (change depending on email addres obv.)
    password : use you own

    Network Manager Configuration

    If you find this works in your uni feel free to post it i'll try to keep a running
    list of unis that this will work for, so google can crawl through them)

    This should work if you use Networkmanager. Moblin which does not cannot currently connect to such networks. Anyone with a workaround please leave a comment or mail me!