You are not logged in.
Pages: 1
I was wondering whether it could be achieved that the windows look different depending on the user that runs them.
For instance, if you launched X/xfce as user "usera" and open an application, it will have a red border, but if you open an application as a different user (like sudo -u userb mousepad), it will have a blue border.
It's probably not a standard feature, but maybe there's some kind of hack that will do the trick?
Offline
You can do this with the Gtk+ theme. Just copy your Gtk+ theme to the /root/.themes/ directory and alter the colours from there.
This would not be easily achievable with any window manager, though. Entirely possible but it's not a use case that's likely to be addressed by any of the major window managers any time soon (although you may be able to do this with Kwin in KDE4, since the Qt theme can define the background for the window decorations to achieve the 'blended' look).
Offline
Nice to hear that's (at least in principle) possible, I'd feel safer with my root-applications warning me :-)
I'm just not sure what to copy and where to. Should I copy "cp -r /usr/share/themes/* /root/.themes/" ?
I did this and then edited the file "/root/.themes/Xfce-kolors/gtk-2.0/gtkrc" to make the title bar black (just as a test),
however, it seems like it didn't matter that much, running "su mousepad" still produces a window in the style of the user that logged on to xfce, not of the user that's running it.
[edit] woops my mistake, it did change!
I set all colors to black, just to see the difference. Now my entire window is black, but the titlebar and bordercolor are still the same :razz: [/edit]
Offline
The title bar isn't drawn by the application/Gtk+, it's drawn by your window manager, which is running as a regular user. The Gnome devs have been threatening to screw users over with 'client-side window decorations' (read: drawn by the application, using the widget toolkit) for ages but as of yet, nothing has materialised. You can't run multiple window managers at the same time, on a single X session so that's a no-go. As I've all ready stated, the closest you're going to find to your desired functionality is KDE's kwin/Qt4 magic, whereby the base Qt window widget provides the background for the window decoration, while the decoration itself is still drawn by Kwin.
The Gtk+ suggestion was to instead achieve something like this:
Offline
Aha that makes sense, thanks for your reply!
I think there's enough flexibility to create a visual reminder that I'm working as root (or whatever user).
Offline
Pages: 1
[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 532.23 KiB (Peak: 533.08 KiB) ]