I got an inexpensive flatbed USB scanner and was disappointed with the bundled (Windows-only) software, so I tried it on Linux. Debian Etch installs xsane by default, but it would not recognize the scanner. I tried a whole bunch of things but nothing help, until I accidentally started xsane from a root terminal, and it “just worked”, despite the warning from xsane about running as root.
Stop GEdit opening FTP files as read-only
November 22, 2007I use Debian’s “Places -> connect to server…” dialog to setup connections to a couple FTP servers. Copying and such like work fine, but when I try to use GEdit, it always opens the file read-only. I can “Save As” to the exact file, so it wasn’t a permission problem. The trick is in some totally obscure config file. Here’s the (in GUI) steps to fix it:
- Run gconf-editor
- Open the tree to /apps/gedit-2/preferences/editor/save
- Edit writable_vfs_schemes
- Add ftp to the list
Voila. Gedit saving FTP. Via the kaylus on the Ubuntu Forums, but it is the same in Debian Etch.
VMWare Server on a headless Debian Etch
November 19, 2007I recently had to install VMWare Server on a server that didn’t have the GUI bits installed. This is the list of additional packages that need to be installed for VMWare to install:
apt-get install psmisc libxrender1 libxt6
Then it will install, and the VMs can have GUI even though the host doesn’t!
Making PDFs on Debian Etch
October 6, 2007This are my notes on setting up a PDF printer on Debian Etch for the local machine (i.e. not as shared printer).
Install cups-pdf:
sudo apt-get install cups-pdf
Add a printer. I find that the browser-based configuration works better than the GUI versions (Foomatic-GUI and Gnome CUPS Manager):
- browse to http://localhost:631/
- Add a printer
- Choose the type Generic postscript color printer rev4
- Choose the location cups-pdf:/
The PDF files are put in a PDF subdirectory of your home directory (~/PDF). However, if you print while logged in as root (for example, the test page from the web interface), the PDFs usually end up in /root/PDF but once I found it in /var/spool/cups-pdf/ANONYMOUS.
One other thing to note is that it uses the title of the print job as the file name. The title is set by the program that’s printing, but if it is there is an existing file with the same name, it will overwrite it silently. Generally this isn’t an issue, but Firefox/Iceweasel uses the page <title> as the print job name, so if pages have generic/bad titles, you have to be careful.
Making images of floppy disks and CD-ROMs on Linux
October 6, 2007I have several books that came with floppy disks or CD-ROMs. I’m worried about whether they’ll last and wanted to make copies of them. It is trivially easy on Linux:
dd if=/dev/scd0 of=/iso/book.iso
I got a rawread script that supposed solves some compatibility problems. I found that dd worked fine on two disks that the script had problems with. The script is called with
rawread.sh /dev/scd0 >book.iso
To mount a image (mkdir /media/iso directory first):
sudo mount -o loop book.iso /media/iso
For floppies, use /dev/usb0 (I have a usb floppy drive) and .img as the extension.
Linus on Debian: WTF?
August 24, 2007So I am reading an interview with Linus Torvalds, and they ask him which distribution he runs, and he comes out with:
…the only distributions I tend to refuse to touch are the “technical” ones, so I’ve never run Debian, because as far as I’m concerned, the whole and only point of a distribution is to make it easy to install (so that I can then get to the part I care about, namely the kernel), so Debian or one of the “compile everything by hand” ones simply weren’t interesting to me.
Far be it from me to contradict the gospel, but that is just plain wrong. I used to use Red Hat, and now run Debian. While I switched because of the licensing, I was amazed at how great apt-get is. It makes maintenance so simple. My machines are totally up to date, and I spend almost no time doing it (unlike with Red Hat). And I am absolutely not a “compile everything by hand” kind of guy either.
This comment really lowered my opinion of him. It makes me think there’s more than a grain of truth in other sour grapes.
VMWare server will not run after Debian Etch updates
August 20, 2007VMWare didn’t start after I installed the latest Etch updates. The error message is printed to the terminal, which is pretty useless if you’re starting it from the GUI. Anyhow, the fix is pretty easy:
apt-get install linux-headers-`uname -r`
/usr/bin/vmware-config.pl
I guess the update had a new kernel and VMWare needed to re-install its hooks.
bash equivalent to the Windows "start" command line
May 30, 2007One of the things that I missed when I moved from Windows to Linux was the start command, which would launch the correct program for a given file. Well, add the following line to ~/.bashrc to get it:
alias start=xdg-open
Then either logout/login, or run (the leading dot & space are important):
. ~/.bashrc
Now you can launch the appropriate file by doing
start artwork.png
Custom java parameters for Tomcat on Debian Etch
May 14, 2007The correct place for custom java parameters on Debian Etch is in /etc/default/tomcat5.5: look for the line:
CATALINA_OPTS=”-Djava.awt.headless=true -Xmx128M -server”
I usually bump up -Xmx (my server is just for Tomcat) and add -Xss2m.
Custom Server Header for Tomcat in Debian Etch
May 14, 2007If you are using Tomcat to serve pages directly (i.e. not through Apache), it will send as server header of “ApacheCoyote/1.0 which I do not like. To change this, go into the /etc/tomcat5.5/server.xml file and in the appropriate tag, add an new attribute:
server=”NCSA/1.0a6″
Or whatever name you would like it to send. In the same spot, you can add the
URIEncoding=”UTF-8″
Which is necessary for full Unicode support.
Posted by fileformat
Posted by fileformat
Posted by fileformat