3

Something strange which I'm trying to understand:

  • Ubuntu 16.04
  • Gnome Classic

If I launch gedit from the menu or command line as myself, I get the following UI:

SCREENSHOT 1: gedit as user

^ this one has:

  • the menu bar at the top of the window
  • with the [ Open ] and [ + ] and [ Save ] directly underneath

However, if I launch gedit from the command line using gksu gedit, I get a different looking UI:

SCREENSHOT 2: gedit using gksu

^ this one has:

  • the [ Open ] and [ + ] and [ Save ] in the title bar at the top of the window
  • with the menu bar directly underneath

Now I know that the sudo profile is different to my user profile, but I can't work out what is changing.

Is the gksu gedit using a Unity desktop view - as opposed to my user view as Gnome classic ?

I have searched around a bit, and am having no luck working it out.

Any advice ?

Thanks


EDIT additional info

I logged out of Gnome Classic and logged back in using Unity ... and got a similar display to the first screenshot.

I am still trying to work out how to get the second view while launching as a normal user.

1
  • It looks like you're launching two different versions of Gedit: the old Unity version and then the new GNOME version, Aug 29, 2016 at 16:03

1 Answer 1

2

This difference is being made to maintain compatibility between Unity's global menu and Gnome's menu style, I believe.

After searching the differences between root and normal user's shell, I found that normal user has XDG_CURRENT_DESKTOP environment variable set to GNOME-Flashback:Unity.

So, If you want to the UI of gedit like the root, you need to use this command or unset the XDG_CURRENT_DESKTOP environment variable.

env XDG_CURRENT_DESKTOP='' gedit

You can even make this default by modifying the file in /usr/share/applications/gedit.desktop. Though I don't recommend you to do so.

3
  • You are a star +1. I cloned my gedit.desktop to gedit-unity.desktop and changed the Exec=gedit to Exec=env XDG_CURRENT_DESKTOP='' gedit and then added the modified application launcher to my top panel. I now get the cleaner looking interface. I have left the original desktop file untouched. 100% satisfaction. Thank you.
    – TaoRich
    Aug 31, 2016 at 12:24
  • Great! Glad that it works!
    – Anwar
    Aug 31, 2016 at 12:48
  • Very weird ... just set up my second PC (my home machine) and I simply cannot replicate the Unity view. Made exactly the same changes, but I still get the Gnome view. /scratches head. Not serious though as I have now fixed my Radiance Title Bar Display, and I have the Silver Grey view.
    – TaoRich
    Sep 6, 2016 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .