I can't update portable app icon in app window panel

I tried the resolution of the topic below but it didn't work for me as it needs to be root or sudo to create or copy the file "xxxxx.desktop" to "/usr/share/applications".

what I tried was the following:

mkdir -p "$HOME/.local/share/applications/"
cp ./VSCode.desktop "$HOME/.local/share/applications/"
update-desktop-database "$HOME/.local/share/applications/"
printf "Tor Browser has been registered as a desktop app for this user in ~/.local/share/applications/\n"
rm -f "$HOME/.local/share/applications/VSCode.desktop"
update-desktop-database "$HOME/.local/share/applications/"
exit $?

As you can see I tried to create a folder in the current user's files, but zorin panel doesn't seem to load the portable application icon.
Is there any way around this in ZorinOS without needing root or sudo?

It's my first post, I hope this question is good for the community!

Edit reason: image editing and question update!

So when I said panel I refer to the panel where the open app indicator is and not the Zorin menu icons

the way in link in ur post is the correct answer, but u should fill the field of icon wtih vscode img png(download free pic from internet and put the path of it).(u can return to it and don't forget to put path image for icon field)
the steps were that: type ~/.local/share/applications in file manger pathbar, then create txt file and put the blow fields with ur filling contents and save the txt.desktop.

[Desktop Entry]
Name=VisualStudio Code
Comment=MS text editor for sourecode
Exec=/path/to/your/vscode/bin/code %U

or u can do it with gui ways : r-click on desktop and create launcher

click on no icon and select icon from image files and get path of ur image.
or u can go to menu editor to do that(u can get launcher in task menu for ur app)

in all u must get the correct path and correct command of ur app, and the most important in ur case is downloading image icon for vscode

1 Like

The path is relative because I will run it from different folders, from external mounted devices, removable storage for example.

How is my ".desktop" file:

#!/usr/bin/env ./Browser/execdesktop
[Desktop Entry]
Comment=VSCode is +1 for pdevelopment and −1 for mass coding
Exec=sh -c '"$(dirname "$*")"/BIN/start-vscode.sh || ([ ! -x "$(dirname "$*")"/BIN/start-vscode.sh ] && "$(dirname "$*")"/start-vscode.sh )' dummy %k

The image path is updated with a sh script dynamically dew according to the current path and it opens the VSCode.
I really don't know why it doesn't load icon

What happens (As a test) if you change the path to /usr/share/pixmaps/vscode_icon.png and copy the vscode_icon.png image file to that location - then launch VSCode? Does the icon properly show, then?

1 Like



After a while the image was loaded correctly, however it only loaded when I pointed the exact path to the VSCode executable, in the .desktop file that is at: "/home/utherbone/.local/share/applications/VSCode.desktop ".
No need to copy the file to "/usr/share/pixmaps" folder!

It continues without displaying.
I was wondering how the app indicator in the bottom panel loads the app image/icon, if it takes a folder that requires root or sudo won't work, it's to be used as a portable app run by ".dektop" by a user without access to the "sudo" or root user.

It would be very good for the icon to be loaded from some folder of the current user inside ".local" for example.

Thank you @eid ans @Aravisian

the lines with blue highlighter are the lines I created to solve the problem.