Thursday, August 27, 2009

Howto build deb package

Wednesday, August 26, 2009

xbmcbuntu - manually install live components

sudo chmod +x /usr/bin/
sudo cp runXBMC /usr/bin/runXBMC
sudo chmod +x /usr/bin/runXBMC

The other live components:

Sunday, August 23, 2009

Copy root partition to another disk

Saturday, August 22, 2009

HOWTO revert to old svn

sudo dpkg -i xbmc-common_9.04.2+svn22278-jaunty1_i386.deb xbmc-skin-pm3-hd_9.04.2+svn22278-jaunty1_i386.deb xbmc-web-pm3_9.04.2+svn22278-jaunty1_i386.deb


sudo apt-get install xbmc=[svnVERSION]  
(e.g. 22278)

The packages are stored in /var/cache/apt/archives

Revert to old version in svn  source directory
svn up --revision  22278
(svn guide

Friday, August 21, 2009

openbox or fluxbox?

The main reason I picked openbox was that on debian it was the only one that use the keyboard layout from the command line installation without any config. On Ubuntu this does not seem to be a problem.

If you only want a basic wm behind xbmc and don't want to config maybe fluxbox is better since has a panel and a working menu from scratch.

Remote access to XBMC Live /xbmcbuntu with GUI

We will use NX server to do this. It is the easiest/most stable/most secure method.
I would like to be able to use XDMCP since it would require no additional components. Problem is that I don't know how to make Xming start the wm manually.

This will work on XBMC Live and xbmcbuntu installations. Live have fluxbox installed, xbmcbuntu have what ever you installed.

1) install NX server
(check for new versions

sudo apt-get install libaudiofile0


sudo dpkg -i nxclient_3.3.0-6_i386.deb nxnode_3.3.0-17_i386.deb  nxserver_3.3.0-22_i386.deb

2) Install NX client on laptop/desktop

3) Connect the NX client
Start the client
Type a new session name
Press configure
enter host/ip
Select Desktop Unix-Custom
Press settings=>
Run the following command: /usr/bin/fluxbox (or in my case /usr/bin/openbox-session)
Select : New virtual desktop
Save settings

4) Logged in!
This will bring up a black window with no visible menus and no desktop.
Right-click on background to get menus select "terminal emulator". This works fine in fluxbox.
In openbox xterm does not work correctly in NX when started from the top level menu and we do not have an application/ Debian menu.  To fix this we install "menu" and another terminal.

sudo apt-get install menu roxterm 
roxterm is not really needed, xterm works fine in NX if started from the the Debian menu.

I want to be able to do some stuff before I install gnome so I add some applications directly:
sudo apt-get install menu roxterm dillo rox-filer leafpad 
(dillo = web, rox-filer = browse file system, leafpad text editor)
If you want to use gnome you will not need these.

4) Next step
If you want to keep  it very light weight you can use the system like this, just continue to add the none gnome applications that you need.
Otherwise you may want to use a desktop environment like gnome, lxde or rox.
It also works fine to add gnome-support but use gnome applications in openbox. This is what I will do now.

5) Install Gnome
sudo apt-get --no-install-recommends install gnome-core

Now you can change from custom to gnome in NX and connect.
I have listed a number of gnome applications here

To start with I want to share a folder, have a bittorrent client, mount usb and browse the web:
sudo apt-get install deluge nautilus-share epiphany-browser epiphany-extensions gnome-mount

Thursday, August 20, 2009

compile firefox in debian 5.0

Firefox is not available from PPA in debian 5.
A pity the understanding of the market place is so poor... otherwise I would probably move from ubuntu to debian.

Maybe I will try to compile from source.

XBMC reinstalled (Now XBMCbuntu)

I have decided to change my configuration. Instead of base it on a ubuntu desktop I will do a xbmcbuntu installation according to the official guide with the same name. The only reason is that this is what everybody else does. The performance will not be improved.

I will still need a gui but I will add it on top of the xbmc installation instead of the other way around. I think I will stick to gnome for the moment, but am working on a openbox setup as well. The biggest difference in the end will be that I will not run in GDM.
XBMCbuntu installation on ION 330 (Asrock)
0) Preparations
Flash BIOS => 1.50
Set shared memory to 512Mb
1) XBMCbuntu setup
Refer to the official wiki this is just my installation log.
*I use a PPA installation for NVIDIA
*I install openbox instead of fluxbox/blackbox EDIT: I will probably switch back to flux)

a) Install minimal ubuntu
-install from 32-bit mini cd (or server CD??)
-don't create the xbmc user in this step (I create xbmcadmin /xbmc)
-Select autoinstall security updates
-optional: Create an extra partition for storage and format it
-add basic server. But Why should Basic Ubuntu Server be added? I didn't select anything at all before.
-add ssh

connect with SSH or type the rest of the commands in terminal.

b) Initial system config (add sources)
sudo nano /etc/apt/sources.list.d/

add these lines:
deb jaunty main
deb-src jaunty main
deb jaunty main
deb-src jaunty main
#deb jaunty main
#deb-src jaunty main

save file and exit (CTRL-O CTRL-X)

Add keys
sudo apt-key adv --recv-keys --keyserver 318C7509 91E7EE5E 64234534
(addons, live PPA, SVN PPA)

Update apt
sudo apt-get update

c) Install custom boot splash (optional)

sudo apt-get install usplash-theme-xbmc-*

sudo nano /etc/usplash.conf
sudo update-alternatives --config
sudo update-initramfs -u

