Patrick's Blog
Convert all eps in current directory to pdf’s
July 4th, 2007I often have to convert graphics etc. in a certain directory to some other format. The loop below shows how to do this. This is trivial, but as I don’t use it often enough, I keep forgetting the exact syntax and thus have to google for it each time, which sucks balls.
for f in $( find . -name '*.eps' ); do
epstopdf $f
done
Another very useful one-liner:
for f in $( find . -name '*.pdf' ); do ps2pdf14 -dPDFSETTINGS=/prepress $f temp.pdf; mv temp.pdf $f; done;
this will embed all the fonts in the PDFs.
Posted in latex, linux | 1 Comment »
Gigabyte GA-965P-DS3 and 4GB of memory
May 11th, 2007The prices of memory are currently quite low, so I thought I upgrade my workstation (running Ubuntu Feisty Fawn) from 2GB to 4GB. However, after the memory-upgrade the orangish Ubuntu-progress bar would just stall at around 15%. Rebooting and switching to the verbose, non-graphical boot-up, I got an error saying something about “Bad page state in process ‘modprobe’”. I googled a little bit and found a page describing a similar problem. There the solution was blacklisting the module intel_agp. As my motherboard doesn’t feature an on-board graphics chip anyways, I thought it wouldn’t hurt blacklisting this module. Et voilà: the computer seems to work fine now, with 4GB of RAM (don’t really know what’s the actual explanation of this behavior).
Posted in linux | 1 Comment »
My gvimrc
July 17th, 2006In case someone is interested… For the TeX stuff to work, one needs to install vim-latexsuite.
syntax on
set autoindent
set tenc=utf-8
set enc=utf-8
if has("eval")
let g:Tex_AutoFolding=0
let g:Tex_SmartKeyQuote=0
endif
set lines=50
set columns=100
Posted in linux, programming | Comments Off
Ubuntu Dapper and new mainboards
July 8th, 2006Today I was encountering a small “bug” under Ubuntu Dapper: After getting my laptop back from the IBM Repair center (I had an issue with the graphic card) everything was running as before, except one thing: I didn’t get an IP address from my router. I got an error when ifupping eth0:
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
After googling, I found the problem: I guess the mainboard got replaced by the repair center and thus I had an other MAC address. Strangely Ubuntu gets quite confused by such a change! The solution was to replace the old MAC address in /etc/iftab by the new one and reboot the system.
Posted in linux | Comments Off
Brother HL-5170DN and Ubuntu 6.06 LTS
June 22nd, 2006As far as I can remember ever since I bought the Brother HL-5170DN printer in 2004, I had smaller problems using it under Ubuntu. This included among others the following symptoms: printing works only in Acrobat Reader and not in Gnome programs, Duplex printing does not work properly or printing slides which include lots of plots and pictures takes ages to print.
I think that all these problems have finally gone! And this all thanks to this blog entry. To summarize everything and adapted to Ubuntu Dapper Drake:
- Download the LPR driver found here. We need the package for Debian.
- Second download as well the CUPS driver here. Again: we need the Debian package.
- Install both packages with dpkg -i package-name.deb. This will show you a hell a lot of warnings, but it will still work.
- Add the printer with the gnome-cups-manager. As driver you need to select: “Brother HL-5170DN for CUPS (en)”. For some odd reasons I had to alter the device URI, as it was set to a default value.
Finally I can strike this through on my TODO list!
Update: For the hl5170dnlpr package to install cleanly, one has to create the directory: /var/spool/lpd and uncomment the last line of /var/lib/dpkg/info/hl5170dnlpr.postinst.
Posted in linux | Comments Off
Suspend2 and Ubuntu Dapper Drake
April 29th, 2006I’m currently running the Ubuntu Dapper Drake Beta on my IBM Thinkpad. What I still don’t like in this latest release of Ubuntu is the usage of the in-kernel software-suspend. I used suspend2 for the past one and a half year and I was quite happy with it. So there isn’t any reason why one should change to the slow and somewhat broken in-kernel swsuspend…
The compilation with the suspend2 patch is quite straightforward:
- download latest kernel sources
- patch the kernel sources with the appropriate suspend2 patch
- enable the suspend2 stuff with make menuconfig (don’t forget lzf compression, this will make the whole thing much faster on modern hardware)
- make-kpkg and dpkg -i …
Not too difficult, but the interesting thing is how to use suspend2 hibernation functionality from the Gnome logout menu. It is a simple as changing the /etc/acpi/hibernate.sh to something like:
/usr/sbin/hibernate -F /etc/hibernate/hibernate.conf
provided that /etc/acpi/hibernate.conf is your configuration file for the hibernation. The same applies for the sleep button, where you need to change /etc/acpi/sleep.sh.
Posted in linux | Comments Off
Linux on IBM T42
October 16th, 2005I started working on my Howto about “Debian GNU/Linux on an IBM T42″. It is not yet finished, but the important part about the kernel configuration is fairly complete. You can find the article here.
I hope to add more sections in the next few days.
Posted in linux | Comments Off
OpenWrt on a Linksys WRT54G
September 27th, 2005Update: I decided to move this article from the blog to its own page, as I guess there are a lot of people interested in this article. You can find it here.
Update 2: I’ve just added some links, which helped me a lot installing and configuring OpenWrt on my router. You can find them here.
Posted in linux | Comments Off