Archive for the ‘linux’ Category

[Solved] sshd Does Not Run At System Startup (Ubuntu)

Problem: sshd does not appear to start on system boot, but runs fine when started from a terminal with /etc/init.d/ssh start Update Dec 2010: Thanks to Jeremie here. Change the following in /etc/init.d./ssh to stop sshd starting before the network is ready: Change: # Required-Start: $remote_fs $syslog to: # Required-Start: $remote_fs $syslog $network Merci Jeremie! […]

Extract A Single Image From A Video Using FFMPEG

Dead handy, this: ffmpeg -ss 0.5 -i inputfile.mp4 -t 1 -s 480×300 -f image2 imagefile.jpg The various options: -t 1: limit to 1 frame extracted -ss 0.5: point of movie to extract from (ie seek to 0.5 seconds) -s 480×300: frame size of image to output (image resized to fit dimensions) -f image2: forces format […]

Connect to a WPA/WPA2 Secured Network In Linux

This turned out to be dead easy, although it took a bit of futzing around due to my own slowness. The situation arose during an a failed upgrade of my dad’s machine to Ubuntu 10.04 (aka Lucid Lynx). I’m sensing a pattern here; I don’t think there has been an upgrade that has gone smoothly […]

Ubuntu 9.10 Karmic Upgrade Problem Fixed (mountall/init)

(Jump to the bonus section on sorting a removed Gnome panel) I finally got round to doing the Jaunty->Karmic upgrade on a troublesome machine. Well, re-doing. I made an abortive attempt to install it on this particular exhibit of electronic arthritis back before I left for Barcelona, which ended in me reinstalling 9.04. Anyway, for […]

Count Arguments In A Bash Script

Another useful tip I’m sure most people will be familiar with, but in bash scripts $# stores the number of arguments passed to the script. Eg, combine with $@ (all arguments) for batch processing (what I used it for): foreach $arg in $@; do [stuff] [compare with $# to tell remaining items] done Very basic […]

Batch Rename or Move An Extension In Linux (Eg .JPG to .jpg)

A short and easy trick, but one that is either not referred to or more complex examples given. I wanted to change a bunch of upper case .JPG images to lower case. Rather than writing a bash script or some such, I just used the ‘rename’ command: rename ‘s/\.JPG$/\.jpg/’ *.JPG It may depend on perl […]

Installing Debian on QEMU

Since I decommissioned my home server in favour of an NSLU2 (a NAS), I’ve found myself without a Linux machine to much about with or develop on while on the go (well, whenever I can’t use my laptop). So instead I’ll be using a virtual machine by running QEMU from my USB drive. Since my […]

Broadcom 4318 Working Under Ubuntu Hardy Heron 8.04 (Ndiswrapper)

In my dad’s PC is a wireless card – a Linksys WRT54GS I think. Anyway it uses the Broadcom BCM 4318 chipset, as seen by a quick lspci: richard@hades:~$ lspci | grep roadc 00:0a.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) Unfortunately the new b43 / b43-fwcutter package […]

Back to Ubuntu

So I’m suppose to be revising for the Big Testâ„¢ that I’ve got tomorrow, but instead I decided to reboot in Ubuntu. And by gosh, I’d forgotten how nice it looks. And this is still the 7.04 version! Sounds are nice too – it’s probably just subjective perception, but playing music sounds nicer too, although […]

Irritation: Falling back to the standard locale (“C”)

Due to the pressures of university (labs, reports, and a dissertation), coupled with some of the other things I’ve been doing I haven’t posted here in ages. For now I’ll have to give you a post that is as much for you as it is for me. Occasionally on my debian box I get an […]