Does `$DISPLAY` specify both a listening socket and a rendering target of a X server at the same time?












-3















From Can I specify an arbitrary `$DISPLAY`?




Do not confuse the actual display (your monitor(s)), the X11 server ("display"), and the way it's accessed via sockets or other means: DISPLAY=:0 and DISPLAY=localhost:10 as forwarded via ssh refer to the same display/xserver, the same video card, and the same monitor.




$DISPLAY is provided to start a X server.
Does $DISPLAY specify a listening socket and a rendering target of the X server at the same time? If yes, how does it manage to specify two different kinds of things?





  • $DISPLAY specifies a socket. For example if $DISPLAY is :40, it corresponds to a port 6040 or a unix domain socket named after 40.



    Is the socket which $DISPLAY specifies the listening socket of the X server?



  • Is $DISPLAY also supposed to specify a rendering target (i.e. a display device or its emulator on which the X server will render something)?



Is it correct that



X client <->  X server <-> rendering target


and a X client can't communicate with a rendering target directly but indirectly via a X server?



Thanks.










share|improve this question

























  • unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

    – 炸鱼薯条德里克
    yesterday











  • There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

    – 炸鱼薯条德里克
    yesterday











  • @炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

    – Tim
    1 hour ago













  • It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

    – 炸鱼薯条德里克
    12 mins ago













  • @炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

    – Tim
    4 mins ago
















-3















From Can I specify an arbitrary `$DISPLAY`?




Do not confuse the actual display (your monitor(s)), the X11 server ("display"), and the way it's accessed via sockets or other means: DISPLAY=:0 and DISPLAY=localhost:10 as forwarded via ssh refer to the same display/xserver, the same video card, and the same monitor.




$DISPLAY is provided to start a X server.
Does $DISPLAY specify a listening socket and a rendering target of the X server at the same time? If yes, how does it manage to specify two different kinds of things?





  • $DISPLAY specifies a socket. For example if $DISPLAY is :40, it corresponds to a port 6040 or a unix domain socket named after 40.



    Is the socket which $DISPLAY specifies the listening socket of the X server?



  • Is $DISPLAY also supposed to specify a rendering target (i.e. a display device or its emulator on which the X server will render something)?



Is it correct that



X client <->  X server <-> rendering target


and a X client can't communicate with a rendering target directly but indirectly via a X server?



Thanks.










share|improve this question

























  • unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

    – 炸鱼薯条德里克
    yesterday











  • There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

    – 炸鱼薯条德里克
    yesterday











  • @炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

    – Tim
    1 hour ago













  • It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

    – 炸鱼薯条德里克
    12 mins ago













  • @炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

    – Tim
    4 mins ago














-3












-3








-3








From Can I specify an arbitrary `$DISPLAY`?




Do not confuse the actual display (your monitor(s)), the X11 server ("display"), and the way it's accessed via sockets or other means: DISPLAY=:0 and DISPLAY=localhost:10 as forwarded via ssh refer to the same display/xserver, the same video card, and the same monitor.




$DISPLAY is provided to start a X server.
Does $DISPLAY specify a listening socket and a rendering target of the X server at the same time? If yes, how does it manage to specify two different kinds of things?





  • $DISPLAY specifies a socket. For example if $DISPLAY is :40, it corresponds to a port 6040 or a unix domain socket named after 40.



    Is the socket which $DISPLAY specifies the listening socket of the X server?



  • Is $DISPLAY also supposed to specify a rendering target (i.e. a display device or its emulator on which the X server will render something)?



Is it correct that



X client <->  X server <-> rendering target


and a X client can't communicate with a rendering target directly but indirectly via a X server?



Thanks.










share|improve this question
















From Can I specify an arbitrary `$DISPLAY`?




Do not confuse the actual display (your monitor(s)), the X11 server ("display"), and the way it's accessed via sockets or other means: DISPLAY=:0 and DISPLAY=localhost:10 as forwarded via ssh refer to the same display/xserver, the same video card, and the same monitor.




$DISPLAY is provided to start a X server.
Does $DISPLAY specify a listening socket and a rendering target of the X server at the same time? If yes, how does it manage to specify two different kinds of things?





  • $DISPLAY specifies a socket. For example if $DISPLAY is :40, it corresponds to a port 6040 or a unix domain socket named after 40.



    Is the socket which $DISPLAY specifies the listening socket of the X server?



  • Is $DISPLAY also supposed to specify a rendering target (i.e. a display device or its emulator on which the X server will render something)?



Is it correct that



X client <->  X server <-> rendering target


and a X client can't communicate with a rendering target directly but indirectly via a X server?



Thanks.







display x-server






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 41 mins ago







Tim

















