LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display resolution per user (xinerama, KDE, Debian) (https://www.linuxquestions.org/questions/linux-newbie-8/display-resolution-per-user-xinerama-kde-debian-617773/)

johnsfine 01-31-2008 04:40 PM

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.

axobeauvi 02-01-2008 05:41 PM

2 video cards?
 
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

johnsfine 02-01-2008 07:44 PM

Quote:

Originally Posted by axobeauvi (Post 3042968)
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.

I guess buying a new card is an option. But I'd rather not. The display interfaces I have now do not allow dual head.

HappyTux 02-01-2008 09:39 PM

My idea every person gets a console login then I believe it is the .xinitrc file in the users directory you would put something like this in it.

Code:

rm -f /etc/X11/xorg.conf
cp /home/user_name/.xorg.conf /etc/X11/xorg.conf
startkde

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 ...

archtoad6 03-02-2008 06:38 AM

Did you solve the problem?

What worked?

(Do you need more help?)


All times are GMT -5. The time now is 04:22 AM.