Archive for the ‘Stuff’ Category

Fix the Noisy Fan on an Acer Aspire One

Friday, December 31st, 2010

There are two ways of doing this, depending upon the bios and kernel you are using

1. For older bios’ <3309 or for setups with an older kernel (say pre Ubuntu 10.04)

This is an oldie but goodie, thanks to netbook tech for guidance on this

#Download as follows:
wget http://electronpusher.org/~rachel/acerfand
wget http://aceracpi.googlecode.com/svn/trunk/acer_ec/acer_ec.pl

#Copy both files to /usr/local/bin
sudo cp acerfand /usr/local/bin/
sudo cp acer_ec.pl /usr/local/bin/

#Make acerfand executable
sudo chmod 755 /usr/local/bin/acerfand

#Add acerfand to your rc.local so that it fires up on boot
sudo nano /etc/rc.local
place /usr/local/bin/acerfand at the bottom of the file, before the exit 0

#Restart

#Configure
edit acerfand at your peril :)
or create an /etc/acerfand.conf with the following content:

INTERVAL=5
FANOFF=60
FANAUTO=70

These are the default values, temps are in celcius

This makes my setup with 10.04 LTs and bios 3310 shutdown after @ 30 seconds, so…

2. for newer bios > 3309 of newer kernels > Ubuntu 10.04+

This method can be u tried on older setups if 1. doesn’t work. From 2.6.31 this is included in the mainline kernel

Download this file:

wget http://www.piie.net/files/acerhdf_kmod-0.5.25.tar.gz

tar zxvf acerhdf_kmod-0.5.25.tar.gz
cd acerhdf_kmod
make
sudo make install

You might need to install you linux headers for your kernel to make/make install

Add acerhdf to /etc/modules so that it runs on boot

Run this command as root:

sudo -i

echo -n “enabled” > /sys/class/thermal/thermal_zone0/mode

Now test by running

sudo modprobe acerhdf

“Minimal” Install - Xubuntu 10.04 LTS - Openbox

Thursday, December 30th, 2010

As per a previous post, here is a breakdown of the installation carried out on a Dell Dimension 4100 with an PIII 833mhz processor and 256mb ram:

#XUBUNTU 10.04 LTS ALT CD
#On Install screen press F4 and select Command Line Install
#then Install Xubuntu

#UPDATE - RUN THIS AGAIN AFTER CONFIGRATION
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

#APPS
sudo apt-get install openbox openbox-themes tango-icon-theme-extras xorg obmenu obconf thunar firefox xfce4-terminal –no-install-recommends

sudo apt-get install arandr build-essential feh gdebi hicolor-icon-theme htop libxmu-dev libpng-dev libjpeg-dev g++ libxft-dev mousepad openssh-server portmap nfs-common mplayer-nogui mencoder audacious devilspie zenity htop ffmpeg rar cups-pdf python-software-properties synaptic tango-icon-theme thunar-volman thunar-archive-plugin unrar update-manager vlc wbar xubuntu-restricted-extras wicd gksudo

#APP ALTERNATIVES
#Music players: potamus, moc, cmus, alsaplayer
#File Managers: pcmanfm, mc
#Browsers: chromium, midori, elinks
#Useful tools: winff (video/audio conversion), clicompanion, xfburn, aria2 (downloader), fireftp/filezilla (ftp), geany (development), mirage/gthumb (image mgt), remmina (vnc client), I could go on, but this IS meant to be a minimal install!

#SCREEN RESOLUTION CHANGER
arandr

#PANEL
sudo add-apt repository ppa:killeroid/ppa && sudo aptitude update && sudo aptitude install tint2
#follow this guide and example conf file for tint2
nano ~/.config/tint2/tint2rc

#DOCK
wget http://www.ihku.biz/wbarconf/wbarconf_0.7.2-1_i386.deb
#this following command may refuse, in need of dependencies
sudo dpkg -i ~/wbarconf_0.7.2-1_i386.deb
#so run this
sudo apt-get install -f
#then the install command again
sudo dpkg -i ~/wbarconf_0.7.2-1_i386.deb
#run wbarconf and add your preferred apps to the dock
wbarconf
#to prevent windows from crashing the dock, set the top margin of the screen to @ 40 pixels

