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.


http://distrowatch.com/weekly.php?issue=20090504#feature
http://bbs.archlinux.org/viewtopic.php?id=65655
http://www.linuxquestions.org/questions/slackware-14/xfce-how-to-change-the-keyboard-layout-322374/


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


nano /etc/apt/sources.list
remove cd

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

Automount
http://slucas.wikidot.com/en:xfce-automount

Possible packages
thunar-archive-plugin???
shutdwon-helper??
xfce4-goodies
thunar
xfce4-panel
xfburn
squeeze
and whatever their dependencies are


xfwm4
xfdesktop
xfce-mcs-manager

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

http://alsa.opensrc.org/index.php/DigitalOut
http://alsa.opensrc.org/index.php/.asoundrc
http://alsa.opensrc.org/index.php/Dmix

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;
      bindings.0.channel 0;
      bindings.1.slave a;
      bindings.1.channel 1;

      bindings.2.slave b;
      bindings.2.channel 0;
      bindings.3.slave b;
      bindings.3.channel 1;
      bindings.4.slave b;
      bindings.4.channel 2;
      bindings.5.slave b;
      bindings.5.channel 3;
      bindings.6.slave b;
      bindings.6.channel 4;
      bindings.7.slave b;
      bindings.7.channel 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
-----------------
1)
sudo apt-get install git-core

2)
cd ~/.xbmc/skin

3)
git clone git://github.com/djh/aeon.git

(If you want a another folder name git clone git://github.com/djh/aeon.git "Aeon Stark")

4)
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
http://www.mediafire.com/?lywzwbnqyyy

wget http://download273.mediafire.com/aew2memhsysg/lywzwbnqyyy/Aeon_Fonts160709.zip
unzip  Aeon_Fonts160709.zip
mv Aeon/fonts fonts

6) clean-up
rmdir  Aeon
rm Aeon_Fonts160709.zip


reference
---------
http://www.xbmc.org/forum/showthread.php?t=49958

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
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

pcm.tv {
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
--------------------
sysv-rc-conf

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

Now the desktop will only start if you run:
startx

How to create a minimal ubuntu desktop

Reference

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)
jockey-gtk
usplash
update-manager 
notify-osd 
update-notifiers
network-manager-gnome
fast-user-switch-applet

Themes etc
gnome-screensaver 
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)

laptop
---------------
laptop-mode-tools 
ubuntu-laptop-mode 
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)
brasero 
gnome-nettool
nautilus-share  -share a folder by righ click
gdebi   - offline package manager


More utilities - installed in standard desktop
---------------
vino -vnc Remote desktop access
system-config-printer-gnome  
usb-creator
powernowd -CPU speed


More utilities - NOT installed in standard
---------------
gparted   
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)
ssh


Saturday, July 18, 2009

gconf-editor

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

cnetworkmanager

Install NX server from terminal

Edit: new version available

mkdir Downloads
cd Downloads

wget http://64.34.161.181/download/3.4.0/Linux/nxclient_3.4.0-5_i386.deb
wget http://64.34.161.181/download/3.4.0/Linux/nxnode_3.4.0-6_i386.deb
wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver_3.4.0-8_i386.deb

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



wget http://64.34.161.181/download/3.3.0/Linux/nxclient_3.3.0-6_i386.deb
wget http://64.34.161.181/download/3.3.0/Linux/nxnode_3.3.0-17_i386.deb
wget http://64.34.161.181/download/3.3.0/Linux/FE/nxserver_3.3.0-22_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
Add:
/dev/sda3 /storage ext2 defaults 0 0

Refresh:
sudo mount -a
´

Owner:
sudo chown -R xbmc:xbmc /storage

Access:
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?

Manually:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install wget build-essential linux-headers-`uname -r`
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.20.tar.bz2
tar -xf alsa-driver-1.0.20.tar.bz2
cd alsa-driver-1.0.20
./configure
make
sudo make install



With script (I could't get the package to download with wget so I did it manually):
http://ubuntuforums.org/showthread.php?p=6589810#post6589810

Thursday, July 16, 2009

Killer samples

http://www.apple.com/quicktime/guide/hd/artbeats.html

http://tracker.hatters.org.uk/torrents/killa.sampla.x264.mkv.torrent

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 ./fglrx-uninstall.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
http://support.amd.com/us/gpudownload/Pages/index.aspx
---Se readme

3)Download

wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-9-3-x86.x86_64.run


4) Install
sudo sh ati-driver-installer-9-3-x86.x86_64.run


5)
sudo /usr/bin/aticonfig --initial


6) reboot
sudo reboot


7) test
fglrxinfo

glxinfo | grep 'direct rendering'

glxgears

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


This is how I did:

Minimal desktop

http://ubuntuforums.org/showthread.php?t=1155961

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.

https://launchpad.net/~nvidia-vdpau/+archive/ppa

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 http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty main

3) Add key
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 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
https://help.ubuntu.com/community/BinaryDriverHowto/ATI

http://www.xbmc.org/forum/showthread.php?t=38804

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.


glxgears

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.

fglrxinfo

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
http://ubuntuforums.org/archive/index.php/t-967339.html


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 http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -

Add source:
deb http://apt.wicd.net 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....)

Conclusion:
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


Board
INTEL D945GCLF2 LITTLE FALLS ATOM 330 MINI-ITX BULK -----850 SEK
 
Case
SILVERSTONE HTPC SST-LC19R SILVER-------------------------------1995 SEK
(incl PSU)
alt
COMPUCASE MINI-ITX 8K01BS 100W SVART-------------------------625 SEK


Remote

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?

http://portableapps.com

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

Thursday, July 2, 2009

Create USB boot tool

http://unetbootin.sourceforge.net/

Seem to have nice functionalities. Should test