I'm trying to figure out if it's possible to create a something.desktop
file in ~/.local/share/applications
that successfully executes the command chromium --user-data-dir=$(mktemp -d)
every time
The relevant line in the .desktop file is the Exec
entry in the following example:
$ cat ~/.local/share/applications/something.desktop
[Desktop Entry]
Name=chromecognito
Exec=chromium --user-data-dir\=\$\(mktemp -d\)
Icon=chromecognito
Type=Application
Categories=GTK;GNOME;Utility;
I've seen this question, which references this document and tried various combinations of escapes of $
, (
, )
, =
, "
, etc. in the Exec
line, as well as working with single quotes, but haven't been able to get it to use a new temp directory every time the program is started from the "start menu"
As a side note, using the line Exec=/home/myuser/bin/chromecognito
where /home/myuser/bin/chromecognito
looks like this:
$ cat /home/myuser/bin/chromecognito
#! /usr/bin/env bash
(chromium --user-data-dir=$(mktemp -d) &)
works, although I haven't even successfully been able to use a tilde like ~/bin/chromecognito
for the Exec entry in the .desktop file. Maybe that's is a good starting point.