Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, January 2, 2012

BOINC!

I decided to try and do something useful with my computer, and set up BOINC so I could choose from a list of projects to use my computing cycles.

Ok, so I just pulled in the debian package with aptitude but after installation then it didn't run as a daemon as the document describes so I decided to run it from the command line. That's where my troubles began.

I understood from the documentation that you could run boinc from the command line and choose some projects to support and voila, everything would be up and running.

What happened to me was that I choose some projects but I didn't get any work to do, my client was querying the projects for work but none was given (sometimes I got a message saying that the project needed x amount of disk space but I had 0 Mb available when in fact I had more then 9 Gb available). I was getting a bit frustrated but decided to try and run the program as a daemon instead.

That on the other hand did work! Now I am happily doing my work and my computer is doing someone else's work for me ;-)

So if you try to run the boinc client from command line as a normal user then it wont work, you have to be logged in as user boinc or run the client as a daemon. At least that's how it works here in debian land.

Ohh yeh, I decided to go with Rosetta@home and climateprediction.net

Wednesday, December 3, 2008

Debian release

Like Rafael I am becoming a bit frustraded in the release of Debian Lenny. But not because of how long it takes (well, partly of course) but more because of my lack of ability to help :-)

I like to help out in Debian, I have used this system for a looong time now and like to give back some of my time to make it a good distribution. So far I have been focusing on scientific packages like Octave through the Debian Octave Group but I also subscribe to the Debian Scientific Computing Project and Debian Science mailing list allthough I am not an active participant there.

Unfortunately since I began working here in Iceland I havn't given myself time to help out in the Octave group and I was hoping to be able to do some good over the hollidays but due to the Lenny freeze then not much is going on in Debian except bug squeezing and I don't have enough programming experience to do that. So I guess I will have to focus on something else (or perhaps I will begin to make some packages of debian science, lintian clean, that is allways usefull).

Sunday, August 10, 2008

Extracting images from pdf

During my studies I sometimes had to hold a lecture on a certain topic that was presented in a few published papers. When holding such lectures then you really should show some graphs and figures from those papers (don't worry, this falls under fair use of the copyrighted material ... I believe ;) ). An incredibly convenient tool to extract images from pdf files is the pdfimages tool that comes with poppler. All you have to do is issue the command

pdfimages paper.pdf some-prefix

where some-prefix is a name chosen by you and will be added in front of all the image names the command produces. After this your current directory will have all the images in the paper and theyr names will be some-prefix-000.ppm (or .pbm or .jpg but to get .jpg you have to give it the -j option and it won't work for all the images probably, pdfimages -j paper.pdf some-prefix). Then you can import the images into your Impress presentation (I use Impress to make my presentations and then export them to pdf) or use convert to switch between image formats if you are using a presentation software that doesn't support those formats pdfimages produces.

Sunday, May 4, 2008

Memory in linux

Just found a great blog entry about memory usage in linux. I have often wondered about how memory is reported using the free, ps and top commands. This explains it all :-)

Wednesday, February 20, 2008

Some cool things

Here are a few cool things I have found during my wanderings over the net lately:

A draft to a paper to be published in Scientific American about the limit of quantum computing.

A blog about cool stuff found on the preprint site for papers on physics stuff.

A blog post about why linux doesn't cut it in the mainstream and an experiment the author is conducting to try to prove his hypothesis (won't be a conclusive experiment, but could give reason to further experiments in sociology :-) )

Solar evidence points to human causes of climate change, take that climate warming by human intervention sceptics! :-)

The most powerful laser ever built.

That all for now.

Saturday, September 1, 2007

Camera

My father gave me a cheap webcam some time ago and I never got around to setting it up, today I felt like playing around a bit and decided that the camera would be todays victim, and fell it did :-)

Here are the steps I had to take:

Since I am using debian unstable things are a little bit more difficult for me then the average linux user. My first problem was to make sure the computer recognised the camera. I have a USB camera that I had no idea of what kind it was, all it said on the front was "Creative" (which is a company that all computer personal know) but that did not tell me much about what drivers to use for it or anything else. So it is a USB thing, then the command lsusb must show it (just like lspci shows all pci devices) and there it was:

Bus 001 Device 002: ID 041e:4028 Creative Technology, Ltd

ok, it has ID 041e:4028, lets head over to the guy who holds a good list over most of these cameras, a cool french physician who decided to make a lot of drivers for USB webcams in his retirement. There is a table somewhere there that shows all the different types of cameras and what company produces them and some other information. There I found my USB ID under PIXART

