Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-10-06 05:52:29

pdk
Member
Registered: 2010-10-06
Posts: 3

make window-appearance depend on user

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

#2 2010-10-06 13:15:01

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: make window-appearance depend on user

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

#3 2010-10-06 14:57:43

pdk
Member
Registered: 2010-10-06
Posts: 3

Re: make window-appearance depend on user

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

#4 2010-10-06 15:20:49

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: make window-appearance depend on user

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:

http://ompldr.org/vNXFubA/Screenshot-2.png

Offline

#5 2010-10-06 15:47:58

pdk
Member
Registered: 2010-10-06
Posts: 3

Re: make window-appearance depend on user

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

Board footer

Powered by FluxBB