1

To run applications from , users click on icons on their desktops or they select the applications which they want to run from a menu.

I'm looking for a valid replacement pattern, to get the current user within a desktop file.

[Desktop Entry]
Name=FooCorp Painter Pro
Exec=/run/media/%%USER_NAME%%/foocorp-usb-stick/foocorp-painter-pro
Icon=foocorp-painter-pro
Type=Application
Categories=GTK;GNOME;Utility;
0

I guess, you can not add some ENV variable in Desktop file but you can achieve what you want by creating the same desktop file in every user's home directory.

Path is as:

~/.local/share/applications/

These desktop files are user-specific. You can even add desktop-directories too, if desired.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.