Category Archives: Linux

Stuff about the superior OS

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 […]

ShellShock – a Bash 3 / Bash 4 spaceshooter!

My weekend project: A top-down space shooter in Bash Note: Bash is SLOW. This requires an Intel Core Solo or better to run well. Comments welcome. Patches twice as welcome. Link: Update: Since the name “ShellShock” was used as a nickname for a Bash exploit, this game has received a whole lot of attention. […]

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 […]

Linux on Mac Mini – power on after power loss

The Mac Mini doesn’t save this information in its BIOS (or equivalent), so you need to set it on each boot. I use my distribution’s /etc/rc.local file for this. Either way, these are the commands to run (copy, and uncomment the correct line for your Mini): ## PPC Mac Mini #echo server_mode=1 > /proc/pmu/options ## […]

Creating .deb-Packages With Checkinstall

If you’ve exhausted all other options, it might be time to compile from source, even in Debian. If you’re about to do that though, don’t abandon the concept of .deb files and the advantages they bring with versioning and easy removal. Use “checkinstall“. Checkinstall is in the standard Debian repositories and encapsulates your install into […]

Fixing “shmget() failed: No space left on device”

I had this happen when someone ran a script to kill x11vnc every so often, using kill -9 (don’t ask). Killing x11vnc with SIGTERM (15) allows it to clean up its shared memory segments. SIGKILL (9) will not. Googling around, I found a script over here (backup copy here). The problem with that was that […]

SSH in a while loop – stdin problems

When SSH is used with a line like “while read ….”, the while loop will only run once. This can be seen by running this simple example: $ seq 1 10 | while read line; do ssh remotehostname “echo x${line}x”; done x1x You might expect this to connect to the host with the name “remotehostname” […]