Monday, July 27, 2009

Howto create a minimal Xfce desktop (debian)

Preliminary notes
EDIT:  I ended up installing a minimal gnome instead. I think that is easier for them to use...looks more like mac/ window.  Better menus for end users.

apt-get -y --no-install-recommends install  xorg gdm  xfce4
xfce4-xfapplet-plugin (necessary to use gnome applets like nm)

nano /etc/apt/sources.list
remove cd

gpasswd -a user powerdev
aptitude install --without-recommends lxde


Possible packages
and whatever their dependencies are


Sunday, July 26, 2009

Linux on an old Laptop

I promised to fix a friends old laptop.  I thought I would install a minimal desktop based on ubuntu.  But ubuntu does not boot on this machine as it turned out.  This also happened the first time I tried linux, ubuntu could not handle the old test laptop. That time I installed Suse without any problem.
I don't like Suse much and I did some digging around. I considered Fedora since I think redhat is probably still the best choice for servers(?) and it would hurt to learn it. 
Final decision to give debian a chance since don't really have time to Fedora right now. 
It worked without any problem! I think the debian installation process looks much better than Ubuntu and obviously it can handle old HW better.

I made a test installation with command line only and manually added Xfce & GDM. Had some intial problems but nothing much.

I also found out that there is a debian CD with lxde /xfce and  I loaded lxde onto the laptop but I didn't like it much. After some google I decided to stick with a minimal xfce on top of debian.

Plan now is to load the xdebian into a virtal machine and use it as a reference when building the mini desktop.

Friday, July 24, 2009

TEST asoundrc

pcm.!default plug:both

