LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-01-2005, 05:39 PM   #1
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Rep: Reputation: 15
X display resolution after logout


Since I changed my default runlevel to 4, I'm experiencing new challenges...

Now, this is the problem: Most users of this computer are using 1280x960px as default. This is the first setting in xorg.conf. However, one user (cila) is visually impaired and uses 1024x768 + gnome.

Every time cila logs in, the screen resolution is reduced to 1024x768 (as set up in gnome prefs). But after logout, XDM keeps 1024x768. And the next user is obliged to stay with this low resolution until pressing <CTRL><ALT><-> to get 1280x960.

This is not a problem with XDM, because also happens with KDM.

How to make the resolution go back to 1280x960 after cila logout?

Tks

amwink
 
Old 04-03-2005, 07:58 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
make XDM run the command to set the resolution? (randr was it?)
 
Old 04-04-2005, 04:17 PM   #3
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for your help, but I must confess I didn't understand it... Could you be more clear? Thanks again.
 
Old 04-04-2005, 05:07 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
was just a question .....

XDM can be configured to run programs when its used, you could have it execute a program to change the screen resolution.

look at /etc/X11/xdm/Xsetup (could be a different name, depending on distro)

that file is ran every time XDM is ran, so by adding a command to change the resolution, it should change the resolution to whatever, every time XDM is ran ...... i should fix that resolution problem of yours
 
Old 04-04-2005, 09:15 PM   #5
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
I understand now! Thanks for your patience...

The idea is really good. In fact, if I put a command to set the resoluton to 1280x960 whenever XDM starts, every user will be using this higher resolution, unless a personal configuration overrides it (as cila has set up her gnome to adapt it to her needs).

In Slack, the file to put this command (or a script) is /etc/X11/xdm/Xsetup_0 (similar to the path you suggested).

But, which command? I have absolutely no idea...

Linuxers, please help me !

Thanks a lot!!
 
Old 04-04-2005, 09:20 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
randr i think will change resolutions, but i really don't know what command, as i never changed resolution before using commands
 
Old 04-04-2005, 09:34 PM   #7
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
I think what you're looking for changing the resolution is (SciYro was close): xrandr
To change the resolution just type something like: xrandr -s 1024x768
You can find more info on it's man page.

Last edited by gbonvehi; 04-04-2005 at 09:36 PM.
 
Old 04-04-2005, 09:38 PM   #8
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
Tks again.

I've just googled a bit and found this http://keithp.com/~keithp/talks/randr/.

Also, I found some references to 'xrandr' as a way to invoke randr. There's a man page for xrandr, and typing '/usr/X11R6/bin/xrandr -h' gives some more information.

I'm very optimistic and will try to set it up tomorrow. I'll post the result here.

amwink

EDIT: I'm very slow...
 
Old 04-05-2005, 08:22 PM   #9
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
I put 'xrandr -s 1280x960' in my /etc/X11/xdm/Xsetup_0. It did not work at first. I did some tests and found something unexpected:

1) If I choose a lower resolution via xrandr (e.g. 800x600), when I quit a session (logout), the XDM screen is 800x600, even if I were using 1024x768 inside gnome.

2) If I choose higher resolution (as 1280x960, as I need), then XDM keeps using the lower resolution of the user (in this case 1024x768 from gnome prefs). The only way I found to put XDM in 1280x960 in this case was killing X with <CTRL><ALT><BKSPC>. It appears that xrandr only works if the resolution is becoming smaller.

However, if I log in as root, open a terminal and change the resolution via xrandr directly at the command prompt, it works 'on the fly' for almost any resolution from 320x200(!) up to 1280x960.

Very strange, isn't it?

As a workaround I'm considering changing the size of fonts and icons of gnome to make everything bigger and convince cila to use 1280x960 instead of 1024x760, even though the fonts inside applications (as AbiWord) will still appear small for her... I'm accepting other suggestions.

amwink
 
Old 04-05-2005, 08:40 PM   #10
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
How about putting: xrandr -s 1024x760 in her ~/.xsession file (create it if it doesn't exist). For more info take a look at man xdm.
 
Old 04-05-2005, 09:10 PM   #11
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for your suggestion. I haven't thought about .xsession before.

I did it. Immediately after login, xrandr changes the resolution for gnome, but when the session is finished, the XDM keeps using this lower resolution

amwink
 
Old 04-05-2005, 09:18 PM   #12
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
You should get more info about this, I don't know how to use it, but seems to be the place to "reset" your resolution.
From xdm man page:
Quote:
RESET PROGRAM
Symmetrical with Xstartup, the Xreset script is run after the user session has terminated. Run as root, it should contain com_
mands that undo the effects of commands in Xstartup, removing entries from /etc/utmp or unmounting directories from file servers.
The environment variables that were passed to Xstartup are also passed to Xreset.
 
Old 04-05-2005, 09:34 PM   #13
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
I see the point. I will create a Xreset (maybe Xreset_0?), but only tomorrow and will post the results here. I have no more time today.

amwink

PS: The users of this forum are all sources of wisdom and creativity. Thank you very much!
 
Old 04-05-2005, 10:07 PM   #14
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
It seems i've just hit the way you can use the Xreset function. I was reading the man page here: http://linuxreviews.org/man/xdm/
When I saw there was a xdm-config file, in Slackware of course, it's located where it should be, as the man page said: /usr/X11R6/lib/X11/xdm/xdm-config

There it's where you can set Xreset (and others also), you can change the line:
Code:
DisplayManager._0.reset:        /usr/X11R6/lib/X11/xdm/TakeConsole
To something like:
Code:
DisplayManager._0.reset:        /usr/X11R6/lib/X11/xdm/yourscript
Where the content of yourscript (make this file executable) may be something like:
Code:
#!/bin/sh
xrandr -s 1280x960
/usr/X11R6/lib/X11/xdm/TakeConsole
PS: I like helping people because they usually teach me

Last edited by gbonvehi; 04-05-2005 at 10:15 PM.
 
Old 04-07-2005, 06:35 PM   #15
amwink
Member
 
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
The instructions above worked PERFECTLY!

Thank you very much!! ¡gracias!

amwink



EDIT: I just had to put the absolute path for xrandr because its dir is not in my PATH:

Code:
#!/bin/sh
/usr/X11R6/bin/xrandr -s 1280x960
/usr/X11R6/lib/X11/xdm/TakeConsole

Last edited by amwink; 04-07-2005 at 06:52 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display resolution help saiz66 Slackware 10 10-20-2005 11:08 PM
display resolution dhlawrence Linux - General 2 09-16-2005 07:27 PM
Display resolution-help needed prh Mandriva 5 08-16-2005 02:40 AM
RedHat 7.3 / How to change resolution & how to logout and into a terminal fleshwound Linux - Software 1 07-09-2003 07:22 AM
display resolution Jenifer Linux - Newbie 4 04-23-2001 10:24 PM


All times are GMT -5. The time now is 05:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration