Desktop Entry icon not appearing: how to diagnose?
#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


Messages In This Thread
RE: Desktop Entry icon not appearing: how to diagnose? - by C0ffeeFreak - 03-14-2021, 07:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  desktop and lockscreen biketool 1 440 10-04-2024, 04:17 AM
Last Post: vusra
  icon keyboard chris_02 3 1,635 02-09-2024, 08:53 AM
Last Post: 3x5co
  Has anyone got briar-desktop running on mobian? vusra 5 4,084 06-19-2023, 03:02 PM
Last Post: vusra
  Bogus default gateway keeps appearing Zebulon Walton 7 3,461 02-25-2023, 09:48 PM
Last Post: Zebulon Walton
  The settings icon disappeared kubussz 34 20,274 11-15-2022, 10:56 AM
Last Post: grump_fiddle_reinstall
  Sending Pinephone SMS from Desktop biketool 5 4,203 09-13-2022, 01:46 PM
Last Post: anonymous
  Telegram not as desktop app user641 0 1,072 08-05-2022, 08:45 AM
Last Post: user641
  Exclamation point in cellular icon after update Zebulon Walton 8 6,251 06-22-2022, 05:57 PM
Last Post: albafrati
  Anyone tried Signal Desktop ragreenburg 20 18,377 05-23-2022, 04:41 AM
Last Post: Anna
  lost settings icon from screen kubussz 3 3,320 02-17-2022, 09:26 AM
Last Post: beretta

Forum Jump:


Users browsing this thread: 1 Guest(s)