DEV Community

Suhail
Suhail

Posted on • Edited on

Some useful Linux command-line launch arguments

Command-line line arguments can be added before you call a program in Linux. If you're calling the program from the terminal, you can add an alias like

alias [program]=[args] [program]
Enter fullscreen mode Exit fullscreen mode

If you're calling from an app launcher, you can modify the .desktop file. The file will probably be present at /usr/share/applications/. Copy it to ~/.local/share/applications/ so you can edit it without root.

Now, modify the Exec parameter to be

Exec=env [args] [program]
Enter fullscreen mode Exit fullscreen mode

Below are a few arguments that I use.

firejail --noprofile --net=none

Prevents the program from having internet access. Requires firejail to be installed.

QT_QPA_PLATFORMTHEME=gtk3

Use the GTK file picker instead of the one that came with the program. Useful if the file picker can't adapt to the color scheme resulting in incorrect symbolic icon colors.

QT_SCREEN_SCALE_FACTORS=""

Make the program scale properly if fractional scaling is used.

MOZ_USE_XINPUT2=1

Use kinetic scrolling and touchpad gestures in Firefox in Xorg. Last I checked, this did not work on Fedora though (issue was caused by an environment variable I couldn't figure out how to unset).

gamemoderun

Activates GameMode when you run a game (use it as a start/stop script if activing GameMode when starting the game does not work in your game launcher). Useful if you want to disable/enable the compositor when the game launches/closes, or something similar.

STEAMOS=1

Prevents Steam from showing a window asking to download non-essential dependencies (that are too new to be in the repos for older distros) when it launches every time.

I'll update this post if I find more useful commands!

Top comments (0)