#LOGIN MANAGER
wget http://download.berlios.de/slim/slim-1.3.2.tar.gz
#follow instructions here:
#if you swap out the background image for slim with the same one for your desktop, you get a seamless flow from login to desktop

#ICON THEME
#the default icon theme is grey and bland so change it to Tango
nano ~/gtkrc-2.0
#add this to the file you have created to get the Tango icon theme:
gtk-icon-theme-name = “Tango”
#for the Tango icon theme

#GRUB
#adjust settings for grub menu such a countdown timer
sudo nano /etc/default/grub
sudo update-grub2

#DESKTOP BACKGROUND
#Find yourself a background
#open it with feh
#use the feh right click menu to set it as background
#do the startup routine to set background on startup
#see login manager about matching backgrounds

#STARTUP ROUTINE
nano ~/config/openbox/autostart.sh
#add the following
eval `cat $HOME/.fehbg` &
tint2 &
wicd &
sleep 6 &
wbar &

#RIGHT CLICK MENU
obmenu
#for apps that run in terminal use “xfce4-terminal -x nameofapp”
#to maximise app use “xfce4-terminal –maximize -x nameofapp”
for synaptic use “gksudo synaptic”

#WINDOW THEME
obconf

#CREATE NEW USER WITH SAME CONFIGURATION
#a new user created normally would have the basic configuration that you started with.
see here:

Recording with ALSA staring me in the face (and midi playback)

Tuesday, December 28th, 2010

Finding the right app to record stuff is a bit of a pain on linux, and playing back midi files can be a trial also. But everything you need is right there in your alsa-utils package. Open up a terminal and let’s get going!

Recording from a microphone:

 arecord -f cd -t wav -c 2 -D plughw:1,0 foobar.wav

This will record you microphone input from your chosen soundcard (in this case card 1, device 0) at 2 channel CD quality, outputting to a wav file for you to play with later. To playback your recording:

aplay foobar.wav

For more information and options, simply type:

man aplay

OK, to play back midi files, you may need to ensure you have timidity installed. Then find a midi file (*.mid) or a kar file (*.kar) and download it. Then it is simply:

 aplaymidi -l

to find an open port, in my case 128:0, then:

 aplaymidi mymidifile.mid

If you want to get the best out of kar files, then install pykaraoke, it will play back the midi and highlight the lyrics through the song :)

Linux - Listen to Microphone on remote PC

Sunday, December 26th, 2010

Due to the festive season there was a need to contact relatives in far flung places. Of course I hadn’t done any preparation, so things didn’t work as I wanted. I plugged a PS2 Eyetoy into my htpc, and installed Skype. Was pleased to see the video worked off the bat, but when contacting my first relly, I could see and hear them, they could see me, but could not hear me. The mic on the Eyetoy wasn’t configured correctly. Due to my work with special needs kids, I put my sign language (Makaton) skills (limited!) to good use, and we had a fun conversation as I taught my rellies sign language using sign language :)

Anyway set about reconfiguring my htpc to get the mic working later that evening. It’s a Ubuntu 10.10 setup, so I removed pulse audio, and got back to a basic alsa setup. (Note: my main PC is set up the same way) I did all the setup via ssh from my main desktop. Needed a way to test my microphone was working:

arecord -l

gave the the number of my device:

card 1: Namtai [EyeToy USB camera Namtai], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

I then tracked down via google a command that with some modification allowed me to listen to the microphone on the speakers on my main PC (in a another room). I put my smartphone next to the eyetoy, and set it to play an audiobook I had on it. Ran back to my study and ssh’d into the htpc. Once there I had to run the command, which included ssh’ing back to my main PC (bet that would confuse 2 windows PCs if you tried it!) Command all on one line:

 arecord -f dat -D plughw:1,0 | ssh -C bimma@10.10.10.10 aplay -f dat

and blow me, the sound of my audiobook being “listened to” by the microphone came through loud and clear on my main PC speakers

Key things: getting the device right, the arecord -l command gave the information of card 1 and device 0, which translates to plughw:1,0 (the -D option denotes the device for arecord to listen to), and -f dat indicates the format the sound will be recorded in and relayed to the remote PC. Have a good read of man aplay, for more info.

Now to try things out on a different relly tomorrow ;)

Top Ten Best Linux Distros?

