0

I am creating web app shortcut from chrome to desktop by clicking on more tools > create shortcut.

But it has random name and no icon as clear in the screenshot

enter image description here

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=YouTube
Exec=/usr/bin/chromium-browser --profile-directory=Default --app-id=adnlfjpnmidfimlkaohpidplnoimahfh
Icon=chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default
StartupWMClass=crx_adnlfjpnmidfimlkaohpidplnoimahfh

The icon presists on :

sudo locate chrome-adnlfjpnmidfimlkaohpidplnoimahfh
/home/idea/.gnome/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.desktop
/home/idea/.local/share/Trash/files/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.2.desktop
/home/idea/.local/share/Trash/files/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.3.desktop
/home/idea/.local/share/Trash/files/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.4.desktop
/home/idea/.local/share/Trash/files/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.desktop
/home/idea/.local/share/Trash/info/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.2.desktop.trashinfo
/home/idea/.local/share/Trash/info/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.3.desktop.trashinfo
/home/idea/.local/share/Trash/info/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.4.desktop.trashinfo
/home/idea/.local/share/Trash/info/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.desktop.trashinfo
/home/idea/.local/share/applications/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.desktop
/home/idea/.local/share/icons/hicolor/128x128/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png
/home/idea/.local/share/icons/hicolor/16x16/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png
/home/idea/.local/share/icons/hicolor/256x256/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png
/home/idea/.local/share/icons/hicolor/32x32/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png
/home/idea/.local/share/icons/hicolor/48x48/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png
  • 1
    What do you get after clicking on "Trust and Launch"? – Kulfy Jan 13 '19 at 14:46
  • @Kulfy works fine, I just wanna get regular Icon and name – Suhayb Jan 13 '19 at 14:49
  • @Kulfy didn't help – Suhayb Jan 14 '19 at 10:48
  • Let's find out if there's an icon with this name and where is it. Run sudo locate chrome-adnlfjpnmidfimlkaohpidplnoimahfh – Kulfy Jan 15 '19 at 14:11
  • 1
    can you just copy paste the content in a new text file and name it as YouTube.desktop i.stack.imgur.com/DUZOk.gif – PRATAP Jan 21 '19 at 14:23
1

That is happening because your desktop icon is not able to find appropriate icon location.

Just replace your line in the file

Icon=chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default

with the location of icon, like:

Icon=/home/idea/.local/share/icons/hicolor/32x32/apps/chrome-adnlfjpnmidfimlkaohpidplnoimahfh-Default.png

Save the file, and Youtube icon as well as the name should come up once you double click on it and try launching it.

Signing out and signing in can help, in case the icon fails to load after launching it as well.

PS: In case the icon isn't displayed properly, please try other folders with dimension 48x48 or 128x128 instead of 32x32 in the above path as you can see in the result of your locate command.

| improve this answer | |
  • That's an intended mechanism. If you only declare the icon name, the system will look for the file in the appropriate folder, depending on the size that is needed. – danzel Jan 26 '19 at 17:24
  • ... If absolute path isn't defined, it automatically looks into hicolor folder which is default icon pack of Ubuntu 18.04 and 18.10. – Kulfy Jan 27 '19 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.