- Neon's Glow – The Blog of John DeArmond - https://www.johndearmond.com -

The Linux Chronicles – Day 4 and 5

Frustration Central

These have been two extremely frustrating days.  I’ve focused mostly on one thing – getting web editing software up and running so that I can edit my website.  Kind of a core functionality.  I’m dismayed and confused by the sorry state of web site management under Ubuntu.

Notice I said web site management and not just page editing.  A website is a collection of files that have to work together all the time.  Let one little link get off and a 404 error results.  A site management package like FrontPage handles that.  It maintains links and connections for all files.  If I decide to, for instance, rename a picture file to remove spaces in the name that cause Linux bellyaches, I simply change it.  FP takes care of tracking down all the links that use that file and patching up the links.

Alas, there appears to be nothing in the Linux world that does that.  Kompozer is the default web page editor for Ubuntu but it has no concept of a site or site architecture.  All it does is WizzyWig edit web pages.  It looks to be pretty competent at that but it is NOT a site manager.  I’m having a hard time imagining maintaining the tens of thousands of pages that constitute neon-john.com [1] without site management software.  I’ve spent some time in the past looking for a substitute to get away from microsh*t software but I haven’t found anything comparable.

Alas again, FrontPage doesn’t run under Wine.  Oh, it installs after much trickery and starts up but it won’t do anything and crashes more often than not.  I’ve spent most of today trying to get it NOT to crash.  For now, it’s a lost cause.  I’ll be going back to winders to do my site editing.  This might be what forces me to convert to a content management system.

Website Publisher

Website Publishe [2]r is a program that, though it is a windows program, is designed around the Unix philosophy of doing only one thing per program but doing it very well.  WSP does one thing.  It keeps a local copy of a website synchronized with the active version on the web server.  That is, it publishes to the web server any changed and new files that it finds.  It is lighting fast, probably 1000x faster than FrontPage’s upload function.  I’ve used it for years.

You’d think that such a simple program would run fine under Wine and it does.  Until it encounters that first file name with a space in it.  Something like “cute cat 01.jpg”.  The unix shell (which all sorts of other programs use to do underlying functions) treats a space as an argument delimiter.  What WSP would see in the example would be some garbage and then “01.jpg”.

In windows, something under the program apparently translates spaces into something that a Unix web host likes.  Under Wine it does not.  I’ve been careful about that but among the tens of thousands of files on my site, about 60 have spaced file names.  Arrrrrghhhhhh!

I’ve written the author of this program asking if there is anything he can do at the application level to address this problem but I haven’t heard back.  Meanwhile I have two choices. One is to change all the file names to get rid of the spaces.  That takes me back the above issue of a web site manager.  Without one I’ll not only have to manually rename the files but also manually track down every html page that  uses each file.  The other choice is to run winders and FrontPage whenever I decide to update my website.  As you can imagine, option 2 is the one that I’m going to regrettably choose.

IrfanView

Irfanview [3] is simply the best lightweight graphic file viewer and editor, bar none.  That it’s free makes it even better.  It is lightning fast, opens all sorts of files and does all the basic editing (color correction, adding circles, lines and text to photos) that I need about 99.9% of the time.

My first indication of trouble happened when the installer bombed on a missing DLL error.  Ooookay, let’s try another approach.  Let’s just copy the executable directory over from the winders disk.  That worked.  Problem is that it doesn’t show up under the Applications->wine->Programs listing because it wasn’t installed using the installer.  This one is solvable with enough research but fixing it will definitely be a guru problem, involving editing config files from the shell prompt.

What I really want is for the program to be associated with .jpgs, .gifs and other graphics files like it is under winders.  That is, I want it to start when I click on a jpg file.  That’s easy enough at first.  Just right click on a jpg in the file manager, select “properties”, select “open with” and add a new launcher.  Add the program name and hit close.

After I did that and clicked on a jpg file, Irfanview popped right up – with a blank screen.  After a lot of work I determined that Wine wasn’t passing the command line argument in a form that Irfanview can understand.

