Running dolphin from a shell script and opening it in a specific directory.

Duncan 1i5t5.duncan at
Thu Jun 2 07:26:06 BST 2011

John Woodhouse posted on Wed, 01 Jun 2011 15:43:47 -0700 as excerpted:

> Also be interested in any example type web pages on this subject and
> more info on the general aspects of scripting KDE. This script must run
> from the bash shell.

The other subthread already dealt with dbus, to the extent I know about 
it, anyway, so I've nothing to add there.

But here's a rather more basic hint.  As is traditional with Unix apps, 
most kde apps can be run with the --help parameter to get a basic 
(normally single-screen) dump of command line parameters and options.  In 
the case of kde apps, most of them have more detailed help on the general 
qt and kde options available with additional help options (as described in 
the basic --help output) as well, which can be useful for a newbie, but as 
I said, that's the general qt and kde options, so they're the same from app 
to app and once you're familiar with them on one app, you know about them 
for all of them.  The initial --help output is therefore what's most 
interesting for the specific app, as it lists the parameters specific to 
that app.

So run in a konsole, xterm, or even at a text VC outside X (the --help 
output is spit out to STDOUT without the app loading the X graphical 

dolphin --help

As that's STDOUT output, you can of course redirect it to a file for later 
reference, as desired.

To get the qt/kde/both extended help as well, use the appropriate option 
as mentioned by the help output:

dolphin --help-qt
dolphin --help-kde
dolphin --help-all

It doesn't mention it there, but for *.desktop entries, etc, "%s" is often 
used to capture options such as dolphin's url option.

> One aspect of that is how to stop the shell flashing up briefly?

If you call the script directly (must be executable and presumably has a 
sh/bash shebang line), it shouldn't flash the shell.  Or feed it to bash, 
instead.  If you feed it to konsole, then yeah, you'll get konsole popping 
up as it executes, but that's to be expected.  Just feed it to bash 
instead, or execute it directly, instead of feeding it to konsole/xterm/

Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list