Desktop Entry icon not appearing: how to diagnose?
#1
Hi,

I am trying to get icons to appear in the launcher, but none are appearing given my desktop entry files in .local/share/applications.

Is there any way to diagnose what the problem is?  Any way to see some error messages or logs?
  Reply
#2
(09-13-2020, 10:30 PM)Saliency Wrote: Hi,

I am trying to get icons to appear in the launcher, but none are appearing given my desktop entry files in .local/share/applications.

Is there any way to diagnose what the problem is?  Any way to see some error messages or logs?
Hey guys,

Im having the same problem. If i create .desktop files in .local/share/applications they do not show up on the 'desktop.' Did u manage to resolve this @Saliency ? Anyone else have any suggestions as to what might be the cause of this. Thanks in advance.
  Reply
#3
Try looking at this example : https://source.puri.sm/Librem5/example-a...pplication. I've successfully installed the example program and an icon did appear. I guess it should be easy to execute the commands manually and show normal programs and icons.
  Reply
#4
(03-14-2021, 04:13 AM)zlmk43qK2 Wrote:
(09-13-2020, 10:30 PM)Saliency Wrote: Hi,

I am trying to get icons to appear in the launcher, but none are appearing given my desktop entry files in .local/share/applications.

Is there any way to diagnose what the problem is?  Any way to see some error messages or logs?
Hey guys,

Im having the same problem. If i create .desktop files in .local/share/applications they do not show up on the 'desktop.' Did u manage to resolve this @Saliency ? Anyone else have any suggestions as to what might be the cause of this. Thanks in advance.
How are you creating your .desktop file? It really has to be done in the terminal in root using something like Vim and you should be in the directory /usr/share/applications when you create it. Many new people to linux don't understand how to use the terminal and how it's commands work, they try to use notes or text editor GUI to create a .desktop file and copy and past it into the directory /usr/share/applications/ via the CP command in the terminal but all that does is create a shortcut to the original file. Do you understand the commands for Vim? I will try to explain it if you don't. Past your .desktop file entry into the thread here and I will see if everything is there. Forgive me if I am a little slow to respond I am spending my day with family.
  Reply
#5
I know how to work with the CLI. I know how to use vim. I just copied the .desktop contents from this post: http://forum.pine64.org/showthread.php?tid=13383.

Initially i tried putting the .desktop file in ~/.local/share/applications, to no avail. Then i tried putting it in /usr/share/applications with the same result.
Initially, I made the .desktop file executable with
Code:
sudo chmod +x ~/.local/share/applications/themeswitcher.desktop
as instructed in the post, but after taking a closer look at all the other .desktop files in /usr/share/applications, i noticed none of them were executable, so i ran
Code:
sudo chmod 644 dark-light.desktop

to reverse the previous command. Unfortunately, this didn't make a difference either.

here is are the ownership, permissions, location and content.
Code:
mobian@mobian:/usr/share/applications$ la -l | grep dark
-rw-r--r-- 1 root root   270 Mar 14 11:15 dark-light.desktop
mobian@mobian:/usr/share/applications$ cat dark-light.desktop
[Desktop Entry]
Actions=Light;Dark;
Type=Application
Name=Day-Night
GenericName=Theme Switch
Comment=Theme Switch
Icon=contrast
TryExec=gsettings
Exec=notify-send ThemeSwitcher "Long Press for Theme Color Options"
Terminal=false
Categories=Settings;Theme;Colors;Session
  Reply
#6
(03-14-2021, 03:02 PM)zlmk43qK2 Wrote: I know how to work with the CLI. I know how to use vim. I just copied the .desktop contents from this post: http://forum.pine64.org/showthread.php?tid=13383.

Initially i tried putting the .desktop file in ~/.local/share/applications, to no avail. Then i tried putting it in /usr/share/applications with the same result.
Initially, I made the .desktop file executable with
Code:
sudo chmod +x ~/.local/share/applications/themeswitcher.desktop
as instructed in the post, but after taking a closer look at all the other .desktop files in /usr/share/applications, i noticed none of them were executable, so i ran
Code:
sudo chmod 644 dark-light.desktop

to reverse the previous command. Unfortunately, this didn't make a difference either.

