Skip to main content

Posts

lsscsi and systool

The lspci and lsusb commands are familiar to me, but lsscsi was unfamiliar. Written by Doug Gilbert, it provides information about SCSI devices by scanning the sysfs pseudo file system. The author maintained a web page (now defunct) that provided useful information about lsscsi, including some detailed descriptions of the SCSI subsystem information available. Fortunately, a copy resides here . Here's a sample listing from my system That also shows the generic SCSI device names (note that command can be run as a regular user) : $ lsscsi -g [0:0:0:0] disk ATA ST3250624A 3.AA /dev/sda /dev/sg0 [0:0:1:0] disk ATA Maxtor 6L200P0 BAH4 /dev/sdb /dev/sg1 [1:0:0:0] disk ATA Maxtor 6Y250P0 YAR4 /dev/sdc /dev/sg2 [1:0:1:0] cd/dvd HL-DT-ST DVD-RAM GH22LP20 1.02 /dev/sr0 /dev/sg3 [2:0:0:0] disk Seagate FreeAgent 102D /dev/sdd /dev/sg5 [3:0:0:0] cd/dvd SONY DVD RW DRU-810A 1.0a /dev/sr1 /dev/sg4 [4:0:...

UNIX Copy-on-Select for MS Windows

One of the most striking differences between UNIX and MS Windows is the copy and paste behavior using the mouse. This becomes an annoyance if you are used to the UNIX way of doing things and always forget to highlight-right-click-copy when using MS Windows. Andy Polyakov's True X-Mouse Gizmo allows UNIX-like copy-on-select behavior in MS Windows environments. The page also contains useful information about how the utility works and how to modify its behavior, as well as a few things to watch out for. Importantly, it does not remove the traditional MS Windows behavior, so users accustomed to that way of doing things will not notice a difference.

IceWm and GMail

I have been using the IceWM window manager and have been exploring how to add functionality and usability to it since it presents as basic window manager. The homepage provides useful documentation and FAQs. By default, IceWm expects you to have traditional UNIX tools at hand and doesn't automatically provide for newer technologies like GMail . It would be nice for the mail icon to work with a GMail account. Joel Dare has built upon the work of others and crafted a URL that automatically opens your GMail account in a browser. Importantly, Joel's version of the URL closes any open logins to GMail before attempting to log in; earlier versions of the URL would not complete correctly if you have multiple GMail accounts as I do. Since the URL contains my password in plain text, I chose to create a script at ~/bin/gmail-login with permissions of 700: #!/bin/sh # the following is all on one line firefox https://www.google.com/accounts/ServiceLoginAuth?continue=http://mail.g...

KDE's kdict, dict.org and Firefox

I haven't used the KDE desktop since the release of KDE4, instead relying on IceWM . and while I may go back to it, I miss one of the desktop applets, kdict. Using it to check a definition, spelling, synonyms, etc. was very handy. Since I use Fierfox as my primary browser, it made sense to consider using a bookmarklet. Bookmarklets are small pieces of javascript code that can be treated as a bookmark. When clicking the bookmark, the code will be executed. I modified a bookmarklet for Dictionary.com to use the dict.org dictionary like kdict did. To make one for yourself, right-click on the Firefox Bookmarks toolbar, then select "New Bookmark", then fill in the following information. The javascript is all on one line. Name: Dict.org Location: javascript:void(q=prompt('Dict.org%20Search:',getSelection()));if(q)%20void(location.href='http://www.dict.org/bin/Dict?Form=Dict2&Database=*&Query='%20+%20escape(q)) The Database=* value mimics that used by k...

HP Mini 1120NR Mi Edition

My wife surprised me with an HP Mini 1120NR Mi Edition for an anniversary gift! While it runs Linux, it uses an HP-modified version of Ubuntu, which is a Debian-based Linux. Nothing wrong with that, except that Debian/Ubuntu organizes things differently than Mandriva/RedHat, so it took some getting used to. The first thing I did was to increase the memory from 1GB of RAM to 2GB of RAM, not that I needed it right now, but RAM is currently very inexpensive. Previous version of Ubuntu for the Mini did not have kernels compiled for >1GB support, but this one recognized it upon re-boot. The interface is unlike a conventional desktop and is called harbour-launcer . you can see how HP modified the Ubuntu/GNOME desktop by reading how others have modified their desktops to mimic HP . The first thing that I need to do was install some familiar apps, like mc . Alt-F2 brings up a RUN dialog, and entering gnome-terminal launches a terminal window. I couldn't become the superuser since I ...

Using rsync to Fix a Downloaded ISO File

I wanted to upgrade to Mandriva 2009.1 and had the .iso image, but the checksum failed. Since I was at my workshop and had only EVDO modem service, I didn't want to download the entire .iso again and I remembered that I could use rsync to "fix" the damaged .iso file. To avoid using bandwidth at the garage, I use a USB drive at home (where I have Verizon FIOS) to mirror the current Mandriva repositories using rsync, so I knew that Georgia Tech had an rsync server. I just needed to find the path to the .iso files. NOTE: Although Mandriva 2009 is now obsolete, the technique described here still works on any downloaded file using and rsync server. Starting with: $ rsync rsync.gtlib.gatech.edu:: I eventually wound up with: rsync://rsync.gtlib.gatech.edu::mandrake/mandrake/official/iso/2009.1/ as the path. Then, I changed directory to where I had the damaged .iso file and executed (all on one line): $ rsync -Pz --stats --inplace --ignore-times rsync://rsync...

Fighting Linux Rootkits

Recently having had an unpleasant experience with a rootkit that was installed in /var/tmp , better security measures were clearly needed. Unfortunately, /tmp and /var/tmp are world-writable by necessity and are the favorite target of rookit users. It would be nice to have some sort of protection on these directories and the easiest way is to mount a filesystem image using the loopback device and mount it with noexec and nosuid options via /etc/fstab . Create the file system image, change its permissions with chmod 1777 and keep it in /boot ; 1,200,000 512-byte blocks should be a good size and not waste too much disk space for small files. If your needs are different, adjust accordingly. # dd if=/dev/zero of=/boot/tmp.img bs=512 count=1200000 This produces a disk size of roughly 300M. The filesystem format chosen for this particular task is Reiserfs because it handles large amounts of smaller files very well. We need to use the -f option because the file is not a block special ...