Start gnome-terminal in you home directory

In earlier versions of pre-Lucid Lynx, when you started gnome-terminal, you would be sitting in your home directory to start.  Most all terminal emulators start you in your home directory if you are not running as a superuser.  Now with Lucid Lynx, you now start in the VFS (Virtual File System) root, aka. '/'. This is very inconveient for many of the things I do expect.  Here is the way to fix gnome-terminal so it's expected startup behavoir is restored.

POSIX RegEx for hostnames

Here is a POSIX compliant regular expression for testing a hostname.  This does not support a fully quilified domain name (FQDN).  This was tested with linux grep. 


Here is a working example:

grep -E -i -w '^([[:digit:]a-zA-Z]([-[:digit:]a-zA-Z]{0,61}[[:digit:]a-zA-Z]){0,1})$'


Allow UID 0 accounts to login but not root over SSH


More than once, I've needed root access to a server over SCP.  As we all know, allowing SSH access with the root user is a blaring security hole because the user is a well-known userid with superuser access. This makes it the first thing that a hacker or script-kiddie will check.  If you create another user with userid number 0 and set PermitRootLogin to 'no' in the sshd_config file, you will still not be able to login.  The PermitRootLogin option actually blocks ANY user if their user id number equals 0.

Script to get Network Interface IP

Here is a easy little script to get the IP of a specific interface.  It supports both IPv4 and IPv6. 

HowTo: Make a DOS bootdisk in Linux

This is just a quick article I wrote for myself. I keep on forgetting how to make bootable floppy disks in linux. 

  1. Get an floppy image from or some other source
  2. fdformat /dev/fd0
  3. mkfs.vfat /dev/fd0 ## you may need to use the -I option with some USB floppy drives/li>
  4. unzip bootmec.exe ## that makes a file called bootmec.IMA (if you got an image from
  5. dd if=bootmec.IMA of=/dev/fd0


Syndicate content