d) Install XBMC
If you want to install SVN directly
sudo nano /etc/apt/sources.list.d/
-and comment out the stable (first 2 lines) and uncomment the svn

sudo apt-get install xbmc xinit x11-xserver-utils

e) Install "restricted drivers" for NVIDIA from 3rd party PPA
*I the nvidia-vdpau PPA. It has more alternatives than the two in the guide. e.g. downgrade => 180

sudo nano /etc/apt/sources.list
deb jaunty main
Add key
sudo apt-key adv --recv-keys --keyserver CEC06767

sudo apt-get update
sudo apt-get install linux-headers-generic nvidia-glx-185
*Version 180 seem to work better for the moment. Less frame drops. I am on 180 right now

sudo nvidia-xconfig -s --no-logo --force-generate

f) Test basic installation of XBMC
add simple window manager

sudo apt-get install fluxbox xterm

type startx in console
right-click select terminal & type xbmc

g) Install xbmc helpers

sudo apt-get install xbmc-live python-apt
enter pwd for xbmc user etc

sudo nano /boot/grub/menu.lst

xbmc=nodiskmount,noredir loglevel=0
xbmc=noredir loglevel=0

to the end of the first option kernel line
depending on if you want to automount disks or not.
*I will use the first, manually mount my storage partition and later add gnome-mount to handle USB.

add safe mode by copying the first section and remove "quite splash quite"
and add "(safe mode)" to the title line. Don't enable mount in safe mode. That way you can boot without mounting and manually mount any fixed disks.

f) Updating alsa
installing from rep:
sudo apt-get install linux-sound-base alsa-base alsa-utils
*For the moment I am testing with this, supposed to be some upgrades lately.

installing the latest (1.0.20)
chmod +x
sudo ./ -di

g) Additional settings and packages

sudo alsamixer
-Unmute and set volume (MM means muted and OO On)
-Hit "m" to toggle mute on/off.
-Do not forget to unmute HDMI if you are going to use that
sudo alsactl store
-store the settings

h) Optional: Install support for a remote
sudo apt-get install lirc
This should pretty much be a vanila XBMCbuntu installation
With the exception of openbox and the diskmount.

2) Upgrade to SVN (optional)
exit XBMC
sudo nano /etc/apt/sources.list.d/
-uncomment the svn line and comment the stable PPA

sudo apt-get update
sudo apt-get upgrade

3) Config
a) delete guisettings.xml (will erase all your settings)
sudo rm /home/xbmc/.xbmc/userdata/guisettings.xml

b) Enable 24hz, auto adjust refresh rate
add in screen section in /etc/X11/xorg.conf
Option "DynamicTwinView" "False"
Option "FlatPanelProperties" "Scaling = Native"

sudo sed -i '60i\ Option "DynamicTwinView" "False"' /etc/X11/xorg.conf
sudo sed -i '60i\ Option "FlatPanelProperties" "Scaling = Native"' /etc/X11/xorg.conf

check result
sudo nano /etc/X11/xorg.conf

c) Disable HW curser
Add in section device in /etc/X11/xorg.conf
Option "HWCursor" "False"

sudo sed -i '50i\ Option "HWCursor" "False"' /etc/X11/xorg.conf
check result
sudo nano /etc/X11/xorg.conf

d) reboot
sudo reboot

4) Config in XBMC
a) enable VDPAU and Auto adjust refresh rate
Change render method => VDPAU
Set "Auto adjust refresh rate" on

b) setup sound
Enable digital sound

Settings for SPDIF:

Setting for HDMI:

If mp3 is playing to fast, try with:

Wednesday, August 19, 2009

more on openbox

Wednesday, August 12, 2009

openbox with fbpanel

Notes for my latest light desktop trial project

In this case on a minimal debian with gnome-core installed.
It is the same on ubuntu.

apt-get install openbox fbpanel 

add rox-filer?

autostart and config fbpanel

$ sudo gedit /etc/xdg/openbox/
Add the following lines to
sleep 0;
fbpanel –profile profile-file-name1 &

Network manager

sleep 0;
nm-applet --sm-disable &

it has to run as root we need to fix policykit

In each file, copy the section of text which starts with and ends with . Paste it immediately below the line, and change the line to

For example: 
Or fix the sudoer file

Linux permission

Command Meaning
chmod 400 file To protect a file against accidental overwriting.
chmod 500 directory To protect yourself from accidentally removing, renaming or moving files from this directory.
chmod 600 file A private file only changeable by the user who entered this command.
chmod 644 file A publicly readable file that can only be changed by the issuing user.
chmod 660 file Users belonging to your group can change this file, others don't have any access to it at all.
chmod 700 file Protects a file against any access from other users, while the issuing user still has full access.
chmod 755 directory For files that should be readable and executable by others, but only changeable by the issuing user.
chmod 775 file Standard file sharing mode for a group.
chmod 777 file Everybody can do everything to this file.

Tuesday, August 11, 2009

Connect to non default desktop in NX server

If you've eg. Xubuntu on your server with Xfce as the default desktop environment, then it's not trivial how you can connect with FreeNX and use this desktop environment. In the nxclient enter the session configuration screen, set the "desktop" to "Unix" and "Custom", enter "Settings" and choose the "Run the following command" for the "Application", and enter this into the textbox: /usr/bin/xfce4-session. In the "Options" select the "New virtual desktop". Press OK and select in the "Display" section "Full screen"