Always Launching Brave in Incognito Mode using Qubes OS?

I found this external guide to always use incognito mode when launching the Brave browser, but when I try following the instructions in Qubes OS, I can’t edit the “link target” field using the GUI. How can I do it in CLI instead?

How to Always Launch any Web Browser in Private Browsing/Incognito Mode - TechPP

1 Like

The relevant files are in /usr/share/applications. Sometimes the files have weird names, for example on my machine the firefox file is org.mozilla.firefox.desktop. Grepping for “brave” should help you find it. There should be a line that says Exec=command, you can add --incognito there.

$ cd /usr/share/applications
$ ls | grep brave
$ nano filename
2 Likes

on my machine it’s in cd /bin and there and the lines look like this

exec < /dev/null
exec > >(exec cat)
exec 2> >(exec cat >&2)

1 Like

Are you sure that’s the desktop file? There might be a shell script in /bin, but that’s more likely to get overwritten by an update. It’s generally a good practice not to modify files in /bin unless it’s absolutely necessary.

A desktop file should look have contents formatted like this (possibly without the copyright notice at the top):

# $XTermId: uxterm.desktop,v 1.16 2022/09/06 21:09:42 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
# Copyright 2006-2019,2022 by Thomas E. Dickey
# 
#                         All Rights Reserved
# 
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# 
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# 
# Except as contained in this notice, the name(s) of the above copyright
# holders shall not be used in advertising or otherwise to promote the
# sale, use or other dealings in this Software without prior written
# authorization.
# -----------------------------------------------------------------------------

[Desktop Entry]
Name=UXTerm
#GenericName=Terminal
Comment=xterm wrapper for Unicode environments
Exec=uxterm
Terminal=false
Type=Application
#Encoding=UTF-8
Icon=mini.xterm
Categories=System;TerminalEmulator;
Keywords=shell;prompt;command;commandline;cmd;
StartupWMClass=UXTerm
X-Desktop-File-Install-Version=0.26
1 Like

(technically it’s also a good practice not to modify any package-installed files including the desktop files, but it’s more common to violate that practice in my experience :upside_down_face:)

1 Like