Monday, October 28, 2013

Windows Boot Floppies

Trying to install an old win'98 CD to a Virtual Box machine I found that the CD is not bootable (though newer ones are). I have some old boot floppies but no physical drives set up and ready to run or copy from. Poking around I found boot floppy "images" of every kind but they're all self-extracting '.exe files. Peculiar thing  about windows folks is they seem to want to run every exe they can download to see if anything bad doesn't happen. I was willing to run one in a vbox but Wine won't allow it to write to a floppy, even a virtual one.

I found a helpful boot image  from Bob Cerelli's site, but it's an iso. I virtually booted it and copied all to a virtual floppy which was all I was looking for. Thanks Bob.


Sunday, October 27, 2013

Configuring xdg-open

Open/Libre-office spreadsheet hyperlinks would not open PDF files with Acroread even though caja was properly set to do so by default.
 

Xdg-open is the freedesktop.org scheme for opening files and URLs with our preferred applications.

First I verified that PDF files were recognized as such:

> xdg-mime query filetype somepdffile.pdf 
application/pdf
Good, and then that Acroread was the default application:
> xdg-mime query default application/pdf
userapp-acroread-9UNI5W.desktop
Excellent, but does it work?
> xdg-open somepdffile.pdf
Error: no "view" mailcap rules found for type "application/pdf"
Opening "somepdffile.pdf" with Document Viewer  (application/pdf)
In this case "Document Viewer"is Atril, not Acroread.

Poking around the mailcap thing I edited the user section in /etc/mailcap as so:

#  User section follows:  Any entries included in this section will take
#  precedence over those created by "update-mime".  DO NOT CHANGE the
#  "User Section Begins" and "User Section Ends" lines, or anything outside
#  of this section!
#

# ----- User Section Begins ----- #
application/pdf;/usr/local/bin/acroread %s; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf; priority=1
# -----  User Section Ends  ----- #
That did the trick.