Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reboot after install to get icons. #1

Closed
emiljoha opened this issue Jun 25, 2017 · 10 comments
Closed

Reboot after install to get icons. #1

emiljoha opened this issue Jun 25, 2017 · 10 comments
Labels

Comments

@emiljoha
Copy link
Contributor

Had to do a reboot after installation to get the Spotify icon to show up. Running Tumbleweed.

Would be nice to ether have a note of this in the instructions or a fix so that no reboot is needed.

Awesome work!

@paolorotolo
Copy link
Owner

Hey, thanks for the pull. I noticed we don't need a full reboot. If you're on GNOME, just press Alt+F2 and write r.

Also, there's a command to reload icon cache we could add the script: gtk-update-icon-cache. Since I'm unable to reproduce, can you test if the command fixes the issue without reboot?

Thanks.

@ghost
Copy link

ghost commented Jul 14, 2017

The bug has been resolved with the latest commit, or not?

Sent from my Huawei VNS-L31 using FastHub

@emiljoha
Copy link
Contributor Author

Sorry, missed the notification about the reply.

Commit? I'm on mobile but I can't see a commit referenced in the thread...

Will take a look tomorrow to see if I can reproduce it with old version and then test to see if this gtk-update-icon-cache solves the problem.

@paolorotolo
Copy link
Owner

Thanks, I'm not able to reproduce the issue, so I can't help.
@nat13ejo keep us updated.

@emiljoha
Copy link
Contributor Author

This is my results after some tinkering.

That command is already in the script here:

gtk-update-icon-cache

However the command by itself does not evidently solve the problem. I have to run:
"sudo gtk-update-icon-cache --force /usr/share/icons/hicolor"
to make it update the cache. As the cache file is only writable with root "sudo" is needed, and "--force" as it thinks that it already is up-to-date.

And finally the PATH:
"It expects to be given the PATH to a icon theme directory containing an index.theme, e.g. /usr/share/icons/hicolor, and writes a icon-theme.cache containing cached information about the icons in the directory tree below the given directory."

There are two problems with this the first being the most important, 1) The command needing elevated privileges with one should not give to random scripts on the internet, and 2) The icon directory path might not be the same on all relevant distributions.

@emiljoha
Copy link
Contributor Author

There is a way to get around these two problems by linking/copying the index.theme file from /use/share/icons/hicolor to the $HOME$.local equivalent where the icon is saved.

Not sure if this is a reasonable solution.

@emiljoha
Copy link
Contributor Author

Of course then run the gtk-update-icon cache with the .local path as argument.

@megamaced
Copy link

You should look into my code from Spotify-EasyRpm -noroot. Use xdg-desktop-menu as it does not require root

@megamaced
Copy link

And xdg-desktop-icon but i didnt need this

emiljoha added a commit to emiljoha/spotify-linux-installer that referenced this issue Jul 23, 2017
Don´t ask me how but if I create a symbolic link to the system
index.theme to the .local equvalent the icon appears directly after
runnign the script. No need for gtk-update-icon-cache.

Fixes issue paolorotolo#1
emiljoha added a commit to emiljoha/spotify-linux-installer that referenced this issue Jul 23, 2017
By copying the index.theme file to .local the icon shows as expected.

solves issue paolorotolo#1
@emiljoha
Copy link
Contributor Author

Thanks for the suggestion @megamaced. You are right that xdg-desktio-menu/-icon do not require root however the Spotify icon is still not shown after using them. Sometimes after using them it seemed like the shell restarted and the the icon was showed correctly but that was only occasional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants