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 737258 - Dynamically detect when running under Unity
Dynamically detect when running under Unity
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: ux
unspecified
Other Linux
: Normal normal
: 0.10.0
Assigned To: Geary Maintainers
Geary Maintainers
: 731809 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-24 12:11 UTC by Remco
Modified: 2014-11-14 21:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Remco 2014-09-24 12:11:52 UTC
I think Geary tries to show the title bar instead of the header bar on Ubuntu, but on Ubuntu with GNOME Shell, it shows both.
Comment 1 Robert Schroll 2014-09-24 16:58:48 UTC
Ubuntu's Unity doesn't do well with client-side decorated windows, so when Geary is configured with the --enable-unity flag, it will let the server decorate the windows, giving you both the title and header bars.  If you'll only be using GNOME Shell, just configure geary without the --enable-unity flag.

Note that the version in the PPA is configured with the --enable-unity flag, to ensure it works in all desktop environments.

That all said, I'm not sure why this has to be a configure-time option.  All it does is change how the HeaderBar is put into the windows.  Can we make it into a run-time flag?
Comment 2 Jim Nelson 2014-09-24 18:50:12 UTC
(In reply to comment #1)
> That all said, I'm not sure why this has to be a configure-time option.  All it
> does is change how the HeaderBar is put into the windows.  Can we make it into
> a run-time flag?

We could, but it's fuzzy to me how to check what desktop environment the user is running under.  We can't look for a particular package, i.e. libunity, because it's possible (likely, under Ubuntu) that they would have that installed even though they're running GNOME Shell.

I'll change this ticket's title to reflect this, since that seems like an improvement.  The better solution would be for Ubuntu to improve their themes and support for CSD, but that's a separate issue.
Comment 3 Robert Schroll 2014-09-24 19:12:19 UTC
While an automatic detection would be great, it seems to me that a run-time flag could also work.  Then instead of recompiling Geary, Remco could just edit the .desktop file to remove "--enable-unity".  Or we could ship two desktop files, one with and one without this flag.  It wouldn't be as slick as automatic detection, but it would be less work.

We may want to see how Ubuntu 14.10 behaves before we waste any time on this, though.
Comment 4 Jim Nelson 2014-09-24 20:10:06 UTC
14.10 has this problem the last time I checked, and I doubt it will change before it's released.  See https://lists.ubuntu.com/archives/ubuntu-desktop/2014-September/004539.html

I don't want to ship two .desktop files.  That means the user will see "Geary (Unity)" and "Geary (GNOME Shell)" in their application list.  (Unless you see a way around this.)
Comment 5 Jim Nelson 2014-09-24 20:11:47 UTC
I received an email from a user who suggested examining the "XDG_CURRENT_DESKTOP" environment variable.  That might be the solution we're looking for.
Comment 6 Jim Nelson 2014-10-20 21:51:18 UTC
See also bug #738899.
Comment 7 Jim Nelson 2014-11-14 21:56:57 UTC
Pushed to master, commit cbb21b
Comment 8 Jim Nelson 2014-11-14 21:57:41 UTC
*** Bug 731809 has been marked as a duplicate of this bug. ***