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 605137 - way to suppress "(as superuser)" message
way to suppress "(as superuser)" message
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Thomas Thurman
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2009-12-21 14:26 UTC by Colin Watson
Modified: 2020-11-07 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (1.26 KB, text/plain)
2010-02-09 23:07 UTC, Thomas Thurman
  Details
Patch to Metacity to implement this behaviour (3.69 KB, patch)
2010-02-09 23:08 UTC, Thomas Thurman
none Details | Review

Description Colin Watson 2009-12-21 14:26:24 UTC
I can see the usefulness of the new "(as superuser)" message to let users know that they should be taking extra care. However, there are a few cases where it isn't really appropriate.

The Ubuntu installer runs as root (actually, it drops privileges for many of its UI operations in order to work better with a11y bits, but we're running in a special session so it doesn't matter all that much most of the time). It's quite confusing to see "Install (as superuser)", since it suggests the question of how one might Install not as the superuser.

Would it be possible to get a flag whereby applications can suppress this message? I'm assuming that there isn't really a security concern here, since applications running as the superuser are all-powerful anyway.

Thomas said on IRC: "I think a _NET_WM_* flag is probably overkill, but a _METACITY_* flag would probably be a sane workaround".
Comment 1 Thomas Thurman 2010-02-09 23:07:22 UTC
Created attachment 153372 [details]
Test case
Comment 2 Thomas Thurman 2010-02-09 23:08:26 UTC
Created attachment 153373 [details] [review]
Patch to Metacity to implement this behaviour

I think this does what you want.  Can you try it out and let me know?  Thanks.
Comment 3 Colin Watson 2010-02-10 12:45:42 UTC
I think I'm just being stupid somehow, but can you walk me through testing this with PyGTK if you know how?  I'm currently trying:

$ sudo python
>>> import gtk
>>> w = gtk.Window()
>>> w.show()
>>> w.window.property_change('_METACITY_HIDE_USERNAME', 'CARDINAL', 8, gtk.gdk.PROP_MODE_REPLACE, '\001')
>>> gtk.main()

... but no dice.  xprop shows '_METACITY_HIDE_USERNAME(CARDINAL) = 1' as I would expect.

(Incidentally, why the restriction to CARDINAL atoms given that metacity ignores the value?  It seems as though META_PROP_TYPE_INVALID would be fine in that table.)
Comment 4 Colin Watson 2010-02-11 15:26:56 UTC
To match the C test case, I made this:

>>> w.window.property_change('_METACITY_HIDE_USERNAME', 'CARDINAL', 32, gtk.gdk.PROP_MODE_REPLACE, [1])

No difference, though.  Indeed the C test case fails for me too; running it as root, both windows have "(as superuser)" in their title bars.
Comment 5 Thomas Thurman 2010-02-22 20:12:28 UTC
The C test case is still working for me, but your Python test case fails; I'll look into it and find out why.

Not sure why I made it CARDINAL, now I come to think of it.  INVALID would presumably have been more sensible.
Comment 6 padraig.obriain 2010-06-16 09:38:18 UTC
I am seeing the same behavior as Colin for both C and python test program.

I have noticed that, if I restart metacity, the window running as root then no longer has "(as superuser)" in the title.

It is as if metacity does not redraw the window title when it gets notification that disable_as_user flag of the MetaWindow has changed.
Comment 7 André Klapper 2020-11-07 12:35:54 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all
old feature requests in Bugzilla which have not seen updates for many years.

If you still use metacity and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/

Thank you for reporting this issue and we are sorry it could not be implemented.