#!/bin/bash # # kons — Work-around KDE 4 / Konsole asynchronous silliness # # Version 2009.01-blf (YYYY.MM-INITIALS). # Created by Brian Foster # Released under the GPL. # # KDE 4 / Konsole is asynchronous. That is, ‘konsole -e COMMAND’ exits # immediately instead of when the terminal session completes (as was # the case in KDE 3, and still is the case with other terminaks, such # as xterm(1)). Consequently, it's hard to determine when # completes, which is something that is often required (e.g., when # is an “external editor” for Kmail or similar). # # In theory, the ‘--nofork’ option prevents this, but that's unreliable, # often resulting in the opaque complaint (the ‘4763’ is the PID of some # process (not sure what process?)): # # (4763)/: KUniqueApplication: Can't setup D-Bus service. Probably already running. # # Hence this script, which attempts to run Konsole synchronously. # The usage is (intended to be) identical to Konsole. The script does # not exit until the exits. Furthermore, the exit status is # nominally that of . Hence, instead of: # # konsole -e COMMAND # # simply using (