asked yesterday









TimTim

27.7k78265483




27.7k78265483













  • unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

    – 炸鱼薯条德里克
    yesterday











  • There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

    – 炸鱼薯条德里克
    yesterday











  • @炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

    – Tim
    1 hour ago













  • It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

    – 炸鱼薯条德里克
    12 mins ago













  • @炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

    – Tim
    4 mins ago



















  • unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

    – 炸鱼薯条德里克
    yesterday











  • There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

    – 炸鱼薯条德里克
    yesterday











  • @炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

    – Tim
    1 hour ago













  • It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

    – 炸鱼薯条德里克
    12 mins ago













  • @炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

    – Tim
    4 mins ago

















unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

– 炸鱼薯条德里克
yesterday





unix.stackexchange.com/questions/503870/… So most phrases used in your question is meaningless. An X server is a display. Use the right syntax :40 or HOSTNAME:40, not 40. X client and X server communicates with X11 protocol(over TCP or UDS), not nessacarily sockets because some platform doesn't have it. For linux, sockets or any file can't be owned by a process, linux doesn't have this concept.

– 炸鱼薯条德里克
yesterday













There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

– 炸鱼薯条德里克
yesterday





There's no such thing called "socket addressing a display of a X server", nobody knows what do you mean, there's only address of a X server. X client and X server communicates with X11 protocol(over TCP or platform-dependent-IPC). $DISPLAY is an env that most X client can regonise and then connect to the desired address(they expect an X server running on that address). The sockets created by X server(on most posix platform) include listening sockets and connection sockets, of course they're differnet, see man7.org/linux/man-pages/man7/unix.7.html 's description of SOCK_STREAM.

– 炸鱼薯条德里克
yesterday













@炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

– Tim
1 hour ago







@炸鱼薯条德里克 Does $DISPLAY specify a socket and a rendering target at the same time? I have tried to update my post to clarify my questions.

– Tim
1 hour ago















It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

– 炸鱼薯条德里克
12 mins ago







It specifies an address and an X screen(assuming an X server listening on that address). It specifies neither a socket nor a render target.

– 炸鱼薯条德里克
12 mins ago















@炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

– Tim
4 mins ago





@炸鱼薯条德里克 "It specifies an address and an X screen". can the address be a socket? can the X screen be a rendering target (e.g. monitor)?

– Tim
4 mins ago










1 Answer
1






active

oldest

votes


















1















A X server is said to be started in a display




No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name.



Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number.



Many clients can connect to the same "socket" provided by a single server, so




Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"?




makes no sense.






share|improve this answer


























  • Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

    – 炸鱼薯条德里克
    yesterday











  • Thanks. I have tried to clarify my questions.

    – Tim
    2 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505996%2fdoes-display-specify-both-a-listening-socket-and-a-rendering-target-of-a-x-se%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1















A X server is said to be started in a display




No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name.



Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number.



Many clients can connect to the same "socket" provided by a single server, so




Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"?




makes no sense.






share|improve this answer


























  • Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

    – 炸鱼薯条德里克
    yesterday











  • Thanks. I have tried to clarify my questions.

    – Tim
    2 hours ago
















1















A X server is said to be started in a display




No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name.



Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number.



Many clients can connect to the same "socket" provided by a single server, so




Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"?




makes no sense.






share|improve this answer


























  • Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

    – 炸鱼薯条德里克
    yesterday











  • Thanks. I have tried to clarify my questions.

    – Tim
    2 hours ago














1












1








1








A X server is said to be started in a display




No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name.



Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number.



Many clients can connect to the same "socket" provided by a single server, so




Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"?




makes no sense.






share|improve this answer
















A X server is said to be started in a display




No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name.



Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number.



Many clients can connect to the same "socket" provided by a single server, so




Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"?




makes no sense.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









dirktdirkt

17.3k31337




17.3k31337













  • Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

    – 炸鱼薯条德里克
    yesterday











  • Thanks. I have tried to clarify my questions.

    – Tim
    2 hours ago



















  • Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

    – 炸鱼薯条德里克
    yesterday











  • Thanks. I have tried to clarify my questions.

    – Tim
    2 hours ago

















Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

– 炸鱼薯条德里克
yesterday





Please don't say Unix domain ports, just path or address of Unix domain sockets. It confuses people, uds doesn't have the concept "port"

– 炸鱼薯条德里克
yesterday













Thanks. I have tried to clarify my questions.

– Tim
2 hours ago





Thanks. I have tried to clarify my questions.

– Tim
2 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505996%2fdoes-display-specify-both-a-listening-socket-and-a-rendering-target-of-a-x-se%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Histoire des bourses de valeurs

Why is there Russian traffic in my log files?

Rename multiple files to decrement number in file name?