After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762789 - themes in ~/.local/share/themes are listed twice
themes in ~/.local/share/themes are listed twice
Status: RESOLVED FIXED
Product: gnome-tweak-tool
Classification: Applications
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-27 18:56 UTC by Heiko Adams
Modified: 2017-12-17 18:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Dedupe cursors (366 bytes, patch)
2017-12-17 14:56 UTC, Jan Tojnar
none Details | Review
Don't duplicate the cursor theme name (965 bytes, patch)
2017-12-17 17:45 UTC, Jan Tojnar
committed Details | Review

Description Heiko Adams 2016-02-27 18:56:10 UTC
Description of problem:
When installing a theme in ~/.local/share/themes these themes are listed twice in gnome-tweak-tool because ~/.themes is automaticly created as a symlink to ~/.local/share/themes

Version-Release number of selected component (if applicable):
$ rpm -q gnome-tweak-tool
gnome-tweak-tool-3.18.1-1.fc23.noarch

How reproducible:
allways

Steps to Reproduce:
1. Make sure ~/.themes does not exist
2. Install a theme in ~/.local/share/themes
3. Open gnome-tweak-tool and open the appearance view

Actual results:
Themes installed in ~/.local/share/themes are listed twice

Expected results:
All themes should be listed once

Additional info:
Comment 1 Matthias Clasen 2016-03-01 18:07:43 UTC
Who creates a symlink from ~/.themes ?
Comment 2 Heiko Adams 2016-03-01 20:48:00 UTC
I don't know. It seems to be created automaticly from the moment a theme is copied (or symlinked) into ~/.local/share/themes

But even if you create that symlink manually that has no effect on that issue. The theme is still listed twice.
Comment 3 Andrea Antolini 2017-11-03 06:43:46 UTC
...issue still exist also on gnome-tweak-tool 3.26.3 :  

btw for me there's no automatic creation of the  ~/.themes symlink (archlinux and gnome 3.26.2) 

but 

I need to created it manually otherwise all gtk2 apps don't found the gtk2 themes located in ~/.local/share/themes and that apps use the ugly default gtk2 theme

then if you have  the ~/.themes symlink to ~/.local/share/themes , themes are listed twice

obviously the issue happens if you have some gtk3/2 theme installed in your home : if you have only themes installed globally under /usr/share/themes the issue doesn't occur.

Andrea
Comment 4 Jeremy Bicha 2017-11-03 18:36:43 UTC
I'm pushing this fix to master and to the gnome-3-26 branch. This is too late for 3.26.3 but I may do a 3.26.4 later.

You can ask your distro to cherry-pick these fixes if you want them sooner.
Comment 5 Andrea Antolini 2017-11-04 12:10:48 UTC
...first of all many thanks to solve this  little but annoying issue 

then if a 3.26.4 release is planned ,  I'll wait for it, no problem! ;-)

Andrea
Comment 6 Andrea Antolini 2017-11-04 13:52:34 UTC
just for curiosity , I tried to compile by myself gtt from git 3.26 branch with your latest commit  and I noticed that the issue still exist  for gnome shell theme: they are listed twice

I was convinced that original issue was related only to gtk2/3 themes then I downgrade gtt to official 3.26.3 arch package n but also on that release gnome shell themes are listed twice.. so I wrong remember..

Thanks in advance if you will take a look also for this.

Andrea
Comment 7 Jeremy Bicha 2017-11-04 16:33:28 UTC
Thank you for following up. I have applied the fix to GNOME Shell themes now too.
Comment 8 Jan Tojnar 2017-12-17 08:42:58 UTC
Should not the same fix be also applied to cursor themes?
Comment 9 Jeremy Bicha 2017-12-17 14:44:11 UTC
(In reply to Jan Tojnar from comment #8)
> Should not the same fix be also applied to cursor themes?

Jan, do you want to submit a patch for that?
Comment 10 Jan Tojnar 2017-12-17 14:56:13 UTC
Created attachment 365637 [details] [review]
Dedupe cursors
Comment 11 Jeremy Bicha 2017-12-17 15:54:46 UTC
Jan, generally it's a better idea to open a new bug rather than commenting on an old closed bug.

Could you give me a test case for the cursor problem? I don't really use cursor themes from my home directory.
Comment 12 Jan Tojnar 2017-12-17 17:23:55 UTC
(In reply to Jeremy Bicha from comment #11)
> Could you give me a test case for the cursor problem? I don't really use
> cursor themes from my home directory.

You can try something like this (depending on where adwaita-icon-theme is installed).

    mkdir -p ~/.local/share/icons
    ln -s /usr/share/icons/Adwaita ~/.local/share/icons/
    ln -s ~/.local/share/icons ~/.icons
Comment 13 Jeremy Bicha 2017-12-17 17:36:05 UTC
Ok, I see now. I think my problem was that I needed to update my icon cache after copying the Adwaita icon theme to my home directory.

Could you submit your patch in git format? (so that it includes your name as Author and includes an appropriate commit message)
Comment 14 Jan Tojnar 2017-12-17 17:45:05 UTC
Created attachment 365648 [details] [review]
Don't duplicate the cursor theme name
Comment 15 Jeremy Bicha 2017-12-17 18:24:28 UTC
Comment on attachment 365648 [details] [review]
Don't duplicate the cursor theme name

Thank you. I have pushed this to master and the gnome-3-26 branch.