How to set different window managers to different users under Linux

4

I want to restrict different users to different sets of window managers. For example,

  • user A: openbox, fluxbox

  • user B: openbox

  • user C: openbox, fluxbox, metacity

How can I do it?

Additional info: running debian 6 (squeeze).
I'd like to keep gdm too, but if it's not possible I will remove it.

Tem Pora

Posted 2013-05-18T09:49:01.427

Reputation: 258

Generally you could use the ~.xinitrc file for each user, but if you want to restrict it - then you may need to have the global one (I think in /etc/X11/xinit/xinitrc) check which user it is (bash syntax) and execute accordingly. Though, technically a user would still be able to make a local one that would override that. (I'm not on my computer to check for config files to ignore user defined) – nerdwaller – 2013-05-18T13:18:58.273

Answers

2

Remove the world execute permissions from the relevant programs in /usr/bin, then re-add them to specific users using either groups or ACLs.

Unfortunately, you cannot make gdm show different session lists for different users – it's still going to show Fluxbox and Metacity for everyone.

user1686

Posted 2013-05-18T09:49:01.427

Reputation: 283 655

for the time being, i'd remove gdm altogether, but getting gdm to show only available options would have been great. Based on the user-id entered, if gdm shows only the available WM options it would be great. – Tem Pora – 2013-05-18T14:56:42.677