Monday, June 8, 2009
Just what I needed. I needed to open a *.dvi file from dired, and open the LaTeX source file while looking at the formatted text.
Saturday, March 14, 2009
Neither Google nor ConvertAll know about Scruples. Both are convenient ways to convert units. The unix console utility (non-GUI) Units is my choice, so far, as it knows at least one unit, about which the two flashy tools do not.
I installed ConvertAll through Synaptic on Ubuntu. It is written in python using the QT library, so it is usable on Windoze as well as GNU/Linux systems. It's a GUI solution. It doesn't know about scruples, but it is claimed to work well with composite units, such as Kg/m/hr
In the google search bar, I enter "2 scruples in g". Google doesn't know about scruples either.
Units wins the first round. And it's easy to use.
Saturday, March 7, 2009
Today, I discovered this page: A tour of the Mariana Subduction System . Guess what? It's available as an "ArcScene GeoWall visualization of Mariana 3-D topography and earthquake distribution".
It can be done in GNU/Linux. I think Gentoo would be more appropriate, but one possible option is available out of the box, for Ubuntu, my current system of default choice. One package is "viewer" and it might be around. Another is "inventor". It looks hairy. And why not? It involves projecting a scene through two projectors, superimposed. Let me guess: with polarized glasses.
I saw such a system at the University of Texas Texas Museum of Natural History---a flythrough of a vertebrate skeleton. Which vertebrate? Don't want to spoil it for you.
...for learning and teaching remote sensing image analysis skills. Current lessons teach the application of remote sensing to oceanography and coastal management, but Bilko routines may be applied to the analysis of any image in an appropriate format, and include a wide range of standard image processing functions.
Wednesday, March 4, 2009
However, at one point, last friday, I had been working fairly hard on some files that I wanted to be synchronized at home, and I tried to push the changes to the USB stick. The write failed due to lack of permissions, so I sloppily did a "sudo chmod -R a+rw " and was able to recover. After I figured out the permissions might be at least part of the problem! It worked, but in the meantime, I, knowing-just-enough-to-be-dangerous, flailed at the keyboard (I recommend Keytronic), and managed, unknowingly, to mess the settings up in the /etc/group file: on Monday, I was unable to access the groups and users tool to try to solve my problem with permissions---on which I had researched all weekend.
This all to tell you that I was left on Monday with a machine that promised to be unrecoverable. At least by me. But, lo! and behold! On that machine was an unused partition---a Windows partition, and hence an unwanted one. An unneeded one, especially since I was now able to run windows in virtual box as needed. So I quickly installed Ubuntu Intrepid Ibex over lunch, and went back to it before I went home.
Chapter II. Why you need to run dpkg --get-selections
I ran dpkg --get-selections > selections-
This gives me a list of all the packages on my current system. Lucky my system was at least running! I tucked these away in a file on the current ~/ (home directory), and rebooted the newly made Intrepid Ibex install.
I have installed various GNU/Linuces, dozens of times. Ubuntu is now a favorite because it is painless, and good. It does almost everything. (I still want to get another Gentoo Box going, but the amount of work would be intensive.) My experience has taught me a few routine steps to take to get the machine into working order, MY WAY. It is taking less and less all the time.
This time, however, it went even faster. With my "selections-
What are my little tweaks? Here are a few
- Display some icons on the panel, and place two more panels on the left and right sides. These are made moveable, and expandable, and put at the top, extending down from the top panel, so extra icons can be spilled over onto them like ears. This has been a boon in real estate for icons.
- System->Preferences->Windows: set so mouseover raises windows, and to roll up on click of the title bar.
- Install emacs-snapshot and a bunch of it's friends.
- Firefox add-ons I have met: downthemall, video download helper, tableclipboard tool, zotero, recently flash got, multiple tab handler (allows duplicate tabs, etc), delicious (for the past two weeks, experimental.
- On the Firefox bookmark bar, in install a folder called "WLOG" (weblog) where I can pull the little icons from the left end of the location bar to make a bookmark. Just pull it over and drop it onto the WLOG folder. Very useful.
- Sometimes compiz configuration tool (forgot the name). The main thing I miss on Gnome is a way to move windows from workspace to workspace by dragging. Spinning cube is nice, but too much of a drag.
- Set up an array of "folders" (directories). I haven't figured this one out---perpetually seeking a simplified, hierarchical arrangement that isn't difficult to navigate.
- I establish too many at the level of ~/: Library (link to separate partition for PDFs); Downloads (where I direct all downloads---this is a candidate for modification, as I would prefer to sort things now rather than later), Work related main directory.
- I've been keeping old work around for longer than I am willing to remember. So many subdirs from projects of years ago are still hanging around---all of them meaning to be worked on sooner or later (maybe org mode can help with this). I have the following top level directory trees set aside for various kinds of these: Projects; WORKBENCH; STUDY.
- New idea: ~/SCRAPBOOK for all the stuff that hangs around the Desktop and ~/ directories that just stays around and I am unwilling to get rid of. Maybe ~/ATTIC is next.
- Another idea that hasn't found it's correct niche: ~/TOP_SHELF. I thought of this after I tried a little applet called top shelf, a place to store things short term, one means to get back to right away. One of the nice things about the new KDE is the window-like desktop. I have tried to implement something of this kind, with no borders, just a place that can display---or be temporarily out of the way. There seem to be two kinds of these top shelves: the top shelf that is too high to reach, with stuff one wants close around; and the back shelf just above the desk where a few cherished and often thought about and used items reside. Need to rename these.
- ~/MUSIC; ~/VIDEOS; ~/IMAGES (for teaching stuff); ~/PHOTOS.
- I also install several programs by hand, so I immediately install build_essential. The main programs I do by hand are XTide and Xephem. Each of them requires other libraries and tools, so I install them.
- Gscan2pdf is getting good. My scanner is problematical. When it is working, gscan2pdf is working too.
Chapter III. Permissions and Flash Drives
That's another story.
Saturday, January 17, 2009
This weekend I have had reason to get back in touch with an old friend---the program "guitare."
guitare had installed several years before on one of my GNU/Linux boxes as a command line program, and proved extremely interesting, with capabilities unmatched by any other program I have seen (especially the two in bold face below):
- name a chord when the fret numbers of all strings are input
- alter the tuning, and do the same in any arbitrary tuning
- serve as a chord chart
- do much the same for scales
Recently, I have been fiddling around with the most amazing guitar, a gift from my long lost cousin, Mike for my 60th Birthday: a Little Martin. What a tone, and with precision I have never known in dozens of guitars I have played in my lifetime. What an eye opener (ear opener)! I randomly retuned the strings the other week, in preparation for a restringing: I often do this as I usually do not like to work the strings too much, for fear of deadening them. (Although I now realize that not washing my hands must have an even more devastating effect).
On my new random tuning, that my friend Ken says is "drop D" tuning, I have improvised some chords and songs. I don't want to lose them, as I usually do, because the notebooks have a habit of getting lost or forgotten.
Guitare immediately came to mind. It's terrific to be able to tune the program to my unknown tuning, and explore the chords: guitare tells me the canonical name of each chord.
How amazing the exponential development of the Internet as a builder of capacity, as a library, as a source: I did a gmail search and found the old email of Pascal, and contacted him, asking is I could at least find a way to install guitare as a command line utility. Nothing else I have found even comes close! How bizaare is that? Many GUI guitar-oriented programs have appeared recently, in keeping with the movement towards a more user-friendly GNU/Linux desktop; but none of these programs even come close to Pascal's languising program.
I sent email to Pascal:
I'm not sure how to proceed, but what about a version with console only access?Within 24 hours of contacting Pascal about my inability to install his program on my new Ubuntu boxes, he emailed me that he has prepared a new version, v.8, now already available on the guitar web page, as source, GNU/Linux executables, and Windows XP executables, for both guitare and tkguitare. He calls this "Postcardware" and asked that, if I can get it working, to send a postcard.
That program is FANTASTIC. I play in all kinds of odd tunings, and using your program I can take my tablatures and find the chord names, adapted to my tuning. And I don't really need tcl or tk, maybe, for that. I don't know of anything else that comes close. (Sometimes the word "beautiful" doesn't refer to superficial appearances, but to a good heart: this program has a good heart!)
Installing them on a 32 bit laptop was immediately successful. I had to install the following packages: tcl tcl8.4 tcl-dev tcl8.4-dev tk tk8.4 tk-dev tk8.4-dev . To be sure, maybe I didn't need to install them all, but I had done so in trying to compile earlier.
Tkguitare worked flawlessly. As I wrote to Pascal:
You have won your postcard. But one little thing is still bugging me. The program tkguitare ran fantastically, and dazzled, on a 32 bit Ubuntu laptop--perfect for me, because it's easy to set up when I'm playing the guitar. However, on my 64 bit magnum box, also Intrepid Ibex, like the laptop, it complains with the following:teitoi@hardware:~$ tkguitareOne suspects that this is because I'm on a 64 bit box? I made double sure that all libraries (tk, tcl, tk-dev, tcl-dev) were installed. guitare, console mode, works fine. What a relief!
tkguitare: error while loading shared libraries: libtcl8.4.so.0: cannot open shared object file: No such file or directory
Still, I have to say, in this case you have proven that a thing that has a beautiful heart can also be beautiful in appearance. And that beauty adds a good deal of functionality and useability.
So I still had a problem on the 64 bit box. After sending Pascal an email asking whether he knows a fix, I continued to try several options: I tried to compile, but failed again; I looked all over the repos for 32 bit libraries for tcl. Finally, I found a message mentioning a program called "getlibs" that finds libraries for 32 bit binaries on a 64 bit Ubuntu system. Having nothing to lose, I installed it, after a google search. Here's a link to the Ubuntu Forums discussion:
Within 5 minutes tkguitare was working on my 64 bit box. WOW!!!!!!!!!!!!!!!!!
By the way, Tab-n-Fret is a package that long ago enabled me to link a graphical GUI of a fretboard (xfretboard) to emacs, and use it or a non-gui method to input tabulature in text mode in Emacs. Perhaps this will be my next project. For the nonce, however, another program, etktab, is available on the Ubuntu repos, and is built from the Tab-n-fret, and tabulature mode and xfretboard from that package.
Monday, January 12, 2009
Org-Mode is a wonderful outlining, notetaking, organizing utility for Emacs, the editor I use to do almost everything involving text of any nature.
Carsten Dominic has written a Relative Timer feature into Org-Mode. I use audio-visual materials quite alot in teaching, and I have often taken notes of videos or movies, to facilitate development of a lesson or a worksheet. The Org-Mode relative timer is a fantastic help, and Carsten has now made it better, integrating a facility to pause the timer.
I discovered an emacs lisp routine "dired-mplayer" at http://www.emacswiki.org/emacs/EMMS , and adapted it very crudely to start up vlc from emacs dired. It now starts vlc asynchronously, so emacs doesn't freeze up waiting for the video to finish, which leaves me free to take notes using Org-Mode and the Relative Timer feature. But pausing is what I needed, and Carsten's new feature makes that work.
I have incorporated a facility in dired-vlc that will simultaneously open a note buffer in org-mode in Emacs, and start the timer.
At this point, I use an org-remember template to open a buffer in a file of video notes. Then, insert a time stamp at t=0, and proceed.
I assigned the command to pause and restart to F11, so I can pretty easily pause the video and immediately afterwards pause the org-mode timer. Same for restart.
To make this more useful, I hope to incorporate code to pause the video and the timer simultaneously, wait for a note, and then restart both on command.
Here's the code for dired-vlc. It's more than just rough, but it works.
;; -*- mode: elisp -*-
;; Time-stamp: <2009-01-13>
;; AED 05 January 2009
(defvar dired-vlc-program "/usr/bin/vlc")
(defun dired-vlc (&optional timer)
"Asynchronously start vlc on file through dired. If an optional
argument is given (C-u), the org relative timer is started. This
function purports to start vlc in rc mode, to leave open the
possibility of remote control."
(let ((file (expand-file-name (dired-get-filename)))
ext files basename dir curr-file ;idx-file sub-file srt-file
(setq basename (file-name-nondirectory
(setq dir (file-name-directory file))
(setq files (directory-files dir t basename))
(delete file files)
(setq command (format "\"%s\" \"%s" dired-vlc-program "--intf rc"))
(if (y-or-n-p (format "Run command %s?" command))
; (shell-command command))))
(start-process "junk" nil dired-vlc-program file)))
(if (equal timer '(4)) (org-timer-start))
;; end dired-vlc.el
This is a first try. I am working on a graph of height of tide as a function of (x) clock time. This time, I have used the "Juxtapo...
Wherein I opine that OCR is ready for prime time on GNU/Linux. For some years I've been carrying around a manila file of a printout of ...
On the group comp.text.tex, is found a discussion of how to do a flip book included in a book . The winning post, in my opinion so far, i...