Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 811078

Summary: net-misc/remmina requires appindicator and breaks other packages
Product: Gentoo Linux Reporter: Tomas Janco <jancotomas>
Component: Current packagesAssignee: Ben Kohler <bkohler>
Status: RESOLVED FIXED    
Severity: normal CC: antenore, bkohler, joakim.tjernlund, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tomas Janco 2021-08-30 07:15:26 UTC
Since 1.4.20 libappindicator is required for remmina and it installs system-wide.

However this makes all electron-based packages (i.e. slack, discord, teams) and probably others to use AppIndicator instead of whatever they were using for the systray icon.

This has a negative effect of losing the right/left-click function for status icon. Without AppIndicator, the icon has two distinct functions - left click opens the application, right click opens context menu. With AppIndicator the menu is open for both right and left click.

Remmina works fine without AppIndicator (just it does not display the status icon). I'd rather chose losing status icon for remmina than to break other packages icons if I'd have the option.

I suggest the appindicator use flag should be reintroduced.
Comment 1 Joakim Tjernlund 2021-08-30 12:01:56 UTC
Sounds right, all other pkgs I have installed has USE=appindicator:

gnome-extra/nm-applet-1.22.0 (appindicator ? dev-libs/libappindicator:3)
mate-base/mate-control-center-1.24.2 (appindicator ? dev-libs/libappindicator:3)
mate-extra/mate-polkit-1.24.0-r1 (appindicator ? dev-libs/libappindicator:3)
net-wireless/blueman-2.2.2 (appindicator ? dev-libs/libappindicator:3[introspection])
Comment 2 Ben Kohler gentoo-dev 2021-08-31 10:54:04 UTC
It works fine without libappindicator?

-- Checking for module 'ayatana-appindicator3-0.1'
--   Package 'ayatana-appindicator3-0.1', required by 'virtual:world', not found
-- Checking for module 'appindicator3-0.1'
--   Package 'appindicator3-0.1', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find APPINDICATOR (missing: APPINDICATOR_LIBRARY
  APPINDICATOR_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindAPPINDICATOR.cmake:51 (find_package_handle_standard_args)
  cmake/FindOptionalPackage.cmake:27 (find_package)
  src/CMakeLists.txt:268 (find_required_package)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/net-misc/remmina-1.4.20/work/remmina-1.4.20_build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/net-misc/remmina-1.4.20/work/remmina-1.4.20_build/CMakeFiles/CMakeError.log".
 * ERROR: net-misc/remmina-1.4.20::gentoo failed (configure phase):
 *   cmake failed
Comment 4 Tomas Janco 2021-08-31 11:14:21 UTC
I guess it works at runtime, however it does not build.
Comment 5 Ben Kohler gentoo-dev 2021-08-31 11:24:46 UTC
Then we have a bit of a conundrum here.

Shouldn't the real bug report be "electron apps are broken if libappindicator is installed" ?

I should be able to depend on a lib that my package needs..
Comment 6 Tomas Janco 2021-09-03 14:16:50 UTC
I agree electron packages are broken. And there is no way to fix them as they are often binary packages. Electron is not able to fix this either https://github.com/electron/electron/issues/14941

My argument is: If appindicator has such system-wide effect, I should by able to not use it if it's not essential, or I should by able to install it isolated

I do not see a good reason for removing the appindicator build option by remmina maintaniners. Can we have that back please? At least as a patch and use flag in gentoo package?
Comment 7 Ben Kohler gentoo-dev 2021-09-03 14:18:28 UTC
Please ask for this upstream.

I cannot add the flag back now, since it's not actually optional (unless we start carrying extra patches forever).
Comment 8 tmow 2021-12-15 10:54:38 UTC
(In reply to Ben Kohler from comment #7)
> Please ask for this upstream.
> 
> I cannot add the flag back now, since it's not actually optional (unless we
> start carrying extra patches forever).

Upstream maintainer here.

What you need exactly?

From my point of view:

1. All the things *app-indicator* 

This is just a workaround because the GNOME project have decided we don't deservers and need any more status icons.

2. Remmina users want the status icon.

I've tried a couple of times to propose to remove it and many users went panic :-D 

Personally I don't use it at all.

3. Requirement

I had to add appindicator as a requirement to ditch xembed, that is deprecated by Gtk, and there's not another way to have the Remmina status icon functionalities without appindicator (ayatana specifically).


Whatever I'm totally open to cooperate, let's find a solution that suite everybody ;-)
Comment 9 Tomas Janco 2021-12-15 11:28:34 UTC
Thanks for reaching out, tmow.

