Skip to content

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.

9 points6 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
9 · 100% up
Kind
Text
ID
87ffk9

Author

16
posts
20
comments
8
media
View profile

6 comments

For Chrome and Chromium specifically, there are these files:

~/.config/chrome-flags.conf
~/.config/chromium-flags.conf

You put your arguments in there, one per line.

12 points

Custom .desktop files should be placed in the ~/.local/share/applications directory which entries take precedence over system entries. See desktop entries in the wiki.

12 points

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

1 points
cp /usr/share/applications/chromium.desktop /usr/local/share/applications
# edit /usr/local/share/applications/chromium.desktop to have your launch args

This may or may not work depending on your desktop environment/application launcher. It relies on the fact that things in /usr/local typically shadow things in /usr.

When chromium gets an update the file at /usr/share/applications will be reset but the file at /usr/local/share/applications will 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.

-1 points

Better even use $HOME/.local/share/applications, that's supposed on every desktop environment that follows the specs.

11 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.