You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, June 8th 2009, 1:10pm

KDE file association. Which parameters can be passed to the command?

Hallo:

I use kubuntu 8.04.

I can associate an extension to a program, so that program will open that file when I click it.
But the commad association accept many parameters:

Ex: For a .html extension I see:
firefox %u
kate --use %U

For .aac I see:
noatun %i %m -caption "%c" %U
gmplayer %F

What this variables mean?: %u, %i, %m %c, %U, %F

How can I know all the variables available?


Thanks.

Felipe

2

Wednesday, June 10th 2009, 10:11am

kde exec argument suffixes

From kdelibs/kio/DESKTOP_ENTRY_STANDARDS

4. List of valid Exec parameter variables - -----------------------------------------

Each "Exec" field may take a number of arguments which will be expanded by the file manager or program launcher and passed to the program if necessary. Recognized fields are as follows:

%f - a single file name, even if multiple files are selected. The system reading the Desktop Entry should recognize that the program in question cannot handle multiple file arguments, and it should should probably spawn and execute multiple copies of a program for each selected file if the program is not able to handle additional file arguments. If files are not on the local file system (i.e. HTTP or FTP locations), the files will be copied to the local file system and %f will be expanded to point at the temporary file. Used for programs that do not understand URL syntax.

%F - a list of files. Use for apps that can open several local files at once.

%u - a single URL.

%U - a list of URLs.

%d - the directory of the file to open.

%D - a list of directories

%n - a single filename (without path)

%N - a list of filenames (without path)

%i - the icon associated with the desktop entry

%m - the mini-icon associated with the desktop entry

%c - the comment associated with the desktop entry

%k - the name of the desktop file

%v - the name of the Device entry in the desktop file