Add Permanent Launch Arguments to .desktop files
As per the instructions on the ArchWiki, I want to launch Chromium with the --enable-native-gpu-memory-buffers launch argument to ensure maximum performance. I thought I could accomplish this by editing the .desktop file for chromium to include this argument, but it turns out that file is reset every time an update comes out for the program. Is there a way to permanently ensure that a program launches with a command line argument?
Edited 27 Mar 2018. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 9 · 100% up
- Kind
- Text
- ID
- 87ffk9
6 comments
For Chrome and Chromium specifically, there are these files:
You put your arguments in there, one per line.
Custom
.desktopfiles should be placed in the~/.local/share/applicationsdirectory which entries take precedence over system entries. See desktop entries in the wiki.There is no point. It might say hardware accelerated but if you scroll down it's still software. Hardware gpu buffers are not supported on linux , it should be removed from the wiki
This may or may not work depending on your desktop environment/application launcher. It relies on the fact that things in
/usr/localtypically shadow things in/usr.When chromium gets an update the file at
/usr/share/applicationswill be reset but the file at/usr/local/share/applicationswill not. You may have a problem if chromium.desktop actually gets changed during an upgrade (instead of just reset), since your customized desktop file may no longer work, but from what I've seen that's pretty rare.Better even use
$HOME/.local/share/applications, that's supposed on every desktop environment that follows the specs.If a file edit gets overwritten by updates, use a pacman hook to automatically edit the file for you every update.
Example: my pacman hook to change xfce4-appfinder's icon
https://github.com/kisaragi-hiu/dotfiles/blob/f28c5c1d08f5e2ba4043232ad2fc3818b15c83b8/%25arch/usr/share/libalpm/hooks/xfce4-appfinder-icon.hook