I suggest making appindicator optional dependency,
if compiled without appindicator then there will be no status icon.
In gentoo it can be enabled/disabled by appindicator USE flag again.

This will work for all users it is currently working for (they will have appindicator) and it will also work for users that do not use status icons and do not want appindicator.

It will not work for users wanting status icon without appindicator but I see you have no options here.
Comment 10 tmow 2021-12-15 11:42:45 UTC
(In reply to Tomas Janco from comment #9)
> Thanks for reaching out, tmow.
> 
> I suggest making appindicator optional dependency,
> if compiled without appindicator then there will be no status icon.
> In gentoo it can be enabled/disabled by appindicator USE flag again.
> 
> This will work for all users it is currently working for (they will have
> appindicator) and it will also work for users that do not use status icons
> and do not want appindicator.
> 
> It will not work for users wanting status icon without appindicator but I
> see you have no options here.

Thanks Tomas.

Yes it makes sense, I even don know why I didn't follow this route in first place.

I think that the goal was avoiding to reach all the downstream maintainers to explain the situation, when, on the contrary, was easier to add a flag to disable the status icon and set it to enabled by default.

We will release soon Remmina 1.4.23, and it will amend this situation.

I'll post here as soon as you can update the USE flags
Comment 11 tmow 2021-12-16 15:09:16 UTC
https://gitlab.com/Remmina/Remmina/-/merge_requests/2359

This is a dirty workaround, but it seems to work properly.

I'll merge in master after some tests, and it will be available from Remmina 1.4.23
Comment 12 tmow 2021-12-16 15:11:46 UTC
Ah! BTW, This workaround, it's really a workaround, the default behavior should be to keep the default -DWITH_APPINDICATOR=ON 

In a future release we will ditch the system tray icon forever, we just need to find a couple of replacements for the Remmina system tray.
Comment 13 Ben Kohler gentoo-dev 2021-12-16 15:41:47 UTC
(In reply to tmow from comment #12)
> Ah! BTW, This workaround, it's really a workaround, the default behavior
> should be to keep the default -DWITH_APPINDICATOR=ON 
> 
> In a future release we will ditch the system tray icon forever, we just need
> to find a couple of replacements for the Remmina system tray.

I'll make sure that when I add the flag back, it'll be default-on
Comment 14 Ben Kohler gentoo-dev 2021-12-20 15:35:15 UTC
1.4.23 is supposed to have optional appindicator support but I've not had any success getting it turned off
Comment 15 tmow 2021-12-20 23:07:40 UTC
(In reply to Ben Kohler from comment #14)
> 1.4.23 is supposed to have optional appindicator support but I've not had
> any success getting it turned off

Sorry Ben, in the Merge Request description the flag name was wrong, you have to set -DHAVE_LIBAPPINDICATOR=OFF
Comment 16 Ben Kohler gentoo-dev 2021-12-22 12:25:25 UTC
I've tried -DHAVE_LIBAPPINDICATOR=OFF and -DHAVE_LIBAPPINDICATOR=no, neither one is disabling it successfully, if libappindicator is already installed
Comment 17 tmow 2021-12-22 13:13:48 UTC
(In reply to Ben Kohler from comment #16)
> I've tried -DHAVE_LIBAPPINDICATOR=OFF and -DHAVE_LIBAPPINDICATOR=no, neither
> one is disabling it successfully, if libappindicator is already installed

That's weird, I've compiled Remmina with these flags:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_PREFIX_PATH=/usr -DWITH_KF5WALLET=OFF -DWITH_CUPS=ON -DWITH_FREERDP_MASTER=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_GCC_SANITIZE_ADDRESS=ON -DWITH_LIBSSH=ON -DWITH_NEWS=ON -DWITH_EXAMPLES=ON -DWITH_PYTHONLIBS=OFF -DWITH_GVNC=ON -DTOGTK4=OFF -DWITH_CLEANUP=ON -DHAVE_LIBAPPINDICATOR=OFF -DWITH_X2GO=ON -G Ninja ..

And both libappindicator and ayatana are not linked, I've double-checked with ldd on the Remmina binary
Comment 18 Ben Kohler gentoo-dev 2021-12-22 13:38:57 UTC
Doh I was apparently trying -DHAVE_APPINDICATOR=OFF, thanks for the quick followup.  Fix incoming.
Comment 19 Larry the Git Cow gentoo-dev 2021-12-22 13:40:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54768baa218a1b15c27d03ea9769b0c39090af87

commit 54768baa218a1b15c27d03ea9769b0c39090af87
Author:     Ben Kohler <bkohler@gentoo.org>
AuthorDate: 2021-12-22 13:39:27 +0000
Commit:     Ben Kohler <bkohler@gentoo.org>
CommitDate: 2021-12-22 13:39:56 +0000

    net-misc/remmina: revbump for libappindicator fix, & spice fix
    
    Closes: https://bugs.gentoo.org/811078
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Ben Kohler <bkohler@gentoo.org>

 .../{remmina-1.4.23.ebuild => remmina-1.4.23-r1.ebuild}  | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
Comment 20 Joakim Tjernlund 2021-12-22 14:41:59 UTC
(In reply to Ben Kohler from comment #13)
> (In reply to tmow from comment #12)
> > Ah! BTW, This workaround, it's really a workaround, the default behavior
> > should be to keep the default -DWITH_APPINDICATOR=ON 
> > 
> > In a future release we will ditch the system tray icon forever, we just need
> > to find a couple of replacements for the Remmina system tray.
> 
> I'll make sure that when I add the flag back, it'll be default-on

Sure you want to have it default on? All other apps does not, maybe this is the best time to change behavior.
Comment 21 Joakim Tjernlund 2021-12-22 14:45:30 UTC
(In reply to Tomas Janco from comment #0)
> Since 1.4.20 libappindicator is required for remmina and it installs
> system-wide.
> 
> However this makes all electron-based packages (i.e. slack, discord, teams)
> and probably others to use AppIndicator instead of whatever they were using
> for the systray icon.
> 
> This has a negative effect of losing the right/left-click function for
> status icon. Without AppIndicator, the icon has two distinct functions -
> left click opens the application, right click opens context menu. With
> AppIndicator the menu is open for both right and left click.
> 
> Remmina works fine without AppIndicator (just it does not display the status
> icon). I'd rather chose losing status icon for remmina than to break other
> packages icons if I'd have the option.
> 
> I suggest the appindicator use flag should be reintroduced.

For some electron apps, appindicator can be worked around. Just create
empty libappindicator3.so, libappindicator3.so.1 files where the
electron app resides. For teams-insiders it is in /usr/share/teams-insiders
Comment 22 Ben Kohler gentoo-dev 2021-12-22 17:57:49 UTC
My goal was to have things keep working as before, by default.  Anyone who wants the change can opt in.

I'm willing to reconsider if you think it's important, just open a new bug.
Comment 23 tmow 2021-12-22 18:37:57 UTC
(In reply to Ben Kohler from comment #22)
> My goal was to have things keep working as before, by default.  Anyone who
> wants the change can opt in.
> 
> I'm willing to reconsider if you think it's important, just open a new bug.

Sorry, I was busy.

You can set it to off of you wish, no problems at all for me 


In the the Remmina source code will stay on by default, and it's perfect
Comment 24 Nikita Zlobin 2021-12-28 16:09:33 UTC
There seem to be different packages: besides libappindicator3, which is already in portage, there's AyatanaIndicator: https://github.com/AyatanaIndicators/libayatana-appindicator

Both of them are packaged for ubuntu. What's interesting, even if app doesn't try for libappindicator (only libayatana-appindicator), at least in some cases it may be adapted to libappindicator by simple substitution with sed. E.g. this is how I did for recent gxkb (0.9.3) in own overlay (not in eselect-repository db yet):

{	find . -name '*.[ch]'
	echo configure.ac
} | xargs sed -i 's|ayatana-appindicator|appindicator|'

(added to src_prepare(), before runing its autogen.sh).