Tuesday, March 25, 2008

Up on Ubuntu; new e-books ...

Couple weeks ago now my main system failed -- power supply burned out and appears to have taken the motherboard with it. So I went back to my notebook, which had been in a mostly inoperable state since I attempted to install Ubuntu on it a month or two back, and dug into the wireless driver problems I was having. (These are, by the way, apparently not uncommon, reading the Ubuntu support forums -- if there's a single technical problem jacking up people's installations, it's probably the failure to reasonably support wireless. Mostly this appears to be because wireless vendors don't offer open source drivers, and Linux (or Ubuntu, anyway) won't by default even enable closed source drivers ... this is a dumb decision.) In any event, after I told the Restricted Driver Manager to enable the Broadcom firmware, I got internet access fairly quickly.

From there things have gone, if not smoothly, fairly quickly considering I've completely swapped out every application I was running. In short form --

MS Office > OpenOffice (a wash, except for some formatting issues)

IE/Firefox > Opera/Firefox (slight improvement)

Photoshop > Gimp (inferior, and I'm running an old copy of PS)

iTunes > Amarok/Banshee/Rhythmbox ... all 3 are working, I think I like Amarok best, but it's the slowest of the 3 by a good bit on Gnome.

ACDsee image viewer > gThumb (inferior), hope to find something comparable to ACDsee, but not holding my breath

Command Prompt > Terminal, bash (probably superior, but the learning curve has been a pain. And at a bare minimum, DOS commands appear simpler than bash -- del *.tmp /s is a damn pain to write in bash. It is nice to have grep, though.)

XXcopy > ... nothing. This is a critical utility I use for synchronizing file systems ... if there's anything like it on linux, I don't know what it is. rsync & unison may get me there, but so far they're baffling me -- the simple task of making /media/750B/w an exact copy of /media/750A/w appears to be beyond me. I've gotten rsync to copy existing files from /media/750A/w to /media/750B/w ... but I can't get it to delete the files that are on 750B that aren't on 750A. (Digression -- I've always been completely dyslexic about the damn slashes -- for 25+ years / and \ have been indistinguishable to me. No idea why, I'm not dyslexic otherwise, but there's something genuinely neurological there -- to this day, typing an http address or navigating a dos directory tree, it's even money I pick the wrong slash on the first pass. So Ubuntu's default / for filesystem navigation, instead of \, isn't a big deal; I still have a 50/50 shot at getting it right ... there's no other character or word I have this problem with.)

Forte Agent > ... no idea yet. I'm not a big newsreader guy these days, so this one can probably wait.

VLC, Mplayer, zplayer > VLC, Mplayer ... I miss zplayer, but VLC and Mplayer are hard to argue with. No meaningful dropoff here.

Programming -- no point in discussing this. SQL Server/VB, my principle working toolset, aren't available on Linux. I have installed MySQL, and I can find my way around PHP OK, but I doubt I'm changing careers from Windows to Linux in the immediate future. (That said -- MySQL is grown up. It reminds me of SQL Server 2000, and I don't mean that dismissively; SQL Server 2000 was a fine product.)

I don't often burn disks anymore (or rip them) -- so no big hurry to figure out how to do that on Linux.

A few things I really like, and so far there's nothing I hate.

- The repository is cool.

- Opera is a really great mix of IE and Firefox when it comes to scaling up text and graphics. IE on Windows doesn't scale Wikipedia correctly; Firefox doesn't scale ESPN correctly. It's 50/50 either of them will correctly size up a given site (a big deal, for me, my vision is truly rotten these days.) But Opera scales up most sites correctly -- don't know if this is a Linux thing or Opera -- probably Opera, I imagine it uses the same rendering engine on both platforms. But it's a nice thing to find -- if I could get Opera to render flash -- currently it won't -- I wouldn't need Firefox at all.

- I like the filesystem a lot. /media/DriveName/Directory makes a ton of sense and is far more sensible than Windows A-B-C-D-E stuff. I have about 14 USB drives, ranging from 40GB to 750GB, that have various versions of programs and data on them -- pretty much all my work was on external USB drives, so losing the desktop wasn't a huge pain.

- Thank God for the ntfs read-write driver. I haven't converted any of my disks, and they were all ntfs. It's been rock solid.

- Linux itself is pretty stable -- no worse than XP so far, though also no better. Occasional apps have locked up, but the OS hasn't gone into guru meditation so far.

- USB support is much better than XP. XP has consistent problems mounting drives that think they're both Drive G, for example -- Ubuntu doesn't have a Drive G, so no problem. I did have drives with exactly the same names -- 750A and 750B were named "D750" under Windows -- so I renamed them with ntfslabel, which was baffling until I realized I needed to reboot after using it -- but with a reboot, no problems.

All in all, it's gone much better than I hoped. I haven't tried Terminal Services yet, but assuming it works and lets me terminal into Windows boxes, I'm close to golden here.

... one thing I did have to do was port all the damn e-books again. I'm about half done. Some of the margins didn't come through correctly in OpenOffice(appears to be completely random) and all of the vertically positioned pages broke. OpenOffice doesn't have an equivalent to vertical centering of a document section, but it does have the ability to frame a block of text, and position the frame centered vertically -- a pain, but functional. Otherwise the docs appear to be OK.


eponymous said...

First, a caveat -- I no longer actively use Windows or Linux, except when I have to. That being said...

In bash a good substitute for del *.tmp /s is rm **/*.tmp (assuming I understand del *.tmp /s correctly.) That will remove *.tmp from any subdirectories of the current directory. It leaves any instances of *.tmp in the current directory untouched (not sure what del *.tmp /s would do in the current dir)

A possible replacement for iTunes that you may be happier with is Songbird (http://www.songbirdnest.com/). In development and I have not used it, though I know folks who love it.

I've never used ACDsee so I am not sure what the feature set is. On various Unix and Unix-like platforms I've used xv (http://www.trilon.com/xv/whatisxv.html) a lot but probably just because I was introduced to it in '91 and I am familiar with it. It's almost certainly not the latest and greatest thing out there. Additionally I know that Google has a "Linux version" of Picasa (http://picasa.google.com/linux/) but apparently it installs Wine or some subset of Wine and then runs a Windows version of Picasa. There is however an Ubuntu package for it (http://www.google.com/linuxrepositories/)

Well, hopefully some of that will help...


bitmuse said...

If you want rsync to delete the files in the destination, use the --delete flag. I usually use rsync -auv --delete-after for making backups.

For deleting all files matching a pattern in subdirectories, find . -name '*.tmp' -exec rm {} \; will do it. ** won't work in bash - that's a zsh feature.

eponymous said...
This comment has been removed by the author.
eponymous said...

Hrm. My previous post got munged. I stand corrected. I thought I had invoked a pure bash shell to test my previous suggestion. I failed miserably. I have since tested in a true bash shell and of course my command failed. What can I say, I'm a zsh junkie.

So, my suggestion is now...

Switch from bash to zsh (preferably permanently) and use rm **/*.tmp


Alternately, assuming zsh is installed and you don't want to switch...

rm **/*.tmp

Or alias the find command to something like rmtmps

alias rmtmps="find . -name '*.tmp' -exec rm {} \;"

That should work. Test. If it works you could add that line to your .bashrc so you don't have to alias it every time you invoke a shell.

I'm sure you could even write a bash function that would take a command line argument as opposed to the hardcoded *.tmp

Maybe something like this (WARNING! UNTESTED! I'm really rusty with bash)

function rmsubs
find . -name $@ -exec rm {} \;

If I've got that right you could put that in your .bashrc and then use...

rmsubs some string

...with the same functionality as del some string /s


Jon said...

For unison, try putting this into ~/.unison/moran.prf and then 'unison moran':

root = /media/750a/w
root = /media/750b/w
path = .
# Window height
height = 40
# Keep backup copies of changed files?
backups = false
# Synchronize gid & modification times
group = true
numericids = true
times = true

Anonymous said...

ahhh. unix. where you can do the same thing 37 different ways ... all of them "correct" ... and very likely end up in a flame war if you even hint at one of the 37 being superior to any of the others.

that being said ... vi > emacs. *puts on flame retardant suit*

Dan Moran said...


I've tried this:

rsync -auv --delete-after /media/750A/w /media/750B/w

... it leaves the entire contents of /media/750B/w/a ... a directory which doesn't even exist in the source.

T.J. said...

I've always used: rsync -av -D --delete for local exact copy transfers. Never used --delete-after, but after looking at the help it should still be getting the job done. And the -D just preserves devices and specials. Not sure why you'd be getting an errant directory that doesn't exist in the source. If you remove it and rsync again, does it re-appear? Are you running the latest (3.0) rsync?

As for your database choice...MySQL has matured quite a bit...but now that you're running on a real OS :), you might as well get a real RDBMS and try PostgreSQL ;)

For cds, k3b does the job pretty well, imo, though from time to time I still find myself running cdrecord from the command line.

You might also consider also getting VMWare, installing Windows XP as a virtual machine and keeping that handy for anything that doesn't have a linux equivalent. It does come in handy once in a while. There are open source equivalents for virtualization, but none that are as feature rich, fast and stable as VMWare.

By the way, I've never posted here, so let me just take this opportunity to say that I am waiting for AI Wars with bated breath =)

Subrata Sircar said...

rsync seems to expect (at least on Mac OS X) the second directory to be the parent of the thing you're trying to sync. In other words, I think that

rsync -avz --delete-after /media/750A/w /media/750B/

will end up such that, say, "diff -r /media/750A/w /media/750B/w" wouldn't return any differences.

I use -avz (archive, verbose, compress) to make "live backups" of my music/photo libraries; I like to be able to access them at home and work, so I sync the data from one system to another, use the second host, then sync it back.

outlawdrake said...

It's been too long since I've seen ACDsee, but I recall liking it as well. There are numerous image viewers for Linux, and every time I see a new one mentioned I try it out, but I've never found one that comes close to 'gqview' (entirely subjective assessment; it fits with the way my brain works, but I think it's similar to the way ACDsee works.)

Picasa isn't bad at all, and Google has a testing repository, making it easy to get the latest beta. (Note that while it's based on WINE and Mozilla / XULRunner, you don't have to install or configure anything else -- it's self-contained.)

You may want to check out 'quodlibet' as a replacement for iTunes. Not for everyone, but I like it a lot.

Also, if you've done any work in .NET, it appears that the Mono team is making great progress.

(Ahh, the "guru meditation"... I still miss my Amiga...)


J.D. Ray said...

I was going to suggest Mono as well, though I can't say I've ever gotten around to trying it out. I switched to MacOS at home (leaving two years of Linux behind) before I took the opportunity to try Mono, but reports are that it works well. I'm sneaking up on being a passable .NET programmer (C#), and look forward to being able to run code cross-platform.

I suggest selecting a shell-based text editor (vi and emacs are popular) and learning it well. I'm a vi user and haven't ever been able to get over the hump of figuring out emacs, mostly because the return on investment just doesn't seem to be there. Both exist on most Unix-ish systems, and whichever you choose will be available to you. I figure that if you're using your editor for basic shell support and you have an IDE elsewhere that you like (in a GUI environment), why bother becoming a guru? But learn one of them, because sooner or later you're going to have to edit a text file when you don't have a GUI available, and learning one of those editors "on the fly" is a pain (if you find yourself stuck in such a situation, see if Pico is available. It's rarely a default install, but it's uber-easy to use, if not very feature rich).

The VMWare suggestion is a good one. A basic running instance of Windows only takes up about 384KB of RAM on a system, and if you're not using it, hardly anything as far as processor goes. Remember the old days of TSRs on DOS? It's becoming something like that, except it's not terminated.

I was a Korn shell (ksh) programmer for a couple of years, and AFAIK, bash is better and zsh is better than that. I don't have enough experience with zsh to really know, but the "differences" charts you can find around make it fairly obvious. In any case, bash is a fine shell (so's ksh, for that matter).

In recent years, Windows has accepted the forward slash as a file system separator (c:/tmp/myfile.txt is valid), so you can just abandon the whole backslash thing in most cases.

There's a company, EnterpriseDB (IBM just invested in them) that puts a PL/SQL front end on PostgreSQL. It's supposed to be very, very compatible with Oracle apps. Of course, Oracle now owns MySQL, so it's hard to say what outcome that will have. If I'm not mistaken, sqsh (http://www.sqsh.org/) is an iSQL work-alike for Linux, which should get you hooked up to SQL Server. There's also tsql for the protocol stuff.

I don't remember who, but someone put a Photoshop look-alike front-end on GIMP, which may help you out. I could never get used to GIMP, but found its feature set to be fairly powerful once I dug around and found what I needed. Now that I'm on a Mac, though, I've reverted to PS.

Good luck with your Ubuntu experience. Let us know how it is going periodically.

Jose said...
This comment has been removed by the author.
Jose said...

@j.d. ray, Sun bought MySQL. Oracle did not buy MySQL, they bought InnoDB.

I use Kubuntu at work, and I'm pretty happy with it. I like Inkscape for vector graphics, which, once web-ready, I can give a polish in the GIMP. I'm more comfortable in the GIMP than I am in PS, but I've got an old version of PS.

Jeff Mott said...

I'm on the Flash Player team, and our Linux guy tells me that a more recent Opera (9.5) should be supporting the player. We switched over to XEmbed and it took Opera a little while to catch up. 9.5 is still technically pre release, but its available here if you want to give it a try: http://www.opera.com/download/index.dml?platform=linux&ver=9.50b

Dan Moran said...


what's the difference between kubuntu and just installing kde on ubuntu?

Jeff Mott,

Thanks, man. Much appreciated. I'm still having problems reading my Yahoo email in Opera, but everything else is working. :-)

Yeah -- Sun bought MySQL, not Oracle. I can't imagine why Oracle would purchase a free product that directly conflicts with their cash cow, except to kill it.


PostgreSQL's different from MySQL how?

I'm not emotional about databases (or almost anything else, when it comes to computers.) I fell into SQL Server; I might as easily have fallen into Oracle. MySQL has market share and people will pay for what I do on that platform; I've never been approached to work with PostgreSQL that I can recall.

J.D. Ray said...

To my knowledge, the net result is no difference between kubuntu and Ubuntu + KDE, except to say that when you add a package, you don't take away what was there. IIRC, Ubuntu uses Gnome as the desktop environment. Kubuntu wouldn't have any Gnome components on it, I suspect. If you add KDE to a base Ubuntu, you get both as options (sorry for belaboring a point).

cybercod said...

Welcome to Ubuntu, Dan!

I've been banging away at it since Dapper, and it was my first Linux OS, so I'm sure some of these guys can tell you a lot more about linux than I can.

Aside from that, I'd like to say that I tried vi and hated it. Ended up going with mined for my command line text editor. Much easier for me to work with, since it has menus. Its in the repos.

Also, I suggest you get finch... its the command line version of Pidgin. If you get hung up and can't get the graphical up and running, you can still communicate and get help, just be sure to set up access to the #ubuntu IRC channel beforehand in Pidgin, and it will show up in finch.

Someone mentioned K3B for burning media... I second that. Still looking for a good video dvd authoring program, though... I wish the K3B team would tackle the task.

Wouldn't rm -R *.tmp work for removing temp files recursively? I've not needed to do that, so I'm just asking. As for all the syncing discussion... is this somehow different from the cp (copy) command?

For music management, I use exaille... I never used Itunes so I can't tell you how close it is, but it does access Ipods (or it accesses mine anyway). Its got some good features like album cover and lyrics retrieval as well as automatically grabbing wikipedia articles about the currently playing artist.

I read that Gambas is a pretty good language that's designed to work like Visual Basic, with a few "improvements"... might wanna look a that. Don't have any personal experiences with it to share though.

Also, I would like to point you to the following page for if your machine ever DOES enter the "meditative state"

Read it before you need it.

When my machine gets frozen up, (which is very seldom) I use Alt+SysRq+(R,S,E,U,B)

R - puts keyboard into raw mode
S - syncs all filesystems
E - sends kill signal to all processes
U - remounts filesystems in read only
B - instantly reboots machine

So even completely hard-locked (to outside appearances) you can still safely restart your machine without doing any harm.

There are other buttons to use on that page, investigate at your leisure.

I hope you enjoy using Ubuntu as much as I have. So far I've installed it on 15 different machines for family and friends. All but two decided to stick with it.

If you need any help, give a hollar. I use the same name on the freenet IRC as I do in here.

cybercod said...

Oh, and Exaille has a ratings system.

T.J. said...

MySQL is dual licensed. For commercial purposes it's *supposed* to require the purchase of a license, though I do not know of them having actually pursued violators.

I personally tend to use MySQL when I have a small project and Postgres for my more complex ones. MySQL is particularly handy where ACID compliance is unnecessary as the MyISAM tables are very very fast. But for any of MySQL's other engines that are acid compliant Postgres is usually faster these days.

Most importantly, for me anyways, is the use of Postgres' procedural languages. I prefer perl, myself, and the PL/Perl handler is quite invaluable for quickly writing Postgres functions in perl. As far as I know there are quite a few handlers out there for most (if not all) of the popular scripting languages.

But in any case, if people are paying you to use MySQL then by all means use MySQL! :)

And how can you not get emotional about computers? I always thought it was normal to kiss my laptop goodnight...

Anonymous said...

After reading the responses here, I went looking for some of the apps named. having switched to Linux a while back these suggestions were of interest. After looking for a brief while I found this;


Some interesting things there.

Also, I have to second the suggestion for Quod Libet. It's the best of many music managers that I've tried out.

Dan Moran said...

It turns out my problems with rsync were mostly not terminating the directories with slashes --

rsync -av --delete-before /media/750A/w /media/750B/w

... does not do the same thing as:

rsync -av --delete-before /media/750A/w/ /media/750B/w/

rsync (or Linux on ntfs-3g, or some combination of all three) ... is much slower than xxcopy on XP, with very large filesystems. But it does work.

AcidRip does a perfectly good job of ripping DVDs, and supports X.264 -- very, very slowly, admittedly, but the quality is superb.

Anon, that equivalents page is cool -- I'd already run across it; it's where I found GQView, which is an acceptable ACDSee replacement -- not great, but tolerably quick. It doesn't do 1/10th of what ACDsee does, but since I rarely use those other features, no big problem.