GNOME Bugzilla – Bug 82200
Ship an "su root" profile by default
Last modified: 2021-06-10 14:28:46 UTC
Here is a patch that adds an option to change the color background to red when root is logged in the terminal. This is really util (the patch came after some stupid delete when using too many termianls and only one with root!). It works fine except the notification stuff of the preferences because the enum bitmask is full (32 bits), so it will need a "medium" change to gnome- terminal code. What's the best way? gint64 array?
Created attachment 8566 [details] [review] Option to ghange background to red when logged as root
Basing this on the terminal title is a really bad hack. The idea of profiles is that you could make a profile called "root shell" that ran "su -" as the command, and had a red background. Maybe we should ship with a profile like that by default even.
This is a good idea. In the other side of "red coloured stuff"... anyway to get metacity owned-by-root-windows to have a red frame border?
How is metacity going to know a window is owned by root?
Ey! Metacity is _really_ a good window manager. It's easy to get the pid of the process and then the owner. Look at the attached example.
Created attachment 8628 [details] Code to get the uid of a window (works with metacity)
Should this depend on the report with a request for a colored cursor?
This does not really depend on being able to change cursor colors. I think a nice way to solve this is to make vte understand some new controm sequences, which cause it to emit signals, which are listened to by gnome-terminal. For example, one control sequence to change profile; then i'd be trivial to come up with a little script gnome-terminal-control or whatever that allowed to say things like gnome-terminal-control --set-profile='My favorite root profile' in to ~root/.bashrc, or whatever. This could even be done in The Right Way, so that a couple of RFEs (being able to add tabs in _the_running_window_ from the command line, and one or two more) can be implemented by just sending appropiate control sequences to vte, who'd forward them to g-t by signals, etc.
Comment on attachment 8566 [details] [review] Option to ghange background to red when logged as root needs-work in lieu of hell-no. :)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/1472.