Menu isn't shown in gedit when run with sudo

Bug #1527590 reported by Marc Deslauriers on 2015-12-18
This bug affects 22 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)

Bug Description

There are multiple ways to use gedit where the menu is not being shown, rendering it unusable.

1- use it over ssh
2- do "sudo gedit"

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: gedit 3.18.2-1ubuntu4
ProcVersionSignature: User Name 4.3.0-2.11-generic 4.3.0
Uname: Linux 4.3.0-2-generic x86_64
ApportVersion: 2.19.3-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Dec 18 07:16:30 2015
InstallationDate: Installed on 2015-10-23 (55 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)

Marc Deslauriers (mdeslaur) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Changed in gedit (Ubuntu):
importance: Undecided → High

Here's a screen-shot of the issue where the typical menu cannot be shown in the title-bar, because gedit is currently utilizing the title bar itself at the application-level (which is overriding the "desktop-environment-level):

Temporarily, I'm using pluma instead of gedit as a work-around for the menu-not-displaying-in-title-bar-issue:
sudo apt-get install pluma

Pluma seems to be some previous fork of gedit, and looks like gedit did about two versions ago. Here's a screen shot of pluma, where you can see the correct behavior regarding the title-bar-menu:

Marc Deslauriers (mdeslaur) wrote :

FYI Lonnie the issue you are referring to is bug 1518516. It's not the same as this issue.

This bug isn't a dupe of 1518516, it's a slightly different issue.

neclepsio (neclepsio) wrote :

Same here. Fresh install, fully updated.

neclepsio (neclepsio) wrote :

Setting UBUNTU_MENUPROXY does not help. Also, if I understand correctly, I'm not affected by #3: if menu is set to display in window titlebar, it works for me (if not using sudo).

The #3 isn't relevant anymore because gedit is patched to disable CSD (Client Side Decorations) on Unity.

However this patch doesn't work for point #2. So when you run gedit as root you get it with CSD and this means no menus. And this affects menus displayed on the panel and in the window titlebar.

This is how gedit looks with CSD normally:

Mathew Hodson (mhodson) on 2016-07-22
summary: - gedit unusable when menu can't be displayed
+ Menu isn't shown in gedit when run as root
Changed in gedit (Ubuntu):
importance: High → Medium
description: updated
summary: - Menu isn't shown in gedit when run as root
+ Menu isn't shown in gedit when run with sudo
Éric Piel (Delmic) (piel) wrote :

With this command, I'm able to run gedit in sudo and get the menu:
sudo -E gedit

The environment variable that matters is DBUS_SESSION_BUS_ADDRESS.

So you can also get gedit working like this:

That said, dconf still doesn't work. So it's not possible changing the preferences.

Michael Fox (news-9) wrote :

Same problem. New install of 16.04.1.
$ gedit --> shows menu
$ sudo gedit --> does NOT show menu
$ gksudo gedit --> does NOT show menu
$ sudo -i ... # gedit --> does NOT show menu
This happens whether the menus are set for the title bar OR for the top of the screen.
Tried reinstalling gedit. No difference.

Coeur Noir (coeur-noir) wrote :

Same here with gedit / ubuntu 16.04 unity.

Does same kind of behaviour with Nautilus and Synaptic come from the same "bug" or is it different things ? please see →

Norbert (nrbrtx) wrote :

Same here with gedit / ubuntu 16.04 unity.

adrenochrome (adrenochrome) wrote :

still no update or explanation about this problem ? still the same behaviour on 17.04

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers