Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543488 - x11-themes/adwaita-icon-theme: create default symlink only if none if present
Summary: x11-themes/adwaita-icon-theme: create default symlink only if none if present
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugs.archlinux.org/task/26362
Whiteboard:
Keywords:
: 543902 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-16 09:31 UTC by Erik Quaeghebeur
Modified: 2015-04-26 09:28 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Quaeghebeur 2015-03-16 09:31:55 UTC
I'm running a mostly stable KDE system. Yesterdays update of gtk+ seems to have pulled in adwaita-icon-theme-3.14.1. That in itself is Ok. However, *unasked* that theme (which I do not like, but that is not essential) makes itself the default!

It should not do that.

[How do I get my previous theme back?]

Reproducible: Always
Comment 1 Gilles Dartiguelongue gentoo-dev 2015-03-16 12:01:47 UTC
As written in the ChangeLog, gtk+ upstream intends this theme to always be available for proper rendering by default. It will not be removed from the ebuild.
Comment 2 BT 2015-03-16 14:11:44 UTC
(In reply to Gilles Dartiguelongue from comment #1)
> As written in the ChangeLog, gtk+ upstream intends this theme to always be
> available for proper rendering by default. It will not be removed from the
> ebuild.

The issue isn't about removal from the ebuild, it's that x11-themes/adwaita-icon-theme makes itself the default cursor theme.

src_install() {
	gnome2_src_install

	# Make it the default cursor theme
	dosym Adwaita /usr/share/cursors/xorg-x11/default
}

I have written a post[1] on the Gentoo forum about the issue this causes.

[1] https://forums.gentoo.org/viewtopic-p-7717008.html#7717008
Comment 3 Fab 2015-03-16 18:33:27 UTC
(In reply to Gilles Dartiguelongue from comment #1)
> As written in the ChangeLog, gtk+ upstream intends this theme to always be
> available for proper rendering by default. It will not be removed from the
> ebuild.

Symlinks are bad :

> $ ls -l /usr/share/cursors/xorg-x11
> total 24
> drwxr-xr-x 3 root root 4096 Mar 16 08:46 Adwaita
> drwxr-xr-x 3 root root 4096 Feb  1  2013 Vanilla-DMZ
> drwxr-xr-x 2 root root 4096 Apr  6  2013 default
> lrwxrwxrwx 1 root root    7 Jun 22  2014 default.backup.0000 -> Adwaita
> lrwxrwxrwx 1 root root    7 Jul 25  2014 default.backup.0001 -> Adwaita
> lrwxrwxrwx 1 root root    7 Mar 16 08:46 default.backup.0002 -> Adwaita
> drwxr-xr-x 3 root root 4096 Jul  3  2012 handhelds
> drwxr-xr-x 3 root root 4096 Jul  3  2012 redglass
> drwxr-xr-x 3 root root 4096 Jul  3  2012 whiteglass

Ghost symlinks are not tracked by emerge.

Please give the user a tool to manage X cursors theme (bug #464826), and inform him that gtk+ upstream wants Adwaita theme.
Comment 4 Pacho Ramos gentoo-dev 2015-03-16 21:20:24 UTC
Maybe the logic could be changed to only create the symlink if none is existing, that would allow people to change it to their preferred default value
Comment 5 Gilles Dartiguelongue gentoo-dev 2015-03-16 22:01:53 UTC
Since the symlink is managed through portage functions, it is properly tracked. I don't see the ghostery things you are talking about.

About creating the symlink in the first place, we need to check if it needs to be there at all. Removing it without a functional replacement is not acceptable and may require some time to get through.
Comment 6 Fab 2015-03-17 07:30:48 UTC
(In reply to Gilles Dartiguelongue from comment #5)
> Since the symlink is managed through portage functions, it is properly
> tracked. I don't see the ghostery things you are talking about.
> 

> # qfile /usr/share/cursors/xorg-x11/default.backup.000*
> #

> # emerge -C x11-themes/adwaita-icon-theme
> # ls -l /usr/share/cursors/xorg-x11
> total 20
> drwxr-xr-x 3 root root 4096 Feb  1  2013 Vanilla-DMZ
> drwxr-xr-x 2 root root 4096 Apr  6  2013 default
> lrwxrwxrwx 1 root root    7 Jun 22  2014 default.backup.0000 -> Adwaita
> lrwxrwxrwx 1 root root    7 Jul 25  2014 default.backup.0001 -> Adwaita
> lrwxrwxrwx 1 root root    7 Mar 16 08:46 default.backup.0002 -> Adwaita
> drwxr-xr-x 3 root root 4096 Jul  3  2012 handhelds
> drwxr-xr-x 3 root root 4096 Jul  3  2012 redglass
> drwxr-xr-x 3 root root 4096 Jul  3  2012 whiteglass

Aren't they ghost symlinks ?
Comment 7 Erik Quaeghebeur 2015-03-17 08:52:09 UTC
(In reply to Gilles Dartiguelongue from comment #5)
> About creating the symlink in the first place, we need to check if it needs
> to be there at all. Removing it without a functional replacement is not
> acceptable and may require some time to get through.

I understand that this may be needed for a Gnome desktop. However, this ebuild replaced the icon theme I was using, which I prefer. Please at least inform me of how to work around the fallout created by the mistaken underlying assumption that anyone installing this ebuild uses a Gnome desktop. (FWIW, I'm using KDE and just used its default icons, but I only see the Adwaita theme.)

[Please mark the bug as confirmed, as it has been.]
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-03-17 14:57:42 UTC
If I remember correctly, the problem was that something in gnome was failing when the /usr/share/cursors/xorg-x11/default symlink did not exist. The symlink didn't have to point to Adwaita; it had to point to a valid cursor theme.

The right way to solve this is by creating an eselect module to manage the symlink.
Comment 9 Jérôme Borme 2015-03-18 10:51:27 UTC
I use fluxbox and the default icon set that came with X. The adwaita theme now takes over cursor drawing when *certain* window elements have focus, while the default X theme is used when the cursor is on the root window. This is distracting and annoying.
Comment 10 Erik Quaeghebeur 2015-03-18 11:04:12 UTC
(In reply to Pacho Ramos from comment #4)
> Maybe the logic could be changed to only create the symlink if none is
> existing, that would allow people to change it to their preferred default
> value

I see that you changed the bug title to something different than I reported.

I have:

# ls -l /usr/share/cursors/xorg-x11/
totaal 4
drwxr-xr-x 3 root root 4096 15 mrt 16:17 Adwaita
lrwxrwxrwx 1 root root    7 15 mrt 16:16 default -> Adwaita

I assume there was nothing in this directory before the gtk+ update messed things up, or it did not exist before. So please check with the KDE devs how KDE handles cursors when this is the case.

My bug report was not about some symlink, but the effect of an update. It may be that this symlink should not be created at all and a Gnome-specific workaround must be implemented. Gnome requiring a certain behavior is not sufficient to impose that behavior if it negatively impacts non-Gnome users.

[Please mark the bug as confirmed, as it has been.]
Comment 11 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-03-18 23:59:27 UTC
(In reply to Erik Quaeghebeur from comment #10)
> I see that you changed the bug title to something different than I reported.

Then write a clearer report. "Makes itself the default" - what does that mean? Are you talking about the mouse cursor theme like we all assume? Or some other problem (in which case please open a new bug report, this one has been taken over by cursor theme discussion)?
Comment 12 Erik Quaeghebeur 2015-03-19 09:15:15 UTC
(In reply to Alexandre Rostovtsev from comment #11)
> Then write a clearer report.

I am sorry, but my report can only be as clear as my understanding of the causes. My description was as clear as possible in that regard. Moreover, it points to the important effects of a  later identified underlying change, on which the title now focuses. Given that the interaction with KDE's cursor management has not been investigated, it may well be that the current title is too narrow in scope.

> "Makes itself the default" - what does that
> mean? Are you talking about the mouse cursor theme like we all assume?

Yes, I am talking about the cursor theme. With “Makes itself the default” I mean that I was using some theme before (KDE default, I guess) and after the update, it got replaced by Adwaita, without me choosing it. And now the only theme I can choose in KDE's settings is Adwaita. So effectively, it made itself the default.

I am happy to help test things out, given clear instructions.

From Comment 9, it is clear this affects not only KDE, but also other non-Gnome systems. The common theme is that Adwaita has been imposed unasked. Whether that is due to a symlink somewhere or there are other aspects is a technical matter not yet entirely clarified. That is why I commented on the title modification. If indeed it is about the symlink only, then please provide a workaround for the people affected based on that and your knowledge of the context.
Comment 13 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-03-19 13:45:35 UTC
OK, the proposed solution is an eselect module to manage the symlink. The module would let you choose a default cursor theme (adwaita, vanilla-dmz etc.), or you would be able to select "none" to remove the default (falling back to whatever custom logic that kde and fluxbox are using) and prevent future reinstalls of adwaita/vanilla from auto-creating a default link.
Comment 14 Erik Quaeghebeur 2015-03-20 10:00:04 UTC
(In reply to Alexandre Rostovtsev from comment #13)
> [...] you would be able to select "none" to remove the default (falling
> back to whatever custom logic that kde and fluxbox are using) [...]

I deleted the default default to Adwaita symlink and still Adwaita is used in KDE. Renaming the /usr/share/cursors to /usr/share/cursors.disabled and logging-out/in did, however, result in my old theme coming back. Renaming it back and logging-out/in causes Adwaita to again be used as the cursor theme.

So it seems KDE has a fall-back cursor theme it is using that is not stored in /usr/cursors. Perhaps linking it there will make it available for selection and not only as a fall-back. Perhaps involve the KDE herd?
Comment 15 Pacho Ramos gentoo-dev 2015-03-20 18:52:37 UTC
*** Bug 543902 has been marked as a duplicate of this bug. ***
Comment 16 Pacho Ramos gentoo-dev 2015-03-20 19:22:14 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=711703 -> this is the current upstream bug
Comment 17 BT 2015-03-21 11:06:45 UTC
(In reply to Erik Quaeghebeur from comment #14)
> I deleted the default default to Adwaita symlink and still Adwaita is used
> in KDE. Renaming the /usr/share/cursors to /usr/share/cursors.disabled and
> logging-out/in did, however, result in my old theme coming back. Renaming it
> back and logging-out/in causes Adwaita to again be used as the cursor theme.

What happens if you set the XCURSOR_THEME environment variable to your preferred theme?

# echo "XCURSOR_THEME=theme" > /etc/env.d/99xcursor
# env-update

In my case only KDM was using Adwaita, while KDE correctly used Oxygen_White. After I set XCURSOR_THEME, KDM now uses the correct theme, even with Adwaita set as the default in '/usr/share/cursors/xorg-x11'.
Comment 18 Erik Quaeghebeur 2015-03-21 15:20:00 UTC
(In reply to BT from comment #17)
>
> What happens if you set the XCURSOR_THEME environment variable to your
> preferred theme?

Well, I do not know the name of the theme I was using. Looking at what I have installed,

# eix -cI x11-themes/*
[I] x11-themes/adwaita-icon-theme (3.14.1@15-03-15): GNOME default icon theme
[I] x11-themes/hicolor-icon-theme (0.12@26-08-11): Fallback theme for the freedesktop icon theme specification
[I] x11-themes/qtcurve (1.8.17-r1@09-02-14): A set of widget styles for Qt and GTK2
[I] x11-themes/sound-theme-freedesktop (0.8@26-03-13): Default freedesktop.org sound theme following the XDG theming specification

I guess it may have been hicolor-icon-theme, although this is an icon theme. But, to be honest, I don't really care about KDM's theme; I did notice it was the same as in KDE for me.
Comment 19 BT 2015-03-22 00:03:48 UTC
(In reply to Erik Quaeghebeur from comment #18)
> I guess it may have been hicolor-icon-theme, although this is an icon theme.
> But, to be honest, I don't really care about KDM's theme; I did notice it
> was the same as in KDE for me.

You should have kde-base/kdebase-cursors installed with kde-base/kdebase-meta[-minimal]. Conversely with kde-base/kdebase-meta[minimal], kde-base/kdebase-startkde which is responsible for setting XCURSOR_THEME, will not be installed. This probably explains why in your case KDE was using some sort of built-in fallback.
Comment 20 Jérôme Borme 2015-03-22 15:34:11 UTC
(In reply to BT from comment #19)
> You should have kde-base/kdebase-cursors installed with
> kde-base/kdebase-meta[-minimal].

Which is the package that provides the default X.org cursor theme and is usable by the kind of simple windows managers that do not offer theme selection? 

fluxbox or twm just use whatever libXcursor calls its default. (For fluxbox it's this line of code: http://git.fluxbox.org/fluxbox.git/commit/src/FbWinFrameTheme.cc?id=b16528de87e80dcd1ae9f70c8c76fd8da722d2da ). libXcursor uses the first cursor theme it finds in /usr/share/cursors and other places (scanning order in Xcursor(3) man page), and only if none is found then it uses the X.org default theme. For those wanting to use X.org default theme, I can see two options:

a) make sure that cursors/, pixmaps/ and icons/ subdirs in /usr/share/ DO NOT CONTAIN any valid cursor theme, by continuing to allow users not to install any such themes packages (the reporter renamed the adwaita folder after installation but that's not elegant solution and needs to be repeated everytime portage pushes an update), or:

b) bundle the X.org default pixmaps into a proper cursor theme and offer a way to select it as the libXcursor default.
Comment 21 Erik Quaeghebeur 2015-03-22 16:35:05 UTC
(In reply to BT from comment #19)
> 
> You should have kde-base/kdebase-cursors installed with
> kde-base/kdebase-meta[-minimal]. Conversely with
> kde-base/kdebase-meta[minimal], kde-base/kdebase-startkde which is
> responsible for setting XCURSOR_THEME, will not be installed. This probably
> explains why in your case KDE was using some sort of built-in fallback.

FYI: I do not have kde-base/kdebase-meta installed, but do have kde-base/kdebase-startkde installed (in world).
Comment 22 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-03-22 17:53:52 UTC
I've removed the symlink; setting the cursor theme by env variable is more flexible, and different session managers can handle this in a way appropriate for their desktop environment.

+*gnome-session-3.14.0-r2 (22 Mar 2015)
+
+  22 Mar 2015; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +gnome-session-3.14.0-r2.ebuild, +files/90-xcursor-theme-gnome:
+  Set XCURSOR_THEME from current dconf settings so non-gtk applications get the
+  right mouse cursor.
+  Note: you will have to log out and back in to update the env variable after
+  changing the mouse cursor in gnome-tweak-tool.

+*adwaita-icon-theme-3.14.1-r1 (22 Mar 2015)
+
+  22 Mar 2015; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +adwaita-icon-theme-3.14.1-r1.ebuild:
+  Stop installing the /usr/share/cursors/xorg-x11/default symlink, it messes up
+  cursors in some non-GNOME desktop environments (bug #543488). Instead, rely
+  on env variables set by the session; for GNOME, make sure you have
+  >=gnome-session-3.14.0-r2
Comment 23 Nuno Silva 2015-04-05 10:00:09 UTC
This bug is not fixed, as adwaita-icon-theme-3.14.1 still installs the symlink.
Comment 24 Jan Bessai 2015-04-26 09:24:49 UTC
I prefer to have the old Xorg theme, so I'm currently doing

> sudo rm -rf /usr/share/cursors/xorg-x11/Adwaita

after every update. This is annoying but works fine for xmonad, even though I'm running Gtk applications. There are two things on my system depending on the theme:

> equery d adwaita-icon-theme
>  * These packages depend on adwaita-icon-theme:
>  app-text/evince-3.14.2-r1 (>=x11-themes/adwaita-icon-theme-2.17.1)
>  x11-libs/gtk+-3.14.10 (>=x11-themes/adwaita-icon-theme-3.14)

I'd be happy to kill of evince all together, but removing GTK is not an option. Would it be possible to get a USE-flag, telling GTK to ignore the dependency? If Gnome needs it, it can then depend on gtk [+adwaita].
Comment 25 haarp 2015-04-26 09:28:14 UTC
(In reply to Jan Bessai from comment #24)
> I prefer to have the old Xorg theme, so I'm currently doing
> 
> > sudo rm -rf /usr/share/cursors/xorg-x11/Adwaita
> 
> after every update.

INSTALL_MASK might be worth a look.