Bug 1234776 - gnome shell shows "Emacs Client" instead of "Emacs"
Summary: gnome shell shows "Emacs Client" instead of "Emacs"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1246806 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-23 08:40 UTC by Jan Synacek
Modified: 2015-12-15 12:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1332670 (view as bug list)
Environment:
Last Closed: 2015-06-26 12:50:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 751541 0 None None None Never

Description Jan Synacek 2015-06-23 08:40:29 UTC
Description of problem:
See Steps to Reproduce and Actual results.


Version-Release number of selected component (if applicable):
gnome-shell-3.16.2-1.fc22.x86_64
emacs-24.5-2.fc22.x86_64


Steps to Reproduce:
1. Install Fedora 22 Workstation and emacs
2. Start emacs (either from Activities or even command line)
3. Go to Activities and observe
   - or -
   Press Alt-tab and observe

Actual results:
In both cases, the icon caption says "Emacs Client" when in fact I'm running just emacs.


Expected results:
Icon is correctly captioned as "Emacs".


Additional info:
It seems like gnome-shell is confused about the fact that there are both emacs.desktop and emacsclient.desktop present in /usr/share/applications/, and they both have Icon=emacs.

Comment 1 Florian Müllner 2015-06-25 11:35:50 UTC
(In reply to Jan Synacek from comment #0)
> Additional info:
> It seems like gnome-shell is confused about the fact that there are both
> emacs.desktop and emacsclient.desktop present in /usr/share/applications/,
> and they both have Icon=emacs.

No, we don't look at the icon to figure out the corresponding application. The most important bit is the WM_CLASS set on the window, what does running "xprop | grep WM_CLASS" in a terminal print out?

Comment 2 Jan Synacek 2015-06-26 10:10:35 UTC
$ xprop | grep WM_CLASS
WM_CLASS(STRING) = "emacs", "Emacs"

$ xprop | grep Emacs
WM_CLASS(STRING) = "emacs", "Emacs"

No sign of "Emacs Client" here.

Comment 3 Florian Müllner 2015-06-26 12:50:59 UTC
OK, so I figured out the culprit: One of the first steps we do when trying to match a window to an application is to look for a .desktop file that contains a StartupWMClass that matches the window's WM_CLASS. In this case, this is true for both emacs.desktop and emacsclient.desktop and we end up picking a "random" one. I've filed an upstream bug with a patch, let's track the issue there.
If you want to apply a workaround until the issue is properly fixed, you can copy emacsclient.desktop into $HOME/.local/share/applications and change the StartupWMClass key to something else (for instance 'EmacsClient').

Comment 4 Jan Synacek 2015-06-29 06:50:37 UTC
That was quick, thank you!

Comment 5 Jan Synacek 2015-12-15 12:03:11 UTC
*** Bug 1246806 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.