Montag, 9. Mai 2011

Combine multiple PDF documents into one

Just a quick one, as I now needed this for the second time and already didn't write it down the first time …
I found this when looking for a way to combine multiple PDF documents into one. You just need to
  • sudo apt-get install gs pdftk

  • gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
Pretty self explaining, so I'm gonna end early here.

Dienstag, 15. Februar 2011

Setting up my Kubuntu

Just for the record, here's how I configure Kubuntu after installation:
  • install Firefox with the following add-ons:
  • install VirtualBox
  • System Settings: setup Social Desktop opendesktop.org
  • setup ssh server
    • sudo apt-get install openssh-server
  • setup ssh public key authentication
  • setup Dropbox
  • setup Synergy+
  • setup BackupPC client:
    • sudo apt-get install rsync
    • edit /etc/default/rsync to include "RSYNC_ENABLE=true"
    • create /etc/rsyncd.conf
    • sudo chown root:root /etc/rsyncd.conf
    • create /etc/rsyncd.secrets
    • sudo chown root:root /etc/rsyncd.secrets
    • sudo chmod 600 /etc/rsyncd.secrets
    • sudo /etc/init.d/rsync start
  • setup Autostart
    • ~/.dropbox-dist/dropboxd
    • /usr/bin/ssh-add (using ksshaskpass)
    • On desktop, mounting netbook drive: /usr/bin/sshfs eee1005.home.lan:/home/stefan/ /home/stefan/eee1005/
    • On desktop, Synergy+ server: /usr/bin/synergys
    • On netbook, Synergy+ client: /usr/bin/synergyc -f e521mk
  • setup Skype

Freitag, 28. Januar 2011

Installed Linux on an SSD

I have it up and running for some weeks now, I took the most simple approach possible described here: just create one partition on the SSD (I still have Grub on my HD) using

sudo fdisk -H 32 -S 32 /dev/sdg (choose first cylinder as 2, end cylinder as the default one)
sudo mke2fs -t ext4 -E stripe-width=128 /dev/sdg1

when booting Kubuntu 10.10 from installation CD, then install from there.

No need to do any aligning calculations whatsoever. I even have /home, /tmp and /var on the SSD. There is quite some write activity in those directories, but then SSDs get cheaper and cheaper …

All that is left to do after installation is:

  • sudo apt-get install sysfsutils
  • sudo nano /etc/sysfs.conf
  • add the line block/sdf/queue/scheduler = noop at the end
  • sudo nano /etc/fstab
  • change the options for / to noatime,discard,data=ordered,errors=remount-ro

System performing abolutely great now!

Freitag, 17. Dezember 2010

Installing Linux on an SSD

I've got myself an OCZ Vertex 2 60 GB for Christmas :-)

I'll document the process of how to configure, format and install Kubuntu 10.10 here. I've waited until this release, as starting from 2.6.33 Linux Kernel has built in TRIM support making best use of SSDs. I'll try to come up with the best setup for

  • installing Linux as single OS, so no dual booting
  • no RAID or LVM setup
  • keeping /home and /var on my existing HDD as these will be written to rather frequently

I'll make use of knowledge gained by filesystem developer Ted Ts'o and some other blogger regarding alignment considerations, the excellent Ubunti Wiki SSD checklist and the detailed blog entry on Aligning an SSD on Linux by Markus Ewald.

Now the fun can start …

Dienstag, 7. Juli 2009

Building NSIS on Linux amd64

NSIS is an open source scriptable installer for creating Windows setup files that can also be run under Linux to produce .exes. You can even install it using sudo apt-get install nsis. But I needed a version that creates a log file when installing, so I had to compile from the sources myself. I faced some problems, as I didn't find any good documentation for an amd64 system, so here's what I did additionally to the steps described here:


  • sudo apt-get install g++ gcc-multilib g++-multilib


  • edit SCons/config.py and set the variable NSIS_CONFIG_LOG to yes


  • scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/home/stefan/opt/nsis-2.43 install-compiler

Mittwoch, 11. Juni 2008

Unable to open PDFs in KPDF

After installing the latest Adobe Reader directly from Adobe's site (I quickly uninstalled the version from Medibuntu again that I blogged about before, because I couldn't choose a german locale), I noticed I couldn't open my PDFs in KPDF anymore. I found some errors from AppArmor in /etc/messages, but according to Google they were not relevant. Than I found a post describing the same behaviour, noting that starting KPDF as root worked. I checked it, same with me.

When starting KPDF from the commandline, a warning is shown:
kpdf: WARNING: Unknown mimetype 'application/x-kdeuser1'.


This hints at the solution: Adobe Reader installation obviously messed up mime types, going to Konqueror -> Settings -> Configure Konqueror -> File Associations -> Known Types -> applications and deleting user x-kdeuser1 (I also had x-kdeuser2) solved the problem.

Samstag, 7. Juni 2008

Installing software from Medibuntu

Here's how to install Skype and Adobe Reader via Adept Manager from Medibuntu:


  1. in /etc/apt/sources.list add
    ## medibuntu
    deb http://packages.medibuntu.org/ hardy free non-free
    deb-src http://packages.medibuntu.org/ hardy free non-free

  2. add the GPG key for medibuntu:
    wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O-
    | sudo apt-key add -

  3. update packages:
    sudo apt-get update


Now in Adept Manager just install Skype or Adobe Reader.