LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 01-31-2008, 05:40 PM   #1
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Question 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.
 
Old 02-01-2008, 06:41 PM   #2
axobeauvi
Member
 
Registered: Apr 2003
Posts: 128

Rep: Reputation: 16
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
 
Old 02-01-2008, 08:44 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Original Poster
Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by axobeauvi View Post
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.
 
Old 02-01-2008, 10:39 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 69
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 ...
 
Old 03-02-2008, 07:38 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Did you solve the problem?

What worked?

(Do you need more help?)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
spanning display across two monitors using xinerama selva_irtt Linux - Software 0 10-16-2007 08:34 AM
Changing desktop resolution on Debian 4.0 with Xorg and KDE pmikec Linux - Desktop 14 04-11-2007 11:14 AM
Debian: how to setup a higher display resolution? pvv Linux - Newbie 3 09-02-2005 12:38 PM
New Debian laptop user, need help with sound and display boricuamason Debian 12 03-14-2005 12:11 PM
Debian Display resolution incorrect... Mal495 Linux - General 8 11-26-2003 11:44 PM


All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration