How do I change an application's command?

I want to change an application’s command. The way I’ve tried doing it is going to the application in the /usr/share/applications folder going to properties of the application I wanna change and editing the command but it keeps changing it to the original command is there any other way to do it/fix it?

I don’t think you properly understand how things work. First of all, /usr/share/applications is root-owned and is not meant to be writable to unprivileged user accounts. There’s a good reason for that. Anything you wish to customize should be customized within the confinements of your home directory.

Secondly, perhaps it would be better if you were to tell us what exactly your problem is and what you are trying to accomplish. Which command do you want to “change”, why do you want this, and what do you want to “change it into”?

1 Like

If you set up an “alias” it’s like a second name for that command, which you can use to refer to the “original” instead.
… that is not changing anything, but lets you use your own chosen name …

1 Like

So dolphin (KDE file manager) has a plugin to open a folder with root privileges and I want to add prime run to the application launch command so it opens on the Nvidia GPU instead of the Intel one.

Then it’s more about changing how to run it, rather than changing its name.
As @Nachlese suggested, you can create an alias for that. Otherwise you should be able to create or edit a Kickoff/panel launcher for it.

1 Like

You could create a file ~/.local/share/applications/primerun.desktop to run the command rather than trying to modify an existing command in system folder

1 Like

I know this is besides the question … but why?
That root function should really be avoided … heck it should be banished so no one uses it.
And why would you also need to run that on a dedicated GPU?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.