Whats te model with Display's and Screens - Xwindows
This is a discussion on Whats te model with Display's and Screens - Xwindows ; I am relatively new to X and cannot find anything describing the basic model
regardings Displays and Screens.
Anyone give me a basic grounding here ?
Many thanks in advance,
Aaron...
-
Whats te model with Display's and Screens
I am relatively new to X and cannot find anything describing the basic model
regardings Displays and Screens.
Anyone give me a basic grounding here ?
Many thanks in advance,
Aaron
-
Re: Whats te model with Display's and Screens
In comp.windows.x, Aaron Gray
wrote
on Sat, 7 Jun 2008 22:00:39 +0100
<6b0b7oF37qa68U1@mid.individual.net>:
> I am relatively new to X and cannot find anything describing the basic model
> regardings Displays and Screens.
>
> Anyone give me a basic grounding here ?
>
> Many thanks in advance,
>
> Aaron
>
Well, in brief, one opens a (connection to, actually)
Display, which can contain one or more Screens. Each
Screen has a root Window; this root is the parent of
all top level Windows, although the Window manager has
the option of reparenting a Window, basically putting
the application's Window underneath a Window of its
own, then decorating its Window with whatever it deems
attractive/necessary/useful, such as close buttons, title
bars, etc.
(This isn't usually an issue unless one wants to try
to get a list of such windows -- and most applications
maintain their own list of windows.)
If one is working with raw X (rare nowadays, as a lot of
people will instead work within KDE or Gnome widget sets),
one can do things such as the following:
Display * dpy = XOpenDisplay("host:d.s");
where 'd' and 's' are numbers, and 'host' is the hostname;
for most systems 'host' is localhost and both d and s are 0.
= XOpenDisplay(NULL);
will open a "default" display, specified by the environment
variable DISPLAY. (The user will rarely have to touch
this variable if he logs in through xdm, gdm, or kdm --
or, to put it in a more user-friendly fashion, if he logs
in through a login display widget. Most Linux boxes are
set up with such a login widget.)
int scr = DefaultScreen(dpy);
Screen * scrp = ScreenOfDisplay(dpy, scr);
Window root = RootWindowOfScreen(scrp);
= RootWindow(dpy, scr);
= DefaultRootWindow(dpy);
Once one has the root window, one can open a window
using XCreateSimpleWindow() or XCreateWindow().
That should get you started; for further notions I'll
refer you to the O'Reilly X Window System manuals, or
the manual pages (e.g. 'man XCreateSimpleWindow').
--
#191, ewill3@earthlink.net
Q: "Why is my computer doing that?"
A: "Don't do that and you'll be fine."
** Posted from http://www.teranews.com **
-
Re: Whats te model with Display's and Screens
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Ghost" == The Ghost In The Machine writes:
Ghost> In comp.windows.x, Aaron Gray
Ghost>
Ghost> wrote
Ghost> on Sat, 7 Jun 2008 22:00:39 +0100
Ghost> <6b0b7oF37qa68U1@mid.individual.net>:
>> I am relatively new to X and cannot find anything describing the basic model
>> regardings Displays and Screens.
>>
>> Anyone give me a basic grounding here ?
>>
>> Many thanks in advance,
>>
>> Aaron
>>
Ghost> Well, in brief, one opens a (connection to, actually)
Ghost> Display, which can contain one or more Screens. Each
Ghost> Screen has a root Window; this root is the parent of
Ghost> all top level Windows, although the Window manager has
Ghost> the option of reparenting a Window, basically putting
Ghost> the application's Window underneath a Window of its
Ghost> own, then decorating its Window with whatever it deems
Ghost> attractive/necessary/useful, such as close buttons, title
Ghost> bars, etc.
Ghost> (This isn't usually an issue unless one wants to try
Ghost> to get a list of such windows -- and most applications
Ghost> maintain their own list of windows.)
Ghost> If one is working with raw X (rare nowadays, as a lot of
Ghost> people will instead work within KDE or Gnome widget sets),
Ghost> one can do things such as the following:
Ghost> Display * dpy = XOpenDisplay("host:d.s");
Ghost> where 'd' and 's' are numbers, and 'host' is the hostname;
Ghost> for most systems 'host' is localhost and both d and s are 0.
Thanks for the above explanation. I wonder how one can create a new
screen on an existing display. Do I need multi-head display for that ?
If yes, does Xinerama needs to be setup to do that ? Or I can simply do
that with the plug-and-play display feature provided by recent RandR
1.2, as mentioned in the Intel DualHead setup document[1].
References:
[1] - http://www.intellinuxgraphics.org/dualhead.html
Thanks
- --
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkhPeA8ACgkQHy+EEHYuXnTxWwCfbLrMCK9lki pVyV824xWL39+j
LY4AoN31ktSkeEpmEnNOt4NEEd14oes0
=mgCr
-----END PGP SIGNATURE-----
-
Re: Whats te model with Display's and Screens
In comp.windows.x, Ashish Shukla ???? ?????
wrote
on Wed, 11 Jun 2008 12:30:31 +0530
<87od68e9rk.fsf@chateau.d.lf>:
>
>>>>>> "Ghost" == The Ghost In The Machine writes:
>
> Ghost> In comp.windows.x, Aaron Gray
> Ghost>
> Ghost> wrote
> Ghost> on Sat, 7 Jun 2008 22:00:39 +0100
> Ghost> <6b0b7oF37qa68U1@mid.individual.net>:
> >> I am relatively new to X and cannot find anything describing the basic model
> >> regardings Displays and Screens.
> >>
> >> Anyone give me a basic grounding here ?
> >>
> >> Many thanks in advance,
> >>
> >> Aaron
> >>
>
> Ghost> Well, in brief, one opens a (connection to, actually)
> Ghost> Display, which can contain one or more Screens. Each
> Ghost> Screen has a root Window; this root is the parent of
> Ghost> all top level Windows, although the Window manager has
> Ghost> the option of reparenting a Window, basically putting
> Ghost> the application's Window underneath a Window of its
> Ghost> own, then decorating its Window with whatever it deems
> Ghost> attractive/necessary/useful, such as close buttons, title
> Ghost> bars, etc.
>
> Ghost> (This isn't usually an issue unless one wants to try
> Ghost> to get a list of such windows -- and most applications
> Ghost> maintain their own list of windows.)
>
> Ghost> If one is working with raw X (rare nowadays, as a lot of
> Ghost> people will instead work within KDE or Gnome widget sets),
> Ghost> one can do things such as the following:
>
> Ghost> Display * dpy = XOpenDisplay("host:d.s");
>
> Ghost> where 'd' and 's' are numbers, and 'host' is the hostname;
> Ghost> for most systems 'host' is localhost and both d and s are 0.
>
> Thanks for the above explanation. I wonder how one can create a new
> screen on an existing display. Do I need multi-head display for that ?
> If yes, does Xinerama needs to be setup to do that ? Or I can simply do
> that with the plug-and-play display feature provided by recent RandR
> 1.2, as mentioned in the Intel DualHead setup document[1].
The displays and screens are associated with the server. I have a
laptop and haven't gotten around to setting it up properly myself;
the external monitor works as does the internal display, which is
acceptable to me personally but in theory I could get both to work.
>
> References:
> [1] - http://www.intellinuxgraphics.org/dualhead.html
>
> Thanks
> - --
> Ashish Shukla ???? ????? http://wahjava.wordpress.com/
> -- - --- - - - --- -- -- - - --- -- --- --
--
#191, ewill3@earthlink.net
GNU and improved.
** Posted from http://www.teranews.com **
-
Re: Whats te model with Display's and Screens
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> The Ghost In The Machine writes:
[snip]
Ghost> The displays and screens are associated with the server. I havea
Ghost> laptop and haven't gotten around to setting it up properly myself;
Ghost> the external monitor works as does the internal display, which is
Ghost> acceptable to me personally but in theory I could get both to work.
So that means, one requires a multi-head display for that, right ?
- --
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
iEYEARECAAYFAkhQCUEACgkQHy+EEHYuXnSKbgCfe4mcTNJFav 6AYLac3YTbm9EU
O4UAn3zfwQhCFwoNNmFk57ChMKwXu87Y
=fvL7
-----END PGP SIGNATURE-----
-
Re: Whats te model with Display's and Screens
In comp.windows.x, Ashish Shukla ???? ?????
wrote
on Wed, 11 Jun 2008 22:49:57 +0530
<864p7z3n42.fsf@chateau.d.lf>:
>
>>>>>> The Ghost In The Machine writes:
>
> [snip]
>
> Ghost> The displays and screens are associated with the server. I have a
> Ghost> laptop and haven't gotten around to setting it up properly myself;
> Ghost> the external monitor works as does the internal display, which is
> Ghost> acceptable to me personally but in theory I could get both to work.
>
> So that means, one requires a multi-head display for that, right ?
Most laptops have an external VGA connector; that makes them
multi-head.
>
> - --
> Ashish Shukla ???? ????? http://wahjava.wordpress.com/
> -- - --- - - - --- -- -- - - --- -- --- --
--
#191, ewill3@earthlink.net
Windows. When it absolutely, positively, has to crash.
** Posted from http://www.teranews.com **
-
Re: Whats te model with Display's and Screens
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> The Ghost In The Machine writes:
Ghost> In comp.windows.x, Ashish Shukla ???? ?????
Ghost>
Ghost> wrote
Ghost> on Wed, 11 Jun 2008 22:49:57 +0530
Ghost> <864p7z3n42.fsf@chateau.d.lf>:
>>
>>>>>>> The Ghost In The Machine writes:
>>
>> [snip]
>>
Ghost> The displays and screens are associated with the server. I havea
Ghost> laptop and haven't gotten around to setting it up properly myself;
Ghost> the external monitor works as does the internal display, which is
Ghost> acceptable to me personally but in theory I could get both to work.
>>
>> So that means, one requires a multi-head display for that, right ?
Ghost> Most laptops have an external VGA connector; that makes them
Ghost> multi-head.
So, if instead of doing clone desktop, I do spanning desktop, then that
will be considered as a display with two screens, :0.0, and :0.1, right
? And to start a windowed app on :0.1, I simply set DISPLAY to :0.1, and
launch the application, right ?
TIA
- --
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkhSQ3IACgkQHy+EEHYuXnRj9wCePF9nJ0ORx8 10gM8mlgOkw1RU
6BMAn23nhkW7a7TheV41I5+OhbfZDNSj
=TLMc
-----END PGP SIGNATURE-----
-
Re: Whats te model with Display's and Screens
In comp.windows.x, Ashish Shukla ???? ?????
wrote
on Fri, 13 Jun 2008 15:22:46 +0530
<87bq251x1t.fsf@chateau.d.lf>:
>
>>>>>> The Ghost In The Machine writes:
>
>
> Ghost> In comp.windows.x, Ashish Shukla ???? ?????
> Ghost>
> Ghost> wrote
> Ghost> on Wed, 11 Jun 2008 22:49:57 +0530
> Ghost> <864p7z3n42.fsf@chateau.d.lf>:
> >>
> >>>>>>> The Ghost In The Machine writes:
> >>
> >> [snip]
> >>
> Ghost> The displays and screens are associated with the server. I have a
> Ghost> laptop and haven't gotten around to setting it up properly myself;
> Ghost> the external monitor works as does the internal display, which is
> Ghost> acceptable to me personally but in theory I could get both to work.
> >>
> >> So that means, one requires a multi-head display for that, right ?
>
> Ghost> Most laptops have an external VGA connector; that makes them
> Ghost> multi-head.
>
> So, if instead of doing clone desktop, I do spanning desktop, then that
> will be considered as a display with two screens, :0.0, and :0.1, right
> ? And to start a windowed app on :0.1, I simply set DISPLAY to :0.1, and
> launch the application, right ?
I'll admit I don't know the precise nomenclature used by your distro,
but assuming you can get the second screen working, you should be able
to open a window on it using
DISPLAY=localhost:0.1 tool
where tool is whatever word processor one wishes.
>
> TIA
> - --
> Ashish Shukla ???? ????? http://wahjava.wordpress.com/
> -- - --- - - - --- -- -- - - --- -- --- --
--
#191, ewill3@earthlink.net
Warning: This encrypted signature is a dangerous munition.
Please notify the US government immediately upon reception.
0000 0000 0000 0000 0001 0000 0000 0000 ...
** Posted from http://www.teranews.com **
-
Re: Whats te model with Display's and Screens
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> The Ghost In The Machine writes:
Ghost> In comp.windows.x, Ashish Shukla ???? ?????
Ghost>
Ghost> wrote
Ghost> on Fri, 13 Jun 2008 15:22:46 +0530
Ghost> <87bq251x1t.fsf@chateau.d.lf>:
[snip]
>>
>> So, if instead of doing clone desktop, I do spanning desktop, then that
>> will be considered as a display with two screens, :0.0, and :0.1, right
>> ? And to start a windowed app on :0.1, I simply set DISPLAY to :0.1,and
>> launch the application, right ?
Ghost> I'll admit I don't know the precise nomenclature used by your distro,
Ghost> but assuming you can get the second screen working, you should be able
Ghost> to open a window on it using
Okay, I tried setting up multiple screens on my notebook (which has
'intel' graphics) using xrandr 1.2[1], and I'm successful in setting up
that, but still I'm not able to get any screen 1. Do I need Xinerama for
this or a simple static configuration will do.
References:
[1] - http://www.intellinuxgraphics.org/dualhead.html
TIA
- --
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkhUSocACgkQHy+EEHYuXnSEzQCgs4dBM4EVhy urIbonvRAVQXfI
HHAAoNTjrAYDc0oH/Ml6sl5QS0Jh4qnI
=mKgq
-----END PGP SIGNATURE-----
-
Re: Whats te model with Display's and Screens
On 2008-06-11, Ashish Shukla ???? ????? wrote:
> Thanks for the above explanation. I wonder how one can create a new
> screen on an existing display. Do I need multi-head display for that ?
> If yes, does Xinerama needs to be setup to do that ? Or I can simply do
> that with the plug-and-play display feature provided by recent RandR
> 1.2, as mentioned in the Intel DualHead setup document[1].
In general, when you have multiple screens, you set up your X server to
also have multiple screens. The naming convention is accurate in that
respect 
For instance, I have two monitors connected to my computer. I'm using
X.org so I've setup xorg.conf to contain two "device" sections (for the
two heads of my graphics board), two "monitor" sections, and two
"screen" sections referencing the above. Then my "serverlayout" section
contains something like:
Section "ServerLayout"
...
Screen 0 "Scr0"
Screen 1 "Scr1" RightOf "Scr0"
...
EndSection
This results in an environment where I may specify by using the DISPLAY
environment variable where to place windows. :0.0 means the monitor to
my left, :0.1 means the monitor to my right. That's two X screens, two
root windows, with their own hierarchy of windows beneath them, and so
on.
I've never used xinerama, but if I'm not mistaken it creates a single X
screen shared by the multiple monitors. So you'd have a single :0.0 and
place windows here and there by simply moving them. I personally don't
like that.
Also I've no idea what RandR does wrt. multiple heads so I can't help
you there.
--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/
-
Re: Whats te model with Display's and Screens
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
,--- John Tsiombikas writes:
| On 2008-06-11, Ashish Shukla ???? ????? wrote:
|| Thanks for the above explanation. I wonder how one can create a new
|| screen on an existing display. Do I need multi-head display for that ?
|| If yes, does Xinerama needs to be setup to do that ? Or I can simply do
|| that with the plug-and-play display feature provided by recent RandR
|| 1.2, as mentioned in the Intel DualHead setup document[1].
| In general, when you have multiple screens, you set up your X server to
| also have multiple screens. The naming convention is accurate in that
| respect 
| For instance, I have two monitors connected to my computer. I'm using
| X.org so I've setup xorg.conf to contain two "device" sections (for the
| two heads of my graphics board), two "monitor" sections, and two
| "screen" sections referencing the above. Then my "serverlayout" section
| contains something like:
Does your "Device" sections specifies two different PCI bus IDs, hmmm..?
| Section "ServerLayout"
| ...
| Screen 0 "Scr0"
| Screen 1 "Scr1" RightOf "Scr0"
| ...
| EndSection
Thanks for the above. I guess, thats the only way to achieve this. I've
not tried this yet, but will try that.
| This results in an environment where I may specify by using the DISPLAY
| environment variable where to place windows. :0.0 means the monitor to
| my left, :0.1 means the monitor to my right. That's two X screens, two
| root windows, with their own hierarchy of windows beneath them, and so
| on.
| I've never used xinerama, but if I'm not mistaken it creates a single X
| screen shared by the multiple monitors. So you'd have a single :0.0 and
| place windows here and there by simply moving them. I personally don't
| like that.
| Also I've no idea what RandR does wrt. multiple heads so I can't help
| you there.
xrandr allows dynamically add multiple monitors to the same screen,
which is not similar to having multiple screens on multiple monitors.
Thanks
- --
Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkhetycACgkQHy+EEHYuXnRgKwCeKSil+eRcJm O3qX1dpTFImaBV
b2EAnjzqA0qPUsvIRxyqCQj68NI6l1/b
=WUr3
-----END PGP SIGNATURE-----