HOME        PACKAGES        SCRIPTS

What to Try When Applications Fail

How powerless do you feel when you get these messages from your Zaurus?

Cut failed!    Delete failed!    ipkg  failed!     Backup failed!

Well, hey, you don't have to feel powerless about these messages at all...really! All it takes to find out why the application failed to do what you want it to do, is to start the application from the command line or terminal or console or whatever you call it. If you don't have a console or terminal yet, then read this and if you don't like your particular console, then check out the options I have listed here.

You don't have to know much Linux to start a GUI application from the console instead of from it's applet...all you usually have to do is type just one word, the name that application is referred to by your Zaurus. It's true that name might be a little different than the name that shows in the GUI menu or applications screen, but it will be pretty similar.

Here are a few examples of executable names for Sharp ROM 2.38:

GUI Name             System Name

File Manager..........filebrowser

Email.................qtmail

Terminal..............embeddedkonsole

Add/Remove Software...qinstall

If you are lucky, you can find the name by running "ipkg status" from the command line. Here is what the output looks like:

bash-2.05# ipkg status | more
Package: opera
Status: install ok installed
Root: /
Version: sl-5x00-7.30.9965

 
Package: tkcmail
Status: install ok installed
Root: /
Version: 2.1-050405

 
Package: qpe-filemanager
Status: install ok installed
Root: /
Version: 1.5.0-1

 
Package: processmanager
Status: install ok installed
Root: /
Version: 1.1

However, this is not always a reliable way to find the name of an executable. For example, my console has the package name "qpe-terminal", but the executable is called "embeddedkonsole".
 
However, you can use the Package name as shown in the output of "ipkg status" to hunt for the ipkg list and locations of files used by the application. Try the following:

find / -name your-package-name.list

As an example, tkcMail's Package name from ipkg status is "tkcmail." So, I can look for the listing as follows:

bash-2.05# find / -name tkcmail.list
/home/root/usr/lib/ipkg/info/tkcmail.list
bash-2.05#

I then examine the file with the "more" command:

bash-2.05# more /home/root/usr/lib/ipkg/info/tkcmail.list

The listing is too long to reproduce here. I decided the binary name is probably "tkcMail" and can test that by using either the "which" or the "type" command, as follows:

bash-2.05# type /opt/QtPalmtop/bin/tkcMail
/opt/QtPalmtop/bin/tkcMail is /opt/QtPalmtop/bin/tkcMail
bash-2.05# which tkcMail
/home/QtPalmtop/bin/tkcMail
bash-2.05#

The output of the "type" command, and of the "which" command, if I enter the name of a file that is not executable, is as follows. If you get anything like the following, you have not entered the name of an executable file:

bash-2.05# type tkcmail
bash: type: tkcmail: not found
bash-2.05#
bash-2.05# which tkcmail
bash-2.05#

Once you get the valid name of the executable file, you can enter it on the command line. What entering it's name on the command line enables you to do is see the *real* error messages from the system that result in the useless message that the application "Failed". Okay, so maybe you don't know what the command line error messages mean, but if you cut/paste them into a file, then you can google for what they mean or cut/paste them into a post asking for help at the forums!

I wrote about using the command line for installing software in my newbie console tutorial, so I'm mostly going to talk here about some experiences with my file manager.

I've often gotten "Cut failed!" or "Move failed!" messages from the file manager, and I generally just go into the console to do what I want instead.

But today when I got "Delete failed!", I decided to start the file manager from the console to find out why, and the results were quite puzzling.

Some of the errors were pretty standard ones that would occur even if nothing went wrong. For a newbie, seeing these messages at the startup of an application can be pretty scarey. They usually are non-fatal errors from cross-platform incompatibility, and often indicate that the same binary on a different installation might have more features than you have on your Zaurus. If the applications were omniscient, they would tell you what they really meant was missing, and some do in plain English.

Anyhow, here was what I saw:

QPixmap::convertFromImage: Cannot convert a null image
QObject::connect: No such slot FileBrowser::modifyFileMenu()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
QDir::readDirEntries: Cannot read the directory: /mnt/card/Documents/text/plain/dummy

But messages like the following clearly were due to the files I tried to delete:

Syntax error: Unterminated quoted string

Here's the name of one of them. Between the two occurrences of "Trolltech" in the following filename, my File Manager displayed a little box instead of whatever characters may be appearing between the words in your browser. The system obviously had a problem with the odd characters embedded in the file, which I had downloaded from the web:

/mnt/card/Documents/Trolltech — Trolltech.html

It refused to delete the file because it could not handle the filename! In that instance, using the command line is the only way to go! If you enter the beginning of the name of the file from your console, and enter a Tab after the first few characters in the filename, something called bash "Tab Expansion" will take over and complete the name in a way the system can recognize and act on. For my particular file, that resulted in the following:

bash-2.05# # ls /mnt/card/Documents/Trolltech\ \342\200\224\ Trolltech.html

I could use an asterisk as a wildcard instead of the code for the unrecognized characters, but I would not recommend that procedure unless you really know what you are doing, because wildcards used incorrectly with the "rm" command can wipe out entire directory contents!

So, if I want to remove the file, all I do is enter the following, using a "Tab" to help me along :

bash-2.05# # rm /mnt/card/Documents/Trolltech\ \342\200\224\ Trolltech.html

Another nifty feature of bash is you can scroll back up in the history and edit a previously entered command to use it again! Try it sometime if you're feeling adventuresome and want to cut down on typing.

Here's another example, having to do with making tar backups. If this tar example gets too technical for you, then skip to the bottom two paragraphs for some final simple suggestions.

I tried making my own tarfile backup of some directories. And I was surprised to get error messages due to filename length:

bash-2.05# cd /mnt/card;tar -cf /mnt/cf/Webstuff2-exceptcomp.tar --exclude Webstuff/computer Webstuff
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
bash-2.05#

I had a really frustrating time, plowing through every file in every subdirectory, trying to locate the culprits.

And, I FINALLY found them. Their basic filenames were short, but that 100 characters apparently includes the full path to the file as part of the filename:

Webstuff/purchases/www.gearwrench.com/ratcheting_screwdriver_nutdriver_system/geardriver/icon_stock.jpg
Webstuff/purchases/www.gearwrench.com/ratcheting_screwdriver_nutdriver_system/geardriver/icon_sets.jpg

Whew! the full path name clearly is included in that 100 character limit. With the following command line entry, I asked tar to list the tarfile contents, and used grep to just hunt for the names of the files I was looking for. Those two files are indeed missing:

bash-2.05# tar -tf /mnt/cf/Webstuff3-exceptcomp.tar |grep icon_s
bash-2.05#

I am wondering if long file names might explain some of the "Backup failed!" messages I occasionally have gotten from Sharp's Backup/Restore application. I haven't yet worked out a routine for getting the standard error output (stderr) from it, since it shuts down the console and restarts the system as part of the process. I suppose it might require running syslogd and sending the output to an expansion card.

But one thing is clear. If your File Manager is unable to move, delete, copy, or rename a file which has an extremely long filename, you might need to find another way to rename it to something shorter, and then try again to do what you want to do.

Also, a good preventative habit to get into is to always use or assign the shortest possible unique filenames to files, and to avoid including blanks, special characters such as / [ ] \ ! < > } | { &, and avoid using unusual characters that applications may not recognize.

sdjf

Contents Last Revised 18 Jul 2007