0

I’m trying to change the Google Chrome shortcut/launcher on my Linux system, but I’m not sure which .desktop file I should edit or the correct way to customize the Exec line.

Specifically, I want to change how Chrome starts (for example, launching with certain flags or a specific profile), but I’m confused about whether I should edit the file in /usr/share/applications or copy it to ~/.local/share/applications first.

What’s the proper method for modifying the Chrome shortcut so it safely overrides the default launcher? And is there anything important I should know about permissions or how Chrome handles flags in .desktop files?

1
  • 1
    Can you share with us at least a summary of the research that you've done and things you've tried? Put that info into the question itself, using the EDIT button. Commented Nov 17 at 17:53

1 Answer 1

0

Important

Do not edit the file in /usr/share/applications directly. Those files are owned by root, and updates to Chrome will overwrite your changes.

Files in ~/.local/share/applications are owned by your user account, so you can edit them safely without root privileges.

Chrome accepts the same flags in .desktop files that you would normally use when launching it from the terminal.

Now here's how to do what you proposed, safely

Locate the system‑wide Chrome launcher The default .desktop file for Chrome is usually found in /usr/share/applications/google-chrome.desktop. This file defines how Chrome appears in menus and how it launches.

Copy it to your local applications directory Make a personal copy in ~/.local/share/applications/. This directory is designed for user‑specific overrides. By placing the file here, your changes will take precedence over the system version without requiring root access, and they won’t be overwritten by updates.

Edit the local copy

Open the copied file with a text editor (kali-linux has "Text Editor") and look for the line beginning with Exec=. This line controls how Chrome starts. You can add flags here to change its behavior:

--incognito This flag forces Chrome to always launch in incognito mode, meaning it won’t save browsing history, cookies, or site data between sessions. It’s useful if you want privacy by default.

--profile-directory=Default Chrome supports multiple profiles. This flag tells Chrome which profile to open when it starts. For example, Default is the main profile, but you could specify another like Profile 1 if you want Chrome to always open with a secondary account.

--disable-gpu This flag disables hardware acceleration. It’s helpful if you encounter graphical glitches or crashes caused by GPU drivers, ensuring Chrome relies only on software rendering.

These flags should be placed after the Chrome binary path but before %U. The %U placeholder is used by the desktop environment to pass a URL or file to Chrome when you open it from a link or file association.

Save and refresh

Once you’ve made your changes, save the file. Your desktop environment will usually pick up the new launcher automatically. If not, logging out and back in or refreshing the desktop database will ensure the changes take effect.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.