ctl.!default {
  type hw
  card ICH6

pcm.both {
  type route;
  slave.pcm {
      type multi;
      slaves.a.pcm "intel8x0";
      slaves.b.pcm "aureon";
      slaves.a.channels 2;
      slaves.b.channels 6;
      bindings.0.slave a; 0;
      bindings.1.slave a; 1;

      bindings.2.slave b; 0;
      bindings.3.slave b; 1;
      bindings.4.slave b; 2;
      bindings.5.slave b; 3;
      bindings.6.slave b; 4;
      bindings.7.slave b; 5;

  ttable.0.0 1;
  ttable.1.1 1;

  ttable.0.2 1; # front left
  ttable.1.3 1; # front right
  ttable.0.4 1; # copy front left to rear left
  ttable.1.5 1; # copy front left to rear left
  # mix front left/right to subwoofer and center
  ttable.0.6 0.5;
  ttable.1.6 0.5;
  ttable.0.7 0.5;
  ttable.1.7 0.5;

ctl.both {
  type hw;
  card ICH6;

pcm.aureon {
   type dmix
   ipc_key 1024
   slave {
       pcm "hw:1"
       period_time 0
       period_size 2048
#        buffer_size 8192
       buffer_size 65536
       buffer_time 0
       periods 128
       rate 48000
       channels 6
# the channels of this card are mixed-up
    bindings {
       0 0
       1 1
       2 4
       3 5
       4 2
       5 3

pcm.intel8x0 {
   type dmix
   ipc_key 2048
   slave {
       pcm "hw:0"
       period_time 0
       period_size 2048
#        buffer_size 8192
       buffer_size 65536
       buffer_time 0
       periods 128
       rate 48000
       channels 2
    bindings {
       0 0
       1 1

ctl.aureon {
   type hw
   card "Audio"

ctl.intel8x0 {
   type hw
   card "ICH6"

Install Aeon skin in XBMC

This is how to install Aeon the quick way.

Didn't like the color scheme though..not going to use it.

Install Skin Aeon
sudo apt-get install git-core

cd ~/.xbmc/skin

git clone git://

(If you want a another folder name git clone git:// "Aeon Stark")

cd aeon

5) Get the fonts
EDIT: The URL will be generated based on your ip (I think) You have to get your own from

mv Aeon/fonts fonts

6) clean-up
rmdir  Aeon


Thursday, July 23, 2009

toslink AND HDMI

I am trying to get sound on both HDMI & SPDIF from XBMC.

Below .asoundrc file almost works perfectly problem is that there a time delay between the channels. The problem could be the TV though, I also get an echo if I connect the TV to the receiver...

pcm.!default {
type plug
slave {
pcm "both"

pcm.both {
type route
slave {
pcm multi
channels 4
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0

pcm.multi {
type multi
slaves.a {
pcm "tv"
channels 2
slaves.b {
pcm "receiver"
channels 2
bindings.0.slave a 0
bindings.1.slave a 1
bindings.2.slave b 0
bindings.3.slave b 1
} {
type hw
card 0
device 3
channels 2

pcm.receiver {
type hw
card 0
device 1
channels 2

Audio Out: Digital
Dolby D. (AC3): false
DTS: True
Audio output: plug:both
Passthrough: iec958

Sunday, July 19, 2009

Config rc system with sysv-rc-conf

Do not auto start GDM

Find 'gdm' and uncheck the boxes for runlevels 2 and 3.

Now the desktop will only start if you run:

How to create a minimal ubuntu desktop


If  you want to make a minimal ubuntu desktop install a clean system from the minimal cd and add what you need manually.

If you add everything in this list you should have more or less a standard ubuntu system minus applications.
NB: There are other desktop and window managers that are much lighter. This guide will create a standard ubuntu system (gnome desktop). 

If you really want to do it minimal / bit by bit you might want to use:
sudo apt-get --no-install-recommends install 
It will only install the really necessary packages.

Display Manager&Desktop  
sudo apt-get -y install xorg gdm  gnome-core 

Reboot and you have a basic desktop!
(exlude gdm and you can start manually with "startx" instead)
You can now start add utilities and applications.

Gnome basics
gnome-system-tools gnome-utils x11-xserver-utils 

Remaining system utilities
and stuff that will make it look like a standard ubuntu desktop

apport-gtk  (frot end crash report system)

Themes etc
ubuntu-artwork human-theme tangerine-icon-theme gnome-themes-ubuntu xcursor-themes

---Network manager fix
sudo nano /etc/network/interfaces
Comment out the lines below "primary network interface"
(This is the solution that match the standard 9.04 setup)

apmd -advanced power management
powernowd -CPU speed (not only for laptops?)

Standard applications
epiphany-browser epiphany-extensions (well, not the standard browser. Standard is if course firefox)
nautilus-share  -share a folder by righ click
gdebi   - offline package manager

More utilities - installed in standard desktop
vino -vnc Remote desktop access
powernowd -CPU speed

More utilities - NOT installed in standard
ntfsprogs (tools for unproblematic use of NTFS file systems)

language-pack-gnome-XX and language-pack-gnome-XX-base (with XX representing your local language, e.g. de)

Saturday, July 18, 2009


Another useful tool!

Example of usage:
No password when coming back from suspend--

Run gconf-editor, navigate to app > gnome-power-manager > lock
and uncheck everything.

Wifi command line tool


Install NX server from terminal

Edit: new version available

mkdir Downloads
cd Downloads


sudo dpkg -i nxclient_3.4.0-5_i386.deb nxnode_3.4.0-6_i386.deb nxserver_3.4.0-8_i386.deb


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

Howto mount a new partition

View partitions:
sudo fdisk -l  (/dev/sda3)

Create a mount point:
sudo mkdir /storage

Edit the fstab:
sudo cp /etc/fstab /etc/fstab_backup

sudo nano /etc/fstab
/dev/sda3 /storage ext2 defaults 0 0

sudo mount -a

sudo chown -R xbmc:xbmc /storage

sudo chmod -R 755 /storage

Friday, July 17, 2009

Upgrade Alsa

I can't find any general PPA for ALSA like for NVIDIA. Anyone know?


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install wget build-essential linux-headers-`uname -r`
tar -xf alsa-driver-1.0.20.tar.bz2
cd alsa-driver-1.0.20
sudo make install

With script (I could't get the package to download with wget so I did it manually):

Thursday, July 16, 2009

Killer samples

HowTo install ATI drivers Ubuntu 8.04 (not supported in 9.04?)

Example card ATI x1650

0) Uninstall
navigate to the /usr/share/ati
sudo sh ./

1) install pre-req
sudo apt-get install xorg build-essential dpkg-dev debhelper libstdc++5 dkms cdbs fakeroot

2) Find the correct package
---Se readme



4) Install
sudo sh

sudo /usr/bin/aticonfig --initial

6) reboot
sudo reboot

7) test

glxinfo | grep 'direct rendering'


I have bought and installed a Asrock ION 330 now. It works fine so far!

This is how I did:

Minimal desktop

Would be interesting to learn how to add the desktop to a minimal or server installation.
and learn the start-up procedures at the same time.

Wednesday, July 15, 2009

Install NVIDIA with PPA

This should be a better option since it should not cause any problem when upgrading the kernel.

If the xorg.conf is not configured maybe this need to be run "sudo nvidia-xconfig".

0) Remove manually installed driver
sudo /etc/init.d/gdm stop
sudo /usr/bin/nvidia-uninstall

1) Add source
sudo nano /etc/apt/sources.list
deb jaunty main

3) Add key
sudo apt-key adv --recv-keys --keyserver CEC06767

4) Install 
sudo apt-get update
sudo apt-get install linux-headers-generic nvidia-glx-185

ATI drivers not available for Ubuntu 9.04?

Test manual setup

Tuesday, July 14, 2009

Test openGL

glxinfo | grep 'direct rendering'

output will return "direct rendering:" 

If this is 'Yes' or 'Enabled' then OpenGL is likely set up correctly. If it is listed as 'no' or 'disabled' then double check your 3D setup.


A window will be displayed with 3 rotating gears. If 3D acceleration is correctly enabled for your video card then the reported framerate should be well over 500 FPS, at the default window size. If the output shows less than 500 FPS then you should double check your 3D setup.


Problem with alsactl store

On a few installation I got this problem with the alsa mixer:

sudo alsactl store 0
gives E: core-util.c: Home directory /home/xbmc not ours.

Only solution I found is to remove pulse audio
sudo apt-get remove pulseaudio

Sunday, July 12, 2009

IR receiver troubleshooting

I will make another attempt to get my pinnacle remote / IR receiver to work.

The remote is the same as the MS MCE, the problem is the receiver.
I am struggling to find information but I now found this

This should list the device:
ls -l /dev/ttyUSB*

another link with debug instr

If the device is detected as keyboard/mouse instead of RC it will show up here:
cat /proc/bus/input/devices

Wednesday, July 8, 2009

regenerate ssh keys

SH1 protocol 
sudo ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1 

SSH2 protocol 
sudo ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
sudo ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

Necessary after installing from remastersys iso.

Saturday, July 4, 2009

Get WPA2 to work in Ubuntu - with wicd

EDIT:  I have upgraded to ubuntu 9.04 and wpa2 works fine out of the box.

Ubuntu seem to have problem with WPA2?

Google says the solution is to use wicd instead of Gnome Network Manager.
It is included in Ubuntu 9.04 repositories but in hardy you have to add the source.

install wicd:
Add key
wget -q -O- | sudo apt-key add -

Add source:
deb hardy extras

I used Synoptic Package Manager to install it since the network manager have to removed and I read some people having problem with it. 

Problem with drivers and wicd:
The installation went fine but wicd seem to handle drivers differently. Before I could see the network but not connect.  Now I cannot see anything and the wifi indicator is dark on the laptop.

I installed the windows wireless drivers tool (available in ubuntu rep) and added the windows drivers. 

Now I can see the networks again, but cannot connect to wpa2 network....

Then I slapped in a USB wifi adaptor and wicd light up as christmas tree..... I can also connect with no problem! This is good enough for now. (this is just an old laptop....)

It is not easy to get WPA2 to work with old hardware. 
With a little bit newer hardware wicd handles WPA2 without problem.

If wicd cannot not see the network card, use a different card or skip WPA2?
It it of course possible that if I could find a newer windows driver it would work. The newest I could find from d-link was from 2007. I am not sure it would work in xp either.

Windows XP also have problem with WPA2 without the latest drivers/updates.
I am not 100% sure if the problem was the Network Manager and not the drivers, but I am pretty sure that I did test the USB adaptor with the network manager earlier.
I will verify as soon as possible if the wicd is really needed or if it is device dependent only,

Friday, July 3, 2009

Mini-IT Atom HTPC

SILVERSTONE HTPC SST-LC19R SILVER-------------------------------1995 SEK
(incl PSU)
COMPUCASE MINI-ITX 8K01BS 100W SVART-------------------------625 SEK


Optional GPU

It is pretty hard to find mini ATX components in Sweden, maybe too early?
An unrelated problem is that I cant find any "standard" MCE Remote any more either. To bad I do not want to have trouble getting it to work in Linux.

Portableapps - Your digital life anywhere

Something to try?

The question is how it will interact with corporate ant-virus, firewalls and GPOs.

Thursday, July 2, 2009

Create USB boot tool

Seem to have nice functionalities. Should test