Creative 191 0x041e 0x4028 Vista Plus Pac207 Pac207 Yes gbrg spca5xx ****

This told me to use the spca5xx driver so I searched through the debian archive for this driver but all I came up with was the gspca-source package. After a little pondering I finally tossed my eyes over to the download page of the french mans front page and there lo and behold stood "for kernel up from 2.6.11 : gspcav1-20070508.tar.gz
for kernel below 2.6.11: spca5xx version 0.60.00-1:
spca5xx-v4l1goodbye.tar.gz". Ok, I had kernel version 2.6.17-2 (seen by uname -a), so did a aptitude install gspcd-source and read the README.Debian file for this package where it showed how to use module-assistant to compile these modules into the current kernel. I fired up module-assistant but it complained right away that I did not have any kernel headers on my computer that it could compile these modules against. Ok, lets search for my headers

apt-cache search kernel-headers-2.6.17

gave me no result what so ever! Damn.

After searching a bit I decided that these headers were just not available for Debian any more since it is an unstable kernel after all and I did not want to bother putting up my own custom headers (dont know how to do that) so I decided to upgrade my kernel instead.

aptitude install kernel-image-2.6.22-k7

Ok, reboot and problems start, first the aptitude did not run lilo for me automatically so I had to do it by hand after one reboot (should have checked, never trust computer guys :-) ) and tell it to use my new kernel. Then reboot and again more problems, it said it could not find the modules for this kernel and failed booting. Hmmm .. strange. I boot into the old kernel again and check if the modules are there and yes they are

ojs@heima:~$ ls /lib/modules/
2.6.17-2-k7 2.6.22-1-k7 2.6.8-2-386

After a bit of pondering I found that I had forgotten to change one line in my lilo.conf file, I had copy/pasted from the 2.6.17 lines and the initrd line still had the old kernel version, that is changed

initrd=/boot/initrd.img-2.6.17-2-k7

to

initrd=/boot/initrd.img-2.6.22-1-k7

Rerun lilo and the kernel was up and running.

After booting into the new kernel I installed the kernel header files

aptitude install kernel-headers-2.6.22-k7

and after that I followed the module building directions in the README.Debian file for gspca modules. There I noticed that this does actually build a debian package and used dpkg to install that package then, pretty nice if one wants to upgrade later on.

Now how do I let the kernel then use the webcam? For that I have to load the correct module that I just created with the module-assistant, but how do I find it. Well, since it uses the dpkg to install the modules it is no problem

dpkg -L package_name

shows all the files installed by that package and it installed only one module, gspca.

modprobe gspca

worked like a charm and then I all of a sudden had a working camera! The camorama program all of a sudden started showing a picture of me in front of my computer looking like a ... well, not gonna tell you.

That was that, now I have a working webcam, what to do with it I have no idea, thought about taking some pictures out of the window to show to friends and family from around the world but I dont think it can handle that, at least it gets all blurred and crazy, perhaps I just have to fiddle around with some settings.

This took me a while, about 20 hours, but in the meantime I slept for 8-9 hours, ate a lot, got a haircut, watched TV, procrastinated and tried to figure out how to use POP access to my gmail account (will blog about that later when I have completed that step).

Monday, August 20, 2007

Watch your linux box

Here are some really powerful one liners that one might find handy when taking care of a linux box, be it a server or just your own box.

Thursday, August 2, 2007

Haiku-os on Debian

Cool, just got Haiku-OS running under QEMU. All I did was install QEMU by aptitude install qemu and then downloaded one of the Haiku-OS hard drive images from here (download the one that has the latest date on it and ends in raw.tar.bz2) and then just lunch it with qemu -hda haiku.image and voila you should be up and running.

One minor snag I ran into, my keyboard doesn't work inside QEMU ... have to find out what that is all about.

Tuesday, July 31, 2007

UTF8

I just switched my linux machine over to the utf8 charset. My first problem was that now when I ssh over to another host to check my post, and that host is using latin1 then those characters specific to latin1 get all mixed up.

Enter luit to the rescue!

Instead of saying "ssh username@host.com" then you say "luit -encoding iso-8859-1 ssh username@host.com" and voila, everything is fine. Of course you dont type this all the time, you make it a default alias :-)

Another problem is that many files on my system are still in the latin1 encoding, then iconv is the thing to solve my problems. Take the file and run "iconv -f latin1 -t utf8 filename" and it will spit out the contents of the file but in utf8 encoding instead of latin1.