here is are the ownership, permissions, location and content.
Code:
mobian@mobian:/usr/share/applications$ la -l | grep dark
-rw-r--r-- 1 root root   270 Mar 14 11:15 dark-light.desktop
mobian@mobian:/usr/share/applications$ cat dark-light.desktop
[Desktop Entry]
Actions=Light;Dark;
Type=Application
Name=Day-Night
GenericName=Theme Switch
Comment=Theme Switch
Icon=contrast
TryExec=gsettings
Exec=notify-send ThemeSwitcher "Long Press for Theme Color Options"
Terminal=false
Categories=Settings;Theme;Colors;Session


There is too much information in there. It needs to start with [Desktop Entry] to create the symbolic link. Also looking at your code I see no reference as to the GTK gnome themes you are going to switch between. It has to be two of the ones installed like in the code provided. There is about 5 themes in on my device but I don't remember the directory.

I would just do it with Vim. I will walk you through it.

Open Terminal


$ cd /usr/share/applications/                     to navigate to the directory


$ ls                            to see the contents to make sure you are in the right place


# sudo vi themeswitcher.desktop       (Or the name you named your program)   It will create your .desktop file.


Type :i           It will put the file in insert mode (you will see insert at the bottom)

Copy and paste or enter this. You can edit the themes to the ones you are using if it's nit the ones in here in the file but they have to be themes installed.

Code:
[Desktop Entry]

Actions=Light;Dark;

Type=Application

Name=Day-Night

GenericName=Theme Switch

Comment=Theme Switch

Icon=contrast

TryExec=gsettings

Exec=notify-send ThemeSwitcher "Long Press for Theme Color Options"

Terminal=false

Categories=Settings;Theme;Colors;Session

MimeType=

Keywords=Theme,Colors



[Desktop Action Light]

Exec=gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'

Name=Daytime



[Desktop Action Dark]

Exec=gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'

Name=Nighttime

Check everything over really well. Hit the Esc will get you out of the insert mode.

Type :wq this will save and close the file to the directory

If you need to edit the themeswitcher.desktop file to change your themes, navigate back to the directory

# sudo vi themeswitcher.desktop               will open it in root

:i --> To edit.
Esc --> to stop insert.
:w --> To save file.
:q --> To exit file.
:wq --> To save and quit file.
:q! --> To exit file without saving .


If I helped you hit with a +1 in the ratings please? It makes up for the lousy pay they pay me here. Big Grin
  Reply
#7
(03-14-2021, 03:02 PM)zlmk43qK2 Wrote: here is are the ownership, permissions, location and content.
Code:
mobian@mobian:/usr/share/applications$ la -l | grep dark
-rw-r--r-- 1 root root   270 Mar 14 11:15 dark-light.desktop
mobian@mobian:/usr/share/applications$ cat dark-light.desktop
[Desktop Entry]
Actions=Light;Dark;
Type=Application
Name=Day-Night
GenericName=Theme Switch
Comment=Theme Switch
Icon=contrast
TryExec=gsettings
Exec=notify-send ThemeSwitcher "Long Press for Theme Color Options"
Terminal=false
Categories=Settings;Theme;Colors;Session
Seems like you just didn't notice that the code window in the thread you copied the code from is scrollable and there is more code below. I also didn't notice it when I first looked at it because the scroll bar only appeared when I tried to scroll.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Remote desktop, video playback issues Zebulon Walton 13 1,292 06-17-2021, 06:57 AM
Last Post: aus
  How to switch off a app icon from list pinephone 6 534 05-14-2021, 02:38 AM
Last Post: pajux
  Synchronizing: How do you sync / synchronize Calendar and Contacts with your desktop? Anna 12 1,354 04-22-2021, 02:42 AM
Last Post: Anna
  File transfer from Linux Desktop and PinePhone livanti21 18 12,217 03-09-2021, 08:15 PM
Last Post: MtnSk8
  lost settings icon from screen bobblestiltskin 2 794 11-19-2020, 01:07 PM
Last Post: bobblestiltskin
  Mobian other Desktop Environments rico 39 17,708 11-12-2020, 08:34 PM
Last Post: Lousy Fisherman
  Telegram Desktop background canaac 0 619 10-01-2020, 04:15 PM
Last Post: canaac
  Plasma-Desktop on Mobian Boern 27 11,213 06-28-2020, 01:09 AM
Last Post: devrtz
  Remoting into Desktop Using PinePhone? SwankyBarbecue4 2 2,085 05-16-2020, 01:25 PM
Last Post: SwankyBarbecue4

Forum Jump:


Users browsing this thread: 3 Guest(s)