Category Archives: Howto’s

How to do stuff!

Reverse SSHFS mounts (fs push)

sshfs is a neat way of mounting a file system from one machine to another over an encrypted ssh channel. However, for machine CLIENT to access a file system that resides on machine HOST, CLIENT must generally be able to log in to HOST. In addition, CLIENT must be able to connect to HOST in […]

Creating persistent SSH tunnels in Windows using autossh

Download Cygwin (http://www.cygwin.com/) Install Cygwin, selecting the autossh package. Start the Cygwin shell (Start -> Programs -> Cygwin). Generate a public/private key pair. At the command line, run: ssh-keygen Accept the default file locations Use an empty passphrase Copy your newly-created public key to the SSH server. scp .ssh/id_rsa.pub user@ssh.host.name:id_rsa.pub Add your public key to […]

Running PulseAudio in system mode with TCP listening on Debian Wheezy

On this thin client I’ve set up, I wanted pulseaudio to run before logging in, and not have any specific users on the machine. System mode was called for. On Wheezy, pulseaudio is by default configured for per-user sessions. To remedy this, edit /etc/default/pulseaudio, putting PULSEAUDIO_SYSTEM_START=1 Then, edit /etc/pulse/system.pa – this is the file that […]

One-time passwords in Debian Wheezy with libpam-otpw

While public and private keys with decent pass-phrases are an excellent way of logging in securely to a remote system, it’s sometimes simply not feasible. Your Android device which normally does the job for you is out of battery, you are in a remote country with only a wired connection in a shady Internet cafĂ©, […]

CD-ROM Raspberry Pi case

I built a case for my first Raspberry Pi out of an old CD-ROM. Here’s a post about it. Components Plextor UltraPlex 40 Max SCSI CD-ROM (faulty) Asus WL-330N3G wireless client Vanson Twin-USB Power Adaptor (2A, 5V, model SMP-600A005USB) A power cable, a short HDMI extension cable, an audio cable, an IDE cable and some […]

Using CheckInstall to track custom source downloads on Debian

CheckInstall keeps track of all files installed by a “make install” or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution. Use CheckInstall instead of just running “sudo make install“, as that will likely put files all over […]

Pausing and continuing a process on Linux

If you want to pause a process while you do something else, like for instance stop a heavy file operation while you’re just moving some stuff around quickly, there are two signals to pay attention to: STOP and CONT. STOP will pause a process (not actually stop it – it doesn’t die) CONT continues a […]

bash time limit on commands

Several programs, like “timelimit” and “timeout”, exist to prevent a process from running for too long. However, if you want to do this on a box where neither is installed, there’s a way to do so with bash alone. Based on the original script I found at pixelbeat.org… #!/bin/sh # Execute a command with a […]

Debian and Ubuntu auto-login and Xorg without a display manager

If you have a harddrive password (most laptops do this) or full disk encryption, you might not feel the need for an additional login after your system boots. On most Debian-based systems, TTY’s 1 through 6 are available after boot, while TTY 7 is used for Xorg. Therefore, I like to put my auto-login TTY […]