Active Topics

 


Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#1
Someone know how to update specific icon (.desktop file) on the homescreen.
For example my script change profile -> remove icon -> remove .desktop file -> copy new icon -> create new .desktop file with the same name.
In most cases after changing profile it not show me new icon and the name of the new profile from new .desktop file. It just show me the old name (previous profile) and empty icon
How I can cause to show me what I need without full refresh (lipstick) or reboot ?

I found this file: /usr/bin/xdg-desktop-icon
Inside this file it have some nice explanations like:
The xdg-desktop-icon program can be used to install an application launcher or
other file on the desktop of the current user.

An application launcher is represented by a *.desktop file. Desktop files are
defined by the freedesktop.org Desktop Entry Specification. The most important
aspects of *.desktop files are summarized below

install
Installs FILE to the desktop of the current user. FILE can be a *.desktop
file or any other type of file.
Already tried:
Code:
xdg-desktop-icon install /path/to/new(same_name).desktop
xdg-desktop-icon install [/path/to/new_icon.png
It don't do nothing...

Any advice ?

Thanks
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#2
delete desktop, call desktop-file-install, create desktop, call desktop-file-install is the only way.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#3
Hmmm but how I will "call desktop-file-install" if in this moment desktop file already deleted ?
Or your don't mean to this command "xdg-desktop-icon install" ? If not, what the exactly command your mean ?
Thanks

EDIT: you mean to this one: /usr/bin/desktop-file-install
I will try and report.

Last edited by Schturman; 2014-02-07 at 19:35.
 

The Following User Says Thank You to Schturman For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#4
 
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#5
If I create a desktop file that updates correctly the way you describe, and I put it into a folder in the app menu along with some other apps, when executed it'll update but reappear outside the folder. I was looking around for somewhere to define it's location to keep it inside the folder (something in the .desktop files or… wasn't there .folder or .directory files in Fremantle?) but I can't see anything. Any ideas?
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#6
Originally Posted by solbrit View Post
If I create a desktop file that updates correctly the way you describe, and I put it into a folder in the app menu along with some other apps, when executed it'll update but reappear outside the folder. I was looking around for somewhere to define it's location to keep it inside the folder (something in the .desktop files or… wasn't there .folder or .directory files in Fremantle?) but I can't see anything. Any ideas?
Yes, known problem.. Sometimes icon jump, sometimes not..
Check this two files:
Code:
/home/nemo/.config/lipstick/applications.menu
/home/nemo/.config/nemomobile/lipstick.conf
them have order of your apps. Maybe if you will copy them and restore after refreshing your icon, it will leave your icon in your place..
I didn't try it yet..
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#7
Originally Posted by Schturman View Post
Yes, known problem.. Sometimes icon jump, sometimes not..
Check this two files:
Code:
/home/nemo/.config/lipstick/applications.menu
/home/nemo/.config/nemomobile/lipstick.conf
them have order of your apps. Maybe if you will copy them and restore after refreshing your icon, it will leave your icon in your place..
I didn't try it yet..
In /home/nemo/.config/lipstick/applications.menu the folder name, position and contents show. I'll try recreating that entry when updating desktop file and see if that works. Thanks!
 
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#8
Nope, that didn't work…

Edit: After editing ~/.config/lipstick/applications.menu I tried restarting lipstick with 'systemctl-user restart lipstick.service' which gave a blank screen, blinking green LED and the app in the desired place, in that order, haha! Not a very smooth solution...

Last edited by solbrit; 2015-02-21 at 09:53.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#9
How you tried this ?
try:
1. copy both files
2. update icon like coderus wrote
3. restore both files.

Create simple script for this.
 
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#10
Originally Posted by Schturman View Post
How you tried this ?
try:
1. copy both files
2. update icon like coderus wrote
3. restore both files.

Create simple script for this.
Yes, but restoring the files has no effect unless I restart lipstick. Which has the aforementioned drawbacks (along with closing all open apps).
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:19.