Linux Workstation
Operating Systems -> Linux Workstation
Linux as a workstation. Sharing experience, available software, hardware compatibility, installation, current version, upgrades...
Total messages: 3
Using gphoto2 GUI written in Perl Tk under Ubuntu 9.10
posted by: LinPhoto on Wednesday, January 20, 2010 at 06:30 AM
gphoto2 is great free software written for Linux as remote shooting software for digital cameras.
Unfortunately as I understood it is a command line software and I did not found any GUI interface for it.
I decided to write one in Perl Tk myself. It is not optimized but it works with my Canon D20 and Canon PowerShot Pro1 cameras for remote shooting.
For both cameras "--capture-image-and-download" did work for the first frame (if used for more than one shot) and then hangs. So I use "--capture-image" in Perl loop instead.
Perl Tk program:
You would need to go to "Synaptic Package Manager" and install gphoto2 and Perl-Tk packages for this program to work.
Also you may want to open System -> Preferences -> Main Manu
and set your program in Applications for easy access.
Just enter perl /path_to_your_program/camera.cgi in "Command"
I hope it helps.
Unfortunately as I understood it is a command line software and I did not found any GUI interface for it.
I decided to write one in Perl Tk myself. It is not optimized but it works with my Canon D20 and Canon PowerShot Pro1 cameras for remote shooting.
For both cameras "--capture-image-and-download" did work for the first frame (if used for more than one shot) and then hangs. So I use "--capture-image" in Perl loop instead.
Perl Tk program:
#!/usr/bin/perl -w
use Tk;
use Tk::LabFrame;
use utf8;
#------------------------------------------
# Application Preferences
#------------------------------------------
my($Name) = "Remote Capture";
my($Ver) = "v1.1";
#------------------------------------------
# Main Window
#------------------------------------------
my $mw = MainWindow->new();
$mw->geometry("450x350");
$mw->title("$Name $Ver");
$mw->setPalette("white");
$mw->Button( -text => "Exit", -command => sub { exit } )->pack(-padx => 5, -pady => 5,-side => 'bottom');
#------------------------------------------
# Main Frame ;-)
#------------------------------------------
my $mainFrame = $mw->Frame(-background => "white",
-borderwidth => 1,
-relief => 'raised'
)->pack(-fill => 'x',
-side => 'top');
# -----------------
# Single shoot button
# -----------------
my $buttonFrame = $mw->LabFrame(-label => "Single Shot",
-labelside =>"acrosstop")->pack(-expand => 'y',-side=>'top',
-pady=>5,-fill => 'x');
my $label = $buttonFrame->Label(-text => "Delay (sec): ")->pack(-padx => 5, -pady => 5, -side => 'left');
my $sizeEntry = $buttonFrame->Entry(-state => 'normal',-text=>"3",
-background => 'white',
-relief => 'sunken',
-width => 2) -> pack(-padx => 5, -pady => 5,
-side => 'left');
my $shootbutton = $buttonFrame->Button(-text=>"Shoot",
-command => &shoot_one)->pack(-side=>"top");
my $space = $mw->Frame(-borderwidth => 0, -background => "white",-label => "________________"
)->pack(-side => 'top', -fill => 'x',);
# -----------------
# Cont shooting
# -----------------
my $buttFrame = $mw->LabFrame(-label => "Cont. Shooting",
-labelside =>"acrosstop")->pack(
-expand => 'y',-pady=> 25,-side=>'top',-fill => 'x');
my $btfr = $buttFrame->Frame(-borderwidth => 0, -background => "white",
)->pack(-side => 'left', -fill => 'x',);
my $labelk = $btfr->Label(-text => " Delay between release: ")->pack(-side => 'left');
my $shootEntry = $btfr->Entry(-state => 'normal',-text=>"7",
-background => 'white',
-relief => 'sunken',
-width => 2) -> pack(-side => 'left');
my $labelz = $buttFrame->Label(-text => " Shots to make: ")->pack(-side => 'left');
my $framesEntry = $buttFrame->Entry(-state => 'normal',-text=>"20",
-relief => 'sunken',
-background => 'white',
-width => 3) -> pack(-side => 'left');
my $shootbutt = $buttFrame->Button(-text=>"Shoot",
-command => &shoot_them)->pack(-side=>"right");
sub update {$mw->update;}
#------------------------------------------
# End of MainLoop
#------------------------------------------
MainLoop;
sub shoot_them {
my $dellay=$shootEntry->get;$dellay =~ s/D//g;
my $shnmbr = $framesEntry->get;$shnmbr =~ s/D//g;
#my $downl = $download->get;
if($dellay < 5) {$dellay=5;}
if($shnmbr < 2) {$shnmbr=2;}
#`while true ; do gphoto2 --capture-image -I $dellay; done`;
$nmbrdht='';
$progrenc = new MainWindow(-title => "Shooting");
$progrenc->geometry("400x200");
$progrenc->setPalette("white");
$progrenc->idletasks;
my $txtvar1 = "Shoot $shnmbr frames with $dellay secs. delay";
my $plab = $progrenc->Label(-text => "$txtvar1")->pack(-side=>'top',-padx => 5, -pady => 5);
my $plabe = $progrenc->Label(-textvariable => $txtvar)->pack(-padx => 5, -pady => 5);
$Dss = $progrenc->Button(-text => 'Stop', -command => sub {
$progrenc->destroy(); })->pack(-padx => 7, -pady => 7, -side => 'bottom');
$progrenc->update;
sleep(3);
for (1..$shnmbr) {
unless($downl) {`gphoto2 --capture-image`;}
else {`gphoto2 --capture-image-and-download --folder="~/"`;}
$nmbrdht++;
$txtvar = "Made $nmbrdht shot(s)";
$progrenc->update;sleep($dellay);
} # FOR END
$progrenc->destroy();
}
sub shoot_one {
my $delay = $sizeEntry->get;$delay =~ s/D//g;
if($delay > 0) {sleep($delay);}
unless($downl) {`gphoto2 --capture-image`;}
else {`gphoto2 --capture-image-and-download --folder="/home/mark/Pictures"`;}
}
You would need to go to "Synaptic Package Manager" and install gphoto2 and Perl-Tk packages for this program to work.
Also you may want to open System -> Preferences -> Main Manu
and set your program in Applications for easy access.
Just enter perl /path_to_your_program/camera.cgi in "Command"
I hope it helps.
Installing a thief watchdog on your Asus Eee PC, Ubuntu 9.10
posted by: DevMan on Sunday, December 13, 2009 at 05:49 AM
As I have mentioned below I bought an Asus Eee 1005HA PC and was very happy with it for the money I paid ($249.99 at Best Buy in December 2009), had all blows and whistles working just fine.
A few things I needed to add to it was an automatic file upload to my home computer and so on.
I wanted to make sure that if it will ever get stolen - I have some means to recover it.
Since most processes go under the hood - I enabled an auto login to a dummy account meaning that whoever finds it will have a means to use it "out of the box" and they probably will fire-up the FireFox sooner or later.
Since they probably would need an Internet connection to go along with the FireFox it will ensure to a degree that Network will be available.
That's where trickery comes along!
This machine runs a daemon at start-up and it does some maintenance, files upload VIA curl etc. Also it does check whether or not it has been lost.
FireFox home page is a http://localhost/ and it pulls local Apache page (actually a Perl script) that checks every hour with my server and reports it's IP (naturally).
If server tells it that it was stolen or lost - index.cgi on FireFox home page writes a log on Asus and daemon picks that thing within 5 seconds.
What happens next es fairly easy - Asus starts taking pictures using built-in camera, and thanks to fairly dim camera light it's not that noticeable that camera turns on and off every few seconds. Asus also sends those pictures to the server using curl.
Camera is fired-up by the fswebcam program. fswebcam can be freely downloaded from:
http://www.firestorm.cx/fswebcam/
here is a daemon procedure I use:
.autostart source file
That is it!
enjoy
A few things I needed to add to it was an automatic file upload to my home computer and so on.
I wanted to make sure that if it will ever get stolen - I have some means to recover it.
Since most processes go under the hood - I enabled an auto login to a dummy account meaning that whoever finds it will have a means to use it "out of the box" and they probably will fire-up the FireFox sooner or later.
Since they probably would need an Internet connection to go along with the FireFox it will ensure to a degree that Network will be available.
That's where trickery comes along!
This machine runs a daemon at start-up and it does some maintenance, files upload VIA curl etc. Also it does check whether or not it has been lost.
FireFox home page is a http://localhost/ and it pulls local Apache page (actually a Perl script) that checks every hour with my server and reports it's IP (naturally).
If server tells it that it was stolen or lost - index.cgi on FireFox home page writes a log on Asus and daemon picks that thing within 5 seconds.
What happens next es fairly easy - Asus starts taking pictures using built-in camera, and thanks to fairly dim camera light it's not that noticeable that camera turns on and off every few seconds. Asus also sends those pictures to the server using curl.
Camera is fired-up by the fswebcam program. fswebcam can be freely downloaded from:
http://www.firestorm.cx/fswebcam/
here is a daemon procedure I use:
#!/usr/bin/perl
## TO START DAEMON AUTOMATICALLY EVERY TIME SYSTEM BOOTS
## cp program to /etc/init.d folderchmod it to -x
## update-rc.d daemon.prog.cgi start 51 S .
## note dot (.) on the end
use POSIX qw(setsid);
# flush the buffer
$| = 1;
# build a start-up app for the trackpad (Eee PC 1005HA specific)
&checkenv;
# daemonize the program
&daemonize;
## REQUIRED TO USE CURL OR WHAT ELSE YOU MAY BE USING
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local:/usr/local/bin';
while(1) {
## FILES UPLOAD PROCEDURE
if(-f "/home/http/upload") {&uploadfiles;}
## IF STOLEN LOG PRESENT
if(-f "/home/http/.stolen") {`mv /home/http/.stolen /home/.stolen`;}
if(-f "/home/.stolen") {
## I USED THIS FILE TO DEBUG THE PROCEDURE
open(TXS,">/home/http/stolen.report.txt");
unless(-d "/home/http/.stolen") {mkdir("/home/http/.stolen", 0777);`chmod 0755 /home/http/.stolen`;
`chown www-data /home/http/.stolen`;}
while(1) {
$brids = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322a8901)';
$fname=time;$fname ="/home/http/.stolen/$fname.jpg";
## TAKE PICTURE WITH DEFAULT CAMERA (BUILT-IN IN THIS CASE)
`fswebcam -r 640x480 --jpeg 60 --no-banner --save $fname`;
if(-f $fname) {
print TXS "File created: $fnamen";
## CHECK IF THERE IS AN INTERNET CONNECTION
$res = `ping -c 1 google.com`;
unless($res =~ m!1 received!i) {$redosend=1;next;}
print TXS "ping: $resn";
unless($ipaddr) {
## THIS FILE REMEMBERS LAST IP OF MY HOME COMPUTER
if(-f "/home/http/lastip.cgi") {eval {require "/home/http/lastip.cgi"};$ipaddr = $lip;$lip='';}
## IF IP NOT KNOWN - GET IT FROM YOUR SERVER - SEPARATE PROCEDURE TO REPORT IT TO YOUR SERVER
else {$url = "/home/http/data.cgi http://www.your_server_url.com/external.data.cgi";
`curl -A '$brids' -o $url`;
## NOW COLLECT IP ADDRESS FROM RESULT FILE
if(-f "/home/http/data.cgi") {$d = `cat /home/http/data.cgi`;unlink "/home/http/data.cgi";
$d =~ s#d{1,3}.d{1,3}.d{1,3}.d{1,3}#$$ipaddr=$&;$d='';
} ## END DATA PRESENT
} ## END NO CURRENT IP KNOWN
} ## UNLESS IP ADDRESS KNOWN
if($ipaddr) {$fname =~ s/^/+//;$fname =~ s#d+.jpg$#$$fname1 = $&;
print TXS "Sending: $fnamet$fname1tto IP: $ipaddrn";
## SEND CURRENT PICTURE TO THE SERVER
## YOU WOULD NEED TO SETUP YOUR HOME ROUTER TO PROPERLY ACCESS
## YOUR HOME COMPUTER. IN MY CASE IT GOES STRAIGHT TO THE Apple COMPUTER THAT RUNS APACHE
## IF USED WITH HTTPS - IGNORE SSL CERTIFICATE WARNINGS
`curl -F f=@/$fname -F fn=$fname1 -k https://$ipaddr/upload.file.cgi`;unlink "/$fname";
## IF USED WITH HTTP
`curl -F f=@/$fname -F fn=$fname1 http://$ipaddr/upload.file.cgi`;unlink "/$fname";
} ## END IP PRESENT
} ## END FILE FOUND
sleep(1); ## DELAY A SECOND
if($redosend) {&sendextra;} ## REPEAT PROCEDURE IF NOT SENT
$nor++;#if($nor > 2) {last;}
unless(-f "/home/.stolen") {last;}
} ## WHILE END
close(TXS);
} ## END IF STOLEN
## END IF STOLEN PRESENT
if($ipaddr) {$ipaddr='';}
sleep(5);} ## END WHILE ENDLESS LOOP
sub sendextra {$res = `ping -c 1 google.com`;
unless($res =~ m!1 received!i) {$redosend=1;return;}
unless($ipaddr) {
if(-f "/home/http/lastip.cgi") {eval {require "/home/http/lastip.cgi"};$ipaddr = $lip;$lip='';}
else {$url = "/home/http/data.cgi http://your_server_url.com/external.data.cgi";
`curl -A '$brids' -o $url`;
if(-f "/home/http/data.cgi") {$d = `cat /home/http/data.cgi`;unlink "/home/http/data.cgi";
$d =~ s#d{1,3}.d{1,3}.d{1,3}.d{1,3}#$$ipaddr=$&;$d='';
} ## END DATA PRESENT
} ## END NO CURRENT IP KNOWN
} ## UNLESS IP ADDRESS KNOWN
unless($ipaddr) {return;}
@allsend = glob("/home/http/.stolen/*");
foreach $sndfile (@allsend) {
unless($sndfile =~ m/.jpg$/i) {unlink $sndfile;next;}
$sndfile =~ s/^/+//;$sndfile =~ s#d+.jpg$#$$fname1 = $&;
## IF USED WITH HTTPS - IGNORE SSL CERTIFICATE WARNINGS
`curl -F f=@/$sndfile -F fn=$fname1 -k https://$ipaddr/p/upload.file.cgi`;unlink "/$sndfile";
## IF USED WITH HTTP
`curl -F f=@/$sndfile -F fn=$fname1 http://$ipaddr/p/upload.file.cgi`;unlink "/$sndfile";
} ## FOREACH FILE END
$redosend='';
} ## END SEND EXTRA
## UPLOAD FILES TO THE SERVER
## File /home/http/upload could be easily written by a simple form where you drop the file into the text field
## and submit. Simple perl script will weed-out the file on the end and will save the full path to the folder
## in a /home/http/upload file. Daemon will simply upload all the files from that folder to your server or
## home computer that will accept a file upload
sub uploadfiles {$res = `ping -c 1 google.com`;
unless($res =~ m!1 received!i || -f "/home/http/upload") {
## REPORT ERRORS TO THE localhost html page - INTERNAL USER INTERFACE ENHANCEMENTS
open(TXT,">/home/http/upload.message.cgi");
unless($res =~ m!1 received!i) {$errormess = `cat /home/http/nointernet.cgi`;}
unless(-f "/home/http/upload") {$errormess = `cat /home/http/nofileupl.cgi`;}
print TXT $errormess;close(TXT);
`chown www-data /home/http/upload.message.cgi`;
`chgrp www-data /home/http/upload.message.cgi`;
return;}
if(-f "/home/http/upload.message.cgi") {unlink "/home/http/upload.message.cgi";}
## USE THAT LOG FILE FOR DEBUGGING
open(TXW,">/home/http/upload.check.txt");
$dirst = `cat /home/http/upload`;unlink "/home/http/upload";
@adrs = split(/n/,$dirst);$dirst = shift(@adrs);@adrs=();$dirst =~ s/^s+//;$dirst =~ s/s+$//;
$dirfrom=$dirst;$dirfrom =~ s//+$//;$dirfrom =~ s/^/+//;$dirfrom = "/$dirfrom";
print TXW "Dir From: $dirfrom ($dirst)n";
unless(-d $dirfrom) {
print TXW "Dir: $dirfrom not foundn";
open(TXT,">/home/http/upload.message.cgi");
$errormess = `cat /home/http/nodirfound.cgi`;$errormess =~ s#!FOLDER!#$dirfrom#g;
print TXT $errormess;close(TXT);
`chown www-data /home/http/upload.message.cgi`;
`chgrp www-data /home/http/upload.message.cgi`;
return;
} ## END NO DIR
@filesup = glob("$dirfrom/*");
foreach $upfile (@filesup) {
$upfile =~ s/^/+//;@kl = split(///,$upfile); $fname1 = pop(@kl);
$fname1 =~ s/(W)/"%" . uc(sprintf("%2.2x",ord($1)))/eg;
$fname1 =~ s#%2e#.#gi;
print TXW "Uploading: $upfilet$fname1n";
## UPLOAD FILE USING CURL
`curl -F f=@/$upfile -F fn=$fname1 http://your_server_url.com/upload.file.cgi`;
$totupl .= "$fname1n";
} ## FOREACH FILE
close(TXW);
$whendone=time;$whendone = localtime($whendone);
$totupl =~ s#n# n#g;$totupl = "Uploaded files on $whendone: n$totupl";
open(TXT,">/home/http/upload.message.cgi");
print TXT $totupl;close(TXT);
`chown www-data /home/http/upload.message.cgi`;
`chgrp www-data /home/http/upload.message.cgi`;
} ## END UPLOAD FILES SUB
sub daemonize {
chdir '/' or die "Can't chdir to /: $!";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!";
open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!";
defined(my $pid = fork) or die "Can't fork: $!";
exit if $pid;
setsid or die "Can't start a new session: $!";
umask 0;
}
## THIS IS PROCEDURE TO SETUP TRACKPAD MULTI-TOUCH ON ASUS EEE PC
## IT CHECKS WEATHER OF NOT USER DIR HAS IT IN AUTOSTART AND IF NOT - IT ADDS THE PROCEDURE
## BELOW YOU'LL FIND THE .autostart file
sub checkenv {
$src = '#!/usr/bin/perl
unless($ENV{'SECURITYSESSIONID'}) {
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local:/usr/local/bin';
}
#
# Use xinput --list-props "SynPS/2 Synaptics TouchPad" to extract data
#
# Set multi-touch emulation parameters
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10`;
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8`;
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1`;
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1`;
# Disable edge scrolling
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0`;
# This will make cursor not to jump if you have two fingers on the touchpad and you list one
# (which you usually do after two-finger scrolling)
`xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110`;';
@allf = glob("/home/*");
unless($autstrt) {$autstrt = `cat /home/http/.autostart`;}
foreach $df (@allf) {
unless(-d $df) {next;}
if($df =~ m/http/) {next;}
unless(-f "$df/.trackpad") {
open(TRK,">$df/.trackpad");print TRK $src;close(TRK);
`chmod +x $df/.trackpad`;}
@uzs = split(///,$df);$tusr = pop(@uzs);
unless(-d "$df/.config/autostart") {mkdir("$df/.config/autostart", 0777);`chmod 0710 $df/.config/autostart`;
`chown $tusr $df/.config/autostart`;`chgrp $tusr $df/.config/autostart`;}
unless(-f "$df/.config/autostart/perl.desktop") {
$autstrt1=$autstrt;$autstrt1 =~ s#!USRD!#$tusr#g;
open(TXA,">$df/.config/autostart/perl.desktop");print TXA $autstrt1;close(TXA);
`chmod 0644 $df/.config/autostart/perl.desktop`;
}
} ## FOREACH DIR END
} ## END SUB CHECK ENV
.autostart source file
Type=Application
Exec=/usr/bin/perl /home/!USRD!/.trackpad
Hidden=false
X-GNOME-Autostart-enabled=true
Name=Trackpad
Comment=Initiates Trackpad Multitouch
That is it!
enjoy
Skype on Ubuntu sound problem
posted by: DevMan on Sunday, December 13, 2009 at 03:38 AM
I bought the ASUS Eee PC 1005HA to use as a small communicator and Unix at hand machine.
Installed latest Ubuntu 9.10 on it and all worked extremely well except for sound and WiFi was sort of erratic.
It took me a while (about a day) to figure out what to do.
Finally I got it working by installing ALSA - great instructions here:
http://monespaceperso.org/blog-en/2009/10/29/upgrade-alsa-1-0-21-on-ubuntu-karmic-koala-9-10/
and latest (unsupported by Ubuntu) kernel from here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
I used kernel 2.6.32
Then DOWNGRADE Skype from 2.1 to 2.0 as 2.1 Skype has issues with sound and microphone in Linux.
Installing Alsa 1.0.21
To do this, we must begin by determining our version of alsa as follows :
To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :
We must then install the necessary tools to compile along with the kernel headers :
Then, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :
After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :
Unpack the 3 tar files :
We compile and install alsa-driver :
We compile and install alsa-lib :
We compile and install alsa-utils :
If like me, you got this error during the last “sudo ./configure” :
You will need to add those symbolics links (only if you got the error) and restart the installation from the last “sudo ./configure” :
Then, we remove the 3 tar files in our personal folder that are not anymore necessary :
Then, just restart your computer and your alsa version should be 1.0.21!
You can verify that you have now indeed have this version of alsa :
Just to be sure everything is well configured, execute this command :
and reboot again!
Installed latest Ubuntu 9.10 on it and all worked extremely well except for sound and WiFi was sort of erratic.
It took me a while (about a day) to figure out what to do.
Finally I got it working by installing ALSA - great instructions here:
http://monespaceperso.org/blog-en/2009/10/29/upgrade-alsa-1-0-21-on-ubuntu-karmic-koala-9-10/
and latest (unsupported by Ubuntu) kernel from here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
I used kernel 2.6.32
Then DOWNGRADE Skype from 2.1 to 2.0 as 2.1 Skype has issues with sound and microphone in Linux.
Installing Alsa 1.0.21
To do this, we must begin by determining our version of alsa as follows :
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :
sudo /etc/init.d/alsa-utils stopWe must then install the necessary tools to compile along with the kernel headers :
sudo apt-get -y install build-essential ncurses-dev gettext xmlto
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-devThen, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :
cd ~
rm -rf ~/alsa* ~/.pulse*
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.21a.tar.bz2
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.21.tar.bz2After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :
sudo rm -rf /usr/src/alsa
sudo mkdir -p /usr/src/alsa
cd /usr/src/alsa
sudo cp ~/alsa* .Unpack the 3 tar files :
sudo tar xjf alsa-driver*
sudo tar xjf alsa-lib*
sudo tar xjf alsa-utils*We compile and install alsa-driver :
cd alsa-driver*
sudo ./configure
sudo make
sudo make installWe compile and install alsa-lib :
cd ../alsa-lib*
sudo ./configure
sudo make
sudo make installWe compile and install alsa-utils :
cd ../alsa-utils*
sudo ./configure
sudo make
sudo make installIf like me, you got this error during the last “sudo ./configure” :
checking form.h presence... yes
checking for form.h... yes
checking for new_panel in -lpanelw... no
configure: error: panelw library not foundYou will need to add those symbolics links (only if you got the error) and restart the installation from the last “sudo ./configure” :
sudo ln -s libpanelw.so.5 /usr/lib/libpanelw.so
sudo ln -s libformw.so.5 /usr/lib/libformw.so
sudo ln -s libmenuw.so.5 /usr/lib/libmenuw.so
sudo ln -s libncursesw.so.5 /lib/libncursesw.soThen, we remove the 3 tar files in our personal folder that are not anymore necessary :
rm -f ~/alsa-driver*
rm -f ~/alsa-lib*
rm -f ~/alsa-utils*Then, just restart your computer and your alsa version should be 1.0.21!
You can verify that you have now indeed have this version of alsa :
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.21.
Compiled on Dec 10 2009 for kernel 2.6.31-14-generic (SMP)Just to be sure everything is well configured, execute this command :
sudo alsaconfand reboot again!