I have this strange issue. Let me explain:
- If I launch a Leafpad instance with
leafpad
command line (as an example), it shows like this:
- If on the contrary, I do the command
sudo leafpad
the window shows with both menu and title decorations (which is the expected behaviour, or what I want it to show):
What I ultimately want Ubuntu Unity to do is always show menu title AND menu bar. As I see, strangely enough, it only works when issuing a program with sudo
.
Is there any way to make it work for all applications, always? This behaviour is quite strange, but I think it finally solves the problem of Firefox not letting you right click:
- without
sudo
, Firefox shows the crappy nautilus-like menu/title: - with
sudo firefox
, you can right click into the bookmarks like I'm doing right now
Can we finally learn how is this working in Unity? I've been using Ubuntu for about 5 years or more. I learned a lot of tricks for this O.S., but still this issue makes my life miserable.
EDIT: I have learned that if i execute firefox from another user (even root), windows decorations won't show and so contextual menu for firefox is back! (right click issue solved). However that brings additional problems with firefox Screenshot of firefox in ubuntu working with context menu again! : context menu in firefox
To replicate this:
xhost +local:
su - anotheruser
firefox
The issue is still not solved because, while i can show menu and title in firefox or any other application, it creates additional permission problems because of executing things with different users.
leafpad
as you, it (actually Unity) has access the 'application menu' so it appeared in the top panel. When run as a different user (sudo or elevated permissions; do aid
with & without sudo) it couldn't access your top panel to add 'app menu' so it was forced to use 'window decorations'. This is a permissions issue, and will not be changed (you shouldn't run gui apps with sudo ideally; and they are more difficult in wayland). note: i'm using https://askubuntu.com/questions/10228/whats-the-right-terminology-for-unitys-ui-elements#19166 for names (i'm not a gui person) – guiverc Mar 07 '18 at 02:07gksudo leafpad
(it made no difference on 16.04) which is thesudo
command for gui apps. – guiverc Mar 07 '18 at 02:12maybe running GUI apps with a different user (not necessarily root) is a "workaround"
– cpepito Mar 07 '18 at 11:57