Category Archives: Command-Line

How to expand a partition on the fly

http://commons.wikimedia.org/wiki/File:Crystal_128_harddrive.pngI’ve just had some troubles with my Odroid XU4 complaining that there was no more space left on the micro SD card. It’s a 16 GB card so I was wondering what caused this. As it turned out I simply forgot to expand the root partition to the size of the SD card, so I thought I’ll write a post about how to easily and safely expand a mounted linux partition on the fly without having to reboot the system.
Read the rest of this entry

How to shrink PDFs

pdfcomressSometimes a PDF document you’ve created is several megabytes in size due to high resolution images. This may cause problems when you want to send this PDF via email if the attachement’s size is limited by your email provider. There is a way you can reduce the file size of an existing PDF without having to render it again with low resolution images.
Read the rest of this entry

How to create a video DVD with command line tools

DVDsMaybe you know this scenario: You’ve been invited to a family get-together and you take some videos of the most memorable events. Afterwards a family member comes to you and says: “I’ve seen you recording this and that. Could you give it to me on DVD?”. As a matter of fact, you can easily create a video DVD of any video you have recorded with just a view command lines.
Read the rest of this entry

How to use a remote firewire port and transcode DV video locally with ffmpeg

Vhs_cassette_bottomI recently moved into another appartment and found some old VHS tapes I recorded years ago. As luck would have it, I got my hands on a VCR and a MiniDV camcorder with builtin ADC, so I can get analog video signals into the MiniDV camcorder. So all I needed was a computer with firewire or IEEE1394 port. The only computer I have that still has a firewire port is my server, so I hooked the VCR to the MiniDV and the MiniDV to my server.
Read the rest of this entry

How to add a hard disk to hddtemp and read the temperature

http://commons.wikimedia.org/wiki/File:Crystal_128_harddrive.pngHddtemp is an application for reading the temperature sensor of hard disks with S.M.A.R.T support. In case the software doesn’t recognize your hard disks sensor, but you are sure that your disk has one and is also S.M.A.R.T enabled, you can manually add the correct parameters for your disk to the hddtemp database. I will show this based on my INTEL 530 Series mSATA Solid-State drive in the second part of this post, .
Read the rest of this entry

How to use your iPod Shuffle in Linux

iPod-ShuffleIn this article I will describe the probably best way to use your first or second generation iPod Shuffle in Linux. The described method is based on a python script called rebuild_db. The script will allow you to simply copy/paste music files to your iPod like to any other regular MP3-Player. In case you have a different or newer version of the iPod, the described method may not work for you and you should try using gtkPod instead.
Read the rest of this entry

How to use an SSH connection as a SOCKS proxy

https://commons.wikimedia.org/wiki/File:Gnome-fs-ssh.pngIn this article I will describe how to use an SSH connection as a SOCKS proxy. This basically means that you can route the network traffic of any application or even your entire systems traffic through an SSH connection.
Read the rest of this entry

How to trim disk images to partition size

I’ve recently been playing with my Raspberry Pi and Arch Linux when I encountered the following problem:

I’ve downloaded the Arch Linux image from the Raspberry Pi download page and used dd to copy it to a 8GB SD card. Read the rest of this entry

How to make screencasts with FFmpeg

FFmpeg is able to use audio and video streams from many different sources. In order to record a screencast, you can use the x11grab input module for recording an X screen and the alsa input module for audio recording.
Read the rest of this entry

How to compile Truecrypt from source

A few days ago my new USB hard drive arrived. My idea was to connect the hard drive to my Raspberry Pi so that everyone in the network can read the data on that drive. But all the data stored on that drive should be encrypted. The problem was that I also wanted to use the hard drive to copy files from a computer of a friend. Not everyone uses Linux, so I could not encrypt the hard drive with LUKS.
But I had an idea to encrypt the hard drive with Truecrypt, which is available for Windows, Mac OS X and Linux. I created a little partition (about 100MB) which is not encrypted and download the Truecrypt installer for each OS to that partition. The advantage is that you don’t need an internet connection to download the installer. The rest of the hard drive is encrypted with Truecrypt.

The main problem was the installation of Truecrypt on my Pi because there is no ARM binary. I’ve no X-Server on my Pi so I had to install Truecrypt as console-only version. Here are the steps I’ve done to install Truecrypt on my Pi.
Read the rest of this entry