Display resolution per user (xinerama, KDE, Debian)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Display resolution per user (xinerama, KDE, Debian)
I have a two monitor system using xinerama.
A few different people use it and don't agree about the best resolutions for the monitors.
Is there a practical way to make the resolution automatically switch when someone logs in?
One monitor is on an ATI interface, the other Nvidia. So I don't think there are alternatives to xinerama that preserve the ability to move a window to the other monitor after opening it.
So far as I understand, you can't change the resolution while xinerama is running. Please correct me if that is wrong. That fact increases both the need for the feature I'm requesting and the difficulty of doing it.
I have a rough idea of how it might be done, see below. Of course please tell me if there is an easier way. And/or tell me if this idea is fundamentally flawed. Otherwise, I'd appreciate some guidance with a few of the details. I'm still a newbie, so I'm missing a lot of basic knowledge.
0) I'm using Debian with KDE at the moment on that system. I'll probably switch to Mepis with KDE at some point soon. I expect the choice of Debian and KDE determines where some of things I'm about to ask about are located. (I expect/hope the switch to Mepis won't change that much).
1) I'm sure there is (or could be) a script that runs when each user logs in. I don't know what keyword to search for to start to look for documentation on that.
2) I expect I can learn enough of the shell language to write something to detect if the setting is already correct for the current user. If necessary I can leave some file around that matches the display state (easier, but less elegant than actually interrogating the display state).
3) Assuming the state is wrong, the script could create some files, to make steps 5 and 7 work correctly and if necessary to tell the repeat of step 2 than things are now OK.
4) I assume there is something the script could do to stop KDE and enough (KDM? X?) above it to allow the resolution to be changed. I expect that needs to happen as root. I don't know enough about things like sudo to accomplish that. But I think I know where to research it (assuming "sudo" is the right thing to research).
5) I hope/expect that whatever originally started the thing stopped by step 4 was a script. I think that script could be waiting for whatever it is to stop (again no clue how). Then it could check whether step 3 has happened. If so it would go on to step 6 instead of whatever it normally would do (if anything) when KDM etc. go away.
6) Delete part of what step 3 did, so step 5 would decide the other way in case next time through is a normal shutdown of KDM.
7) Restart the display using different parameters for resolution and forcing the correct user to be pre logged in, so he won't need to type his password again. I could fix the display parameters most easily by copying in a whole new xorg.conf. I expect there is a cleaner way, but that would take research. I have no clue how to make it pre login a user without password. I'm just guessing that is possible.
do you really need 2 video cards?
I know if you use 1 and a splitter you can set it to "dual head" mode
this might make it easier to set.
also I believe there is a program built into gnome for this (I know you said you use KDE ,but you might be able to use the same program) it's called "gnome-display-properties"
it's worth a shot
So that every time the user types in startx to start the Xsession once logged in they will have their own custom file used. YOu may want to check the format/permissions needed of the file as I am jsut going by what I have read elsewhere. Oh to force a console login delete/rename the link to the display manager being used in the /etc/rc2.d directory usually S99kdm or S99gdm ...