Linux versions of text applications (MEVO, RedMixer, Maezumo, etc)
typically include a shell script that changes to the application
directory then runs the application in a terminal to provide input and
output. This is necessary as some versions of Linux by default don't
set the working directory and run binary programs without a terminal,
making the application "invisible". I wish there was a standard form
for doing this,
but different GNU/Linux distributions include different terminal
programs making it somewhat complicated for a hobby programmer to share
simple applications that "just work". The xterm program is one of the
oldest I/O terminals, usually already present or easily installed and
very stable, so is typically the default terminal for the run scripts.
Almost all terminals are run using the syntax "termprogram -e
application" so normally if the run script needs adapting it's a matter
of just replacing xterm with the terminal you wish to use. At least
until I tried the KDE 4 version of konsole.
I use the KDE 3 version of konsole under Ubuntu 8.04, it works
great. How much longer I'll be able to use it is questionable, since
newer distributions have moved to KDE 4, and version 4 of konsole has
issues. The biggest issue is the developers changed the command line
options in a way
that breaks almost every script I have that uses konsole. Including
many of the
scripts on this web site. The new konsole now changes to the home
directory unless --workdir is specified (instead of staying in the
directory it was run from), and runs as a background
process unless --nofork is specified (breaking post processing such as
deleting temp files etc if present, normally the user puts & after
a command line to fork). It also has another problem that
makes it unsuitable for some applications - software flow control is
permanently enabled so anything using control-S won't work. This mainly
affects old minicomputer apps running under SimH but also affects some
modern programs.
Basically, the konsole options in my existing run scripts written
before 6/2010 won't work under KDE 4 as-is.
To fix the run script for KDE 4, change...
konsole -e [rest of the line]
...to...
konsole --workdir `dirname $0` --nofork -e [rest of the line]
I no longer have the KDE 4 version of konsole installed on my Ubuntu
9.04 system where I discovered this problem (I forced it to version 3
from the hardy repository as it's the only KDE app I use on that
system) so I can't test this theory. I hope that at
least some KDE 4 distributions got a clue and changed the command line
default so that it doesn't break terminal apps, so this might not apply
to all versions of KDE 4.
This really affects the MEVO run script, which attempts to
automatically detect the terminal. Other scripts require editing and
use xterm by default. I'm not sure yet what I'm going to do about
this... but I'm inclined to simply remove all support for konsole for
new things. If OS makers wish to break their OS's by making them
incompatible with common protocol, then that is their problem, not
mine.
If using KDE 4, use xterm instead of konsole, or edit the run script or
make a custom launcher as needed.
- Terry (6/27/2010)