Is it possible to add sites links in qubes app shortcut?

Hi,
I have some qubes dedicated to specifique websites and i wonder if i can add websites shortcut in qubes app shortcut.
It juste make my qubes organisation more clear!

For example :
I create a AppVM called Social and i use this AppVM only for twitter facebook and instagram. How i can add this 3 sites to my Qubes app shortcut ? (I don’t now if it’s possible in the firste place).

Thanks!

What browser do you use?

I’ll show you how to do it with Firefox (run the following inside the AppVM):

# Define the variable for the directory
$ app_dir="/home/user/.local/share/applications"

# Create the directory
$ mkdir -p $app_dir

# Create the required file
$ cat << EOF >> $app_dir/qubes-os.desktop
[Desktop Entry]
Name=Firefox - Qubes OS Forum
Exec=/usr/bin/firefox https://forum.qubes-os.org
Terminal=False
Type=Application
Icon=firefox
EOF

Then in the Qube Manager, open the settings for the AppVM, open the Applications tab, click on Refresh applications and add the new shortcut, then click OK.

5 Likes

I use Firefor on Fedora.
Do you now where i can find the same for fedora ?

Thanks a lot !

Ok I made it more generic, it should work now.

Perfect !
I will use this thanks for your help !

No worries mate.

I think i miss something, i have a :
bash: /usr/local/share/applications//qubes-os.desktop: Permission denied

Do you now what a did wrong ?

You have a double forward slash: applications//qubes-os.desktop

1 Like

Sorry to bother you but now i have a :
bash: /usr/local/share/applications/qubes-os.desktop: Permission denied

No bother. Are you trying to edit the file as user? Type whoami to find out.

If you want to edit files in /usr you need to do that with sudo.

I try sudo with

  • mkdir -p $app_dir
    -cat << EOF >> $app_dir/qubes-os.desktop

But i have the same result.

Ok, that’s not gonna work then. I thought you had already created the file.

Before the cat command, run sudo -i then try again.

Once you’re done with the process, exit the elevated session with exit .

I an sorry to be that dumb but i can’t make it work…
This is what i do in my test vm :

[user@Test-Fedora-AppWeb ~]$ app_dir=’/usr/local/share/applications’
[user@Test-Fedora-AppWeb ~]$ sudo mkdir -p $app_dir
[user@Test-Fedora-AppWeb ~]$ sudo -i
[root@Test-Fedora-AppWeb ~]# cat << EOF >> $app_dir/qubes-os.desktop
[Desktop Entry]
Name=Firefox - Qubes OS Forum
Exec=/usr/bin/firefox https://forum.qubes-os.org
Terminal=False
Type=Application
Icon=firefox
EOF
[root@Test-Fedora-AppWeb ~]# exit
logout

the file never create it self

Don’t worry, don’t feel that way, it’s ok to not get things right the first time.

The problem is that you’re using an apostrophe () when declaring the app_dir variable, which ends up being taken literally when running the command, thus creating a directory named .

You may just want to remove those entirely so that you’re only left with:

app_dir=/usr/local/share/applications

Also, I should’ve thought about the following sooner: if you want to avoid having to open an eleveted instance with sudo -i, you can simply change the cat command a bit:

cat << EOF | sudo tee $app_dir/qubes-os.desktop
[Desktop Entry]
Name=Firefox - Qubes OS Forum
Exec=/usr/bin/firefox https://forum.qubes-os.org
Terminal=False
Type=Application
Icon=firefox
EOF
2 Likes

It finnaly work !

Thanks a lot for your time !

1 Like