Per-User X Windows System Screen Resolution Configuration

walterdnes-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org walterdnes-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sat Mar 15 17:25:58 UTC 2008


On Thu, Mar 13, 2008 at 04:52:19PM -0400, David C. Chipman wrote
> 	Hi all, 
> 
> 		Does anybody know of a way to have the screen
> resolution settings for X Windows change with a given user login?
> Thanks, 

  That question fits in with my sig <G>.  The answer is that the startx
command can pass options to the server, specifically everything after
the "--" delimiter.  One of the server options is "-config", i.e. the
config file to use for the session.  I have several config files set up

[m3000][waltdnes][~] ls -1 /etc/X11/*.conf
/etc/X11/320x200xorg.conf
/etc/X11/320x240xorg.conf
/etc/X11/384x240xorg.conf
/etc/X11/384x300xorg.conf
/etc/X11/480x300xorg.conf
/etc/X11/480x400xorg.conf
/etc/X11/640x400xorg.conf
/etc/X11/640x600xorg.conf
/etc/X11/960x600xorg.conf
/etc/X11/xorg.conf

  I have a simple script ~/bin/x like so...

#! /bin/bash
startx -- -nolisten tcp -nosilk -config ${1}xorg.conf &

  If I start with the command "x", it uses /etc/X11/xorg.conf, the
default, which is set up for my 1920x1200 screen.  If I start with the
command "x 960x600", it uses the file /etc/X11/960x600xorg.conf.  I have
the smaller sizes set up for Youtube, etal.  As long as you divide the
vertical and horizontal resolution by a whole number, the system does
not have to interpolate pixels, so video quality doesn't suffer.

  A cute trick is that you can *SIMULTANEOUSLY* launch startx as the
same or a different user, *AS LONG AS YOU SPECIFY A DIFFERENT SCREEN*.
The file ~/bin/x1 looks like so.  Note the ":1" to force screen :1

#! /bin/bash
startx -- :1 -nolisten tcp -nosilk -config ${1}xorg.conf &

  The simultaneous users can have different resolutions and/or colour
bit depths.  This is ideal for testing how a webpage looks at different
resolutions.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org>
I'm not repeating myself
I'm an X Window user...  I'm an ex-Windows-user
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list