pokey@well.UUCP (Jef Poskanzer) (02/24/88)
In the referenced message, karlton@decwrl.UUCP (Philip Karlton) wrote: }I noticed that the program uses the constant string "unix:0" to attempt to }connect to the local X11 server. You may be better served by using just ":0". }If the bug, excuse me, feature, in Xlib that prevents a node name from being }"unix" is ever fixed, the former will stop working. Yeah, I've been changing all the servers I maintain so that "localhost:0" works instead. Of course, my reason was a little different -- I wanted to be able to use the same DISPLAY setting for both BSD and SysV systems. But it's not very likely that anyone would have a machine named "localhost", so this would work for you, and is perhaps prettier than ":0". --- Jef Jef Poskanzer jef@lbl-rtsg.arpa ...well!pokey "The tongue can no man tame; it is an unruly evil." -- The Epistle of James
leres@cory.Berkeley.EDU (Craig Leres) (02/27/88)
In the referenced message, pokey@well.UUCP (The Party Commander) wrote: > works instead. Of course, my reason was a little different -- I wanted to > be able to use the same DISPLAY setting for both BSD and SysV systems. > But it's not very likely that anyone would have a machine named "localhost", You can certainly use "localhost:0" instead of "unix:0", but this will cause you to use an internet domain socket instead of a Unix domain socket to talk to the X server. And an internet socket to localhost isn't always as fast as a Unix domain socket. A better solution is to make "unix:0" mean "localhost:0" on systems that don't have Unix domain sockets. Also, "localhost" is the internet name of the current host. So anyone with Unix system with internet code has a machine named "localhost". Craig
pokey@well.UUCP (Jef Poskanzer) (02/28/88)
In the referenced message, leres@ucbarpa.Berkeley.EDU (Captain Happy) wrote: }You can certainly use "localhost:0" instead of "unix:0", but this will }cause you to use an internet domain socket instead of a Unix domain }socket to talk to the X server. And an internet socket to localhost }isn't always as fast as a Unix domain socket. I think you misunderstood what I did. I hacked the X server so that "localhost:0" did what "unix:0" normally does: used the Unix domain on systems that support Unix domain. And on SysV, all that code was ifdef'ed out, so the same DISPLAY string got me an Internet socket. }A better solution is to }make "unix:0" mean "localhost:0" on systems that don't have Unix domain }sockets. This will work too. But if you do it this way, you can't connect to a host named "unix", as Phildo pointed out. If you do it my way, the only capability you lose is getting an Internet domain socket to localhost when a superior Unix domain socket is available. A smaller price, I think. --- Jef Jef Poskanzer jef@lbl-rtsg.arpa ...well!pokey "A man's got to know his limitations." -- Harry Callahan
louie@trantor.umd.edu (Louis A. Mamakos) (02/29/88)
Since host names are not case sensitive, why not use UNIX:0 when referring to a host on your network called `unix' (not a real wonderfull name, in my opinion). Alternatively, you could use `unix.my.domain:0' in the domainified syntax. All this should work without changing a line of code. Don't make the existing interface work differently for no good reason. louie Louis A. Mamakos WA3YMH Internet: louie@TRANTOR.UMD.EDU University of Maryland, Computer Science Center - Systems Programming
pokey@well.UUCP (Jef Poskanzer) (02/29/88)
In the referenced message, louie@trantor.umd.edu (Louis A. Mamakos) wrote: }Since host names are not case sensitive, why not use UNIX:0 when referring }to a host on your network called `unix' (not a real wonderfull name, in }my opinion). Alternatively, you could use `unix.my.domain:0' in the }domainified syntax. } }All this should work without changing a line of code. Don't make the existing }interface work differently for no good reason. Yes, this solves Phil's problem of not being able to access a machine called unix. But it does nothing for my problem of wanting to use the same DISPLAY string for local access on both SysV and BSD machines. I don't see how I can do that without hacking code. --- Jef Jef Poskanzer jef@lbl-rtsg.arpa ...well!pokey "He's like a function -- he returns a value, in the form of his opinion. It's up to you to cast it into a void or not." -- Phil Lapsley
karlton@decwrl.dec.com (Philip Karlton) (03/01/88)
In article <5334@well.UUCP> pokey@well.UUCP (Jef Poskanzer) writes: > >Yes, this solves Phil's problem of not being able to access a machine >called unix. But it does nothing for my problem of wanting to use the >same DISPLAY string for local access on both SysV and BSD machines. >I don't see how I can do that without hacking code. I am confused. Why not just use ":0" to mean "use the most efficient means of talking to the local host"? For BSD based systems, this will probably be a UNIX domain socket. For those that have implemented a shared memory communicaiton channel, that will be used. PK