If cat.jpg is in my home directory, /home/jgd, then the path to the file would be /home/jjgd/cat.jpg.  That argument is passed to the application when one clicks on cat.jpg.  The problem is that windows uses backslashes “\” instead of the normal forward slash.  Thus that path should be \home\jgd\cat.jpg when it passes through Wine to a winders program.  Apparently that isn’t happening.

Interestingly enough, i can drag the same file to an open instance of Irfanview and it’ll display just fine.  That tells me that Wine is doing the slash/backslash translation, just not when it gets launched by a double click on the file.

I use this program enough that I am going to find a work-around.  Meanwhile I’m going to file a bug report at WineHQ [4].  Incidentally, if you’re going to be running many Wine applications, you should spent a LOT of time on this site.

Modem Connection

Using a modem or modem-like connection is necessary not only for dial-up victims like me but also many dsl and cable modems.  Many manufacturers set up the cable or DSL modem to work with windows DUN (dial-up networking).  If you have a router between your modem and computer then the login/password chat is hidden from you but it still happens.

Unfortunately, the dial-up manager in Gnome is broken.  It is located under System->Administration->networking.  Remember that I bitched about this being missing from the 8.10 Ubuntu distro.

As I mentioned before, I have to have two dial-up accounts to get enough “unlimited”(sic) hours so that my modem can be connected any time I’m at the console.  To spread the time out evenly, I settled on a scheme to dial into the first account on odd days and the second account on even days.  That is easy under winders.  Just set up two network connections.

It should be similar under Gnome but it isn’t.  Oh, the network manager allows setting up an arbitrary number of connections but it won’t change between them without a bunch of fiddling.  If I’ve been using “location” 1 and decide to go to location 2, all I should have to do is select the new Location, click on the green checkmark.  The system is supposed to hang up on the first one and dial the new one.  That’s what the help page says and is what is logical.  Problem is, it doesn’t work.

When I select the new “location”, the modem momentarily goes off hook and then hangs back up again.  Obviously two things are fighting with each other but I don’t know what.  Usually I can select back and forth between locations and the one that I want will eventually dial out.  Yesterday it wouldn’t.

I used a clunky command line method that I knew about to get online (a real guru moment) and researched.  I found that there are basically two other methods.  One uses what is known as pppconfig to set up the ppp (modem) connection and then uses pon and poff to start and stop the connection. (ppp means Point to Point Protocol and is what is spoken over the link regardless of how you connect.)  The second method involves a Gnome applet that isn’t present by default but it easily loaded using the Synaptics package manager.

See my log book below to determine the details of using pppconfig, pon and poff.  What I did was set the two connections up and then install a button on the Launcher panel for each.  I added a third button for poff to close the connection.  This works wonderfully.  One click on the appropriate button and the modem simply turns on.  A click on the third button and it turns off.  There’s only one problem.

My ISP gratuitously hangs up on me every 4 hours.  Winders DUN and the initial network program (that is broken) can be set to auto-redial.  This method can’t without some fancy shell scripting which is an uber-guru moment.  What I’ll have to do is write a script that watches pppd, the PPP daemon and when it goes away, waits a second and then fires it off again by re-invoking pon.

Gnome PPP

The other option is Gnome PPP.  it is available as an installable package under Synaptics package manger.  Just fire off the manager, click on “search”, enter “gnome ppp” and wait.  When it finds the package, simply click on the checkbox, click on the green checkmark and the package will download and install.

That done, it shows up under applications->Internet->gnome PPP.

It works great, reconnects after a hang-up and is reliable.  Only one problem.  It can’t store multiple configurations so if I want to use two different accounts, I’d have to type them in each day.  This problem will affect only a tiny fraction of users.  Most users will install their login name and password and forget about it.  This is definitely the non-guru way of doing DUN.  Since I need two accounts, I’ll use pon/poff most of the time and switch to Gnome PPP when I have a long download going that can’t afford a hangup termination.  At least until I write that script.  I’ll post the script here so that you can use it if you want to tinker in guru mode.  It’ll be the kind of script that can’t break anything so it’s safe to play with.

Sound “card”