Wednesday, December 22nd, 2010

KMandla’s been getting all hot under the collar about Tech Radar’s distro list, so I thought I would have a go:

  1. Xubuntu 10.04 LTS / 10.10
  2. Ubuntu ALT-CD Command Line Installation with Openbox Window Manager
  3. SLiTaZ 3.0
  4. PartedMagic 5.0
  5. Arch Linux
  6. Puppy Linux 5
  7. Crunchbang Linux
  8. XBMC Live
  9. Clonezilla
  10. Struggling here; a toss up between Mint, UNR and Windows 7 :)

No place for Tiny Core Linux, but there, it gets a mention.

I do have modern PC hardware ;)

SLim Struggle ! SLiM Simple Login Manager on Minimal Xubuntu 10.04 LTS

Wednesday, December 22nd, 2010

A couple of ancient PCs came into my possession, so I thought I would have a go at setting them up for passing on to new PC users / first timers. The “better” of the two an Athlon XP 1500 with 768mb ram handled full Xubuntu 10.04 LTS just fine, but the Dell Dimension 4100, PIII 833mhz with 256mb ram needed a different approach. So out with the ALT-CD and a command line install ensued, followed by an openbox window manager setup. The majority of packages I installed were done with the no-install-recommends switch.

As this machine was for a new user, I had to make things simple, so thought they might benefit from a login manager, and as usual I turned to SLiM. After installing build-essential, I downloaded the source for SLiM and set about compiling it.

wget http://download.berlios.de/slim/slim-1.3.2.tar.gz

tar xzvf slim-1.3.2.tar.gz

cd slim-1.3.2

Blocker number 1:

needed some dev dependencies. Tracked them down, and then the compile completed.

sudo apt-get install libxmu-dev libpng-dev libjpeg-dev g++ libxft-dev

make (still in directory slim-1.3.2)

sudo make install

Blocker number 2:

rebooted to find that SLiM had not fired up (which it had with every install I have ever done.) So stuck /usr/bin/slim into rc.local (above exit 0), and rebooted again. Success SLiM popped up

Blocker number 3:

SLiM would not log me in. So I dived into /etc/slim.conf and edited the login_cmd section to point to an openbox session. Rebooted again and I was finally in. The command below is all on one line.

login_cmd           exec /bin/bash -login /etc/X11/Xsession openbox-session

I’ll put this down to the minimal install and the use of –no-install-recommends switch

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

Thursday, March 11th, 2010

It’s list time again:

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

Open Office
Abiword
Gnumeric (a bit buggy)
Gimp
Inkscape
Gwhere
Geany
Audacity
ProjectX (java)
HJSplit (java)
Frostwire (java)
VirtualBox
FireFTP (firefox extension)
Firefox (of course!)
Mplayer & SMplayer
VLC

This list will grow. Keep up the good work guys :)

Plus, some notable “freeware” applications:

PhotoFiltre
ProgDVB6
puTTY
ImgBurn
AVGFree 9
Shark007 Codecs Pack
UltraVNC
VNCViewer
Windows Movie Maker 2.6
CPUz
JellyBean Key Finder
WirelessKeyView
Google Chrome
CCleaner
DeFraggler (Piritin)
Free Screen To Video (Koyote Software)
Winamp (with iAmp skin)
WizMouse (scroll without focus)
Powerpoint Presentation Viewer
RocketDock (just like my wbar!)
CDex
Adobe Reader 9
Scanner Application that comes with my Brother Network Printer (Brother very good at drivers and support for Windows and Linux)

[EDIT 12/2010 add DVD Flick to your list of freewares, encodes / authors / burns ]

Shareware I just can’t live without:

Winrar

[EDIT 12/2010 - now found I can, try Izarc, copes with just about everything ]

Hacks:

Also done a few registry hacks to sort out the awful unintuitive default behaviour of Windows Explorer. These are easily found on any Windows 7 sites.

Remove Libraries from Explorer
Remove Favourites from Explorer
Remove HomeGroups from Explorer
Adding Directories “I want” to the SendTo drop down
Removing “Drives” from SendTo
Adding Copy To folder and Move To Folder to Right Click
Adding Open Command Prompt to Right Click

Nearly got my Windows PC behaving and looking just like “Linux”  :D

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