Lightning took out the sound card in this laptop long ago so for a couple of years I’ve used a Soundblaster Autigy 2NX USB adapter.  During the initial install and subsequent reboots, Ubuntu did not find it.  Tonight I tried un- and re-plugging the USB cable and shazam! Ubuntu found it.  I’m not sitting here listening to Misty [5] as I type.  Except when it quits.  Googling around the net, I am learning that sound is the most poorly supported facility in Linux.  It’s not very robust in winders either so I can’t whine too much.  At least I know that at some time in the future it’ll be fixed in Linux.  Rots o Ruck with gatesware.

Palm Revisited

My true test of a software fix or change is, “Does it still work in the morning”.  I’m happy to say that my Palm HotSync connection is still working, with one exception.  If the HotSync fails, the Gnome daemon hangs.  I waited for over an hour today to see if it would time out.  It doesn’t.  It is necessary to kill and restart the daemon.  This is fairly easy to do.

Go to System->Administration->System Monitor.  This shows you all the processes that are running on the machine.  Look for “gpilotd”.  Right-click on it and select “kill process”.  The tray will ask a question about restarting the process.  Answer “yes”.  That’s all there is to it.

Postscript

That accounts for my last two days.  I have most of my core stuff up and running (or know that they won’t run) so I’m going to slack off a bit and use what I’ve installed.  I’ll continue working on moving applications over or finding Ubuntu/Gnome versions as replacements.  I won’t be posting every day but more than likely every other day.  If you have email notification (button on the bar above) or an RSS feed then you won’t miss any.

John

01/19/2009

10:00  Installed Website Publisher.  Can’t get it configured.  Going to windoze to export the setup.

——— Dial up networking ———

I finally acknowledged today that the dial up networking manager in Gnome is badly broken.  Therefore I decided to do it the oldfashioned way, via a command line.  There are three commands that deal with PPP

pppconfig
pon <isp>
poff

A couple of directories

/etc/ppp/peer   contains the connection info and is what pppconfig writes.
/etc/chatscripts  contains the chat script to use. It is pointed to by peer

The procedure is to run pppconfig to creat a configuration file in /etc/ppp/peer.  It’s a curses-based terminal program so just follow the prompts.  All the defaults are good except that basicisp uses login/password instead of PAP.  Once the script is created, to go online execute the following:

pon <config_file_name>

I used basicisp and basicisp1

to go offline

poff

Simple and reliable.  I don’t know yet whether it will automatically reconnect when da pricks hang up on me or not.  If not, I’ll write a script.

Some discussion of methods here:

http://www.ubuntugeek.com/setting-up-dial-up-connection-in-ubuntu.html
http://help.ubuntu.com/community/DialupModemHowto

An alternative is minicom.  Investigating that as we speak

Minicom is a terminal program.  I don’t see much use for going online with PPP

I put three buttons on the launcher panel, one for BISP 1, BISP2 and hang up. I did so by right clicking on the panel in a blank space and selecting “add to panel”.  Then “new application launcher”.  Fill in the blanks.

Website Publisher

I brought this app over from windows.  I use it to publish my website.  Best program for that purpose that I’ve found.

It installed and ran under WINE but it has a problem with dealing with spaced file names.  My site has about 120 files with spaces in the name.  My work-around is to publish with fire-ftp while I rename these files and update the web pages that call them.  Dropped the publisher a note.  Maybe he can address the problem.

01/20/2009

——– Preparing Wine for Front Page ———–

Go here and read

http://appdb.winehq.org/objectManager.php?sClass=version&iId=7208

Then here
http://ubuntuforums.org/showthread.php?t=695234

Then here.  Follow these instructions to add WineHQ to the repositories list.
http://www.winehq.org/download/deb

Finally
http://wiki.winehq.org/winetricks

Currently doing item 3 above.  apt puts a MAJOR load on the machine.  I’ve never seen it slower.

Installed WineTricks, then installed FP  FP runs but won’t do much without crashing.  Looks to be a problem with how Wine presents the file system.  I’m having trouble with Irfanview the same way.  Can’t accept files with / in the path and can’t find files with \ in the path.  Damn

17:00 – unpluged and repluged my SoundBlaster USB device and this time Ubuntu found it – I think.  I’m having to download codecs because the free software zealots would not put it in the distro.  Bastids.