Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-22 13:07, Rob [EMAIL PROTECTED] wrote: On Wed, 22 Feb 2006 20:27:20 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. Thanks Giorgios, I think that I have the hostname problem resolved. rc.conf has hostname=xenon and /etc/hosts has: 127.0.0.1 localhost xenon That's quite fine :) So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Just a wild guess, since I don't see why you should have problems running programs like: Can't open display: xenon:0.0 Are you running X11 as a plain user and having problems to run programs *after* using su(1) to become root or does this happen for all users in all terminals? - Giorgos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
Rob wrote: On Wed, 22 Feb 2006 20:27:20 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: On 2006-02-22 10:17, Rob [EMAIL PROTECTED] wrote: I have been trying to figure out how to set the display name on my computer. I have a program used with Xorg that gives me the error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 also when starting or stopping Xorg I either get: bad display name xenon:0 in remove commandor bad display name xenon:0 in list command Your laptop can't resolve the name xenon. I have my XDISPLAY env variable set using (in Bash): DISPLAY=xenon:0.0 export DISPLAY xenon is the name of the machine I think part of the problem is the setting of the hostname. This laptop runs off of DHCP and I am not really sure about what I should do for setting the hostname. The manual says to set HOSTNAME= in rc.conf if using DHCP, but then I get the amnesiac message upon boot. Sendmail doesn't like that either and hangs during the boot process. So I just set it arbitrarily to xenon Note that the capitalization of rc.conf variables is *significant*. The real rc.conf variable that you have to set to avoid the Amnesiac name is: hostname=xenon I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. Thanks Giorgios, I think that I have the hostname problem resolved. rc.conf has hostname=xenon and /etc/hosts has: 127.0.0.1 localhost xenon So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Thanks, Rob Hi, Sorry if you get this twice Rob as I mistakenly sent my reply only to you without including the list I had the same problem. Add this line to your .xinitrc file xdpyinfo -display :0.0 The hostname is not specified. --Duane Hi Duane, I put the line you suggest into .xinitrc, but I still have the same problem. I also went into /etc/hosts after doing this and tried two ways of setting hosts: 1. 127.0.0.1 localhost xenon 2 127.0.0.1 localhost But I am still seeing the out of display lists message. It seems like the xdpyinfo command does not do anything. The only thing that I have done which changes the error message is to set /etc/rc.conf hostname=xenon Then in .bash_profile put DISPLAY=xenon:0.0 export DISPLAY Then I get the different error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 So I guess now I have tried every combination of the following: setting hostname in rc.conf to either or xenon setting DISPLAY=xenon:0.0 or leaving that line out in .bash_profile And finally, putting in xinitrc xdpyinfo -display :0.0 or just leaving that line out. So I am still baffled. Sincerely, Rob. -- --- http://www.roblytle.org Rob Lytle Home Page ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-22 13:07, Rob [EMAIL PROTECTED] wrote: On Wed, 22 Feb 2006 20:27:20 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. Thanks Giorgios, I think that I have the hostname problem resolved. rc.conf has hostname=xenon and /etc/hosts has: 127.0.0.1 localhost xenon That's quite fine :) So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Just a wild guess, since I don't see why you should have problems running programs like: Can't open display: xenon:0.0 Are you running X11 as a plain user and having problems to run programs *after* using su(1) to become root or does this happen for all users in all terminals? - Giorgos Hi Giorgos, I am trying to run a program from xterm as a normal user. However, when su'ing in xterm, I am unable to run any programs. Then I get the error: Xlib: connection to :0.0 refused by server Xlib: No protocol specified Error: Can't open display: :0.0 setting for csh as root: setenv DISPLAY xenon:0.0 then gives the error message: _XTransSocketINETConnect() can't get address for xenon:6000: hostname nor server name provided, or not known Error: Can't open display xenon:0.0 I seem to remember never being able to su in xterm and be able to run any programs no matter what combination of settings I have used. I also think that the error messages might have been different but I am starting to lose track of the error messages for combinations of settings for hostname, DISPLAY, etc. I probably need to start putting all of this down on paper so I can find any patterns. Rob. -- --- http://www.roblytle.org Rob Lytle Home Page ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-23 08:38, Rob [EMAIL PROTECTED] wrote: On 2006-02-22 13:07, Rob [EMAIL PROTECTED] wrote: So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Just a wild guess, since I don't see why you should have problems running programs like: Can't open display: xenon:0.0 Are you running X11 as a plain user and having problems to run programs *after* using su(1) to become root or does this happen for all users in all terminals? Hi Giorgos, I am trying to run a program from xterm as a normal user. However, when su'ing in xterm, I am unable to run any programs. Then I get the error: Xlib: connection to :0.0 refused by server Xlib: No protocol specified Error: Can't open display: :0.0 That's ok. When you use su(1) to become root, you no longer have permission to open programs on the display of the X server opened by the plain user. setting for csh as root: setenv DISPLAY xenon:0.0 then gives the error message: _XTransSocketINETConnect() can't get address for xenon:6000: hostname nor server name provided, or not known Error: Can't open display xenon:0.0 Open another xterm, from the X11 session of the plain user, and run: $ xhost +localhost Then you'll be able to `connect' by running as root: xenon# setenv DISPLAY localhost:0 I seem to remember never being able to su in xterm and be able to run any programs no matter what combination of settings I have used. That may be true, depending on the version of X11 that you are running, the current operating system and the setup of the X11 sessions. I can't tell what you had done, since I wasn't there... I also think that the error messages might have been different but I am starting to lose track of the error messages for combinations of settings for hostname, DISPLAY, etc. I probably need to start putting all of this down on paper so I can find any patterns. Sure. Keeping notes is always a good idea :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-23 08:23, Rob [EMAIL PROTECTED] wrote: Sorry if you get this twice Rob as I mistakenly sent my reply only to you without including the list I had the same problem. Add this line to your .xinitrc file xdpyinfo -display :0.0 The hostname is not specified. --Duane Hi Duane, I put the line you suggest into .xinitrc, but I still have the same problem. I also went into /etc/hosts after doing this and tried two ways of setting hosts: 1. 127.0.0.1 localhost xenon 2 127.0.0.1 localhost What are the 1. and 2 at the beginning of the lines above? I hope they are not part of your /etc/hosts file. You have obviously messed up your /etc/hosts file too much. Before you do anything else, please restore it from the sources, by copying `/usr/src/etc/hosts' over it. Then re-add xenon at the localhost line. But I am still seeing the out of display lists message. It seems like the xdpyinfo command does not do anything. It does. It prints a lot information about the current display. Since this goes to the terminal where xdpyinfo was started, then it goes to the virtual console that you start X11 in. You won't see much, until you exit X11. The only thing that I have done which changes the error message is to set /etc/rc.conf hostname=xenon Then in .bash_profile put DISPLAY=xenon:0.0 export DISPLAY No. That's a *horrible* idea. The `startx' utility can start an X11 server with a slightly different display, i.e. with: $ startx -- :1 Then your .bash_profile will override the default DISPLAY of the X11 session, messing up everything. If you happen to run two X11 sessions at the same time, you will be opening windows in the first session no matter where you run the commands that you will use. Then I get the different error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 The error message means you still have name resolution problems. Your system doesn't know that xenon, localhost, 127.0.0.1 are all equivalents ways of referring to itself. So I guess now I have tried every combination of the following: setting hostname in rc.conf to either or xenon setting DISPLAY=xenon:0.0 or leaving that line out in .bash_profile A hostname of is wrong. A hostname of xenon is almost right. And finally, putting in xinitrc xdpyinfo -display :0.0 or just leaving that line out. This should be without any real side-effects regarding the way your X11 session works. Please, restore your /etc/hosts file from /usr/src/etc/hosts and then we'll see what other may be wrong with your current setup. - Giorgos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
Sorry, forgot to copy the list. Begin forwarded message: Date: Thu, 23 Feb 2006 10:23:47 -0800 From: Rob [EMAIL PROTECTED] To: Giorgos Keramidas [EMAIL PROTECTED] Subject: Re: problem regarding setting DISPLAY env variable and hostname On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: On 2006-02-23 08:23, Rob [EMAIL PROTECTED] wrote: Sorry if you get this twice Rob as I mistakenly sent my reply only to you without including the list I had the same problem. Add this line to your .xinitrc file xdpyinfo -display :0.0 The hostname is not specified. --Duane Hi Duane, I put the line you suggest into .xinitrc, but I still have the same problem. I also went into /etc/hosts after doing this and tried two ways of setting hosts: 1. 127.0.0.1 localhost xenon 2 127.0.0.1 localhost What are the 1. and 2 at the beginning of the lines above? I hope they are not part of your /etc/hosts file. You have obviously messed up your /etc/hosts file too much. Before you do anything else, please restore it from the sources, by copying `/usr/src/etc/hosts' over it. Then re-add xenon at the localhost line. But I am still seeing the out of display lists message. It seems like the xdpyinfo command does not do anything. It does. It prints a lot information about the current display. Since this goes to the terminal where xdpyinfo was started, then it goes to the virtual console that you start X11 in. You won't see much, until you exit X11. The only thing that I have done which changes the error message is to set /etc/rc.conf hostname=xenon Then in .bash_profile put DISPLAY=xenon:0.0 export DISPLAY No. That's a *horrible* idea. The `startx' utility can start an X11 server with a slightly different display, i.e. with: $ startx -- :1 Then your .bash_profile will override the default DISPLAY of the X11 session, messing up everything. If you happen to run two X11 sessions at the same time, you will be opening windows in the first session no matter where you run the commands that you will use. Then I get the different error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 The error message means you still have name resolution problems. Your system doesn't know that xenon, localhost, 127.0.0.1 are all equivalents ways of referring to itself. So I guess now I have tried every combination of the following: setting hostname in rc.conf to either or xenon setting DISPLAY=xenon:0.0 or leaving that line out in .bash_profile A hostname of is wrong. A hostname of xenon is almost right. And finally, putting in xinitrc xdpyinfo -display :0.0 or just leaving that line out. This should be without any real side-effects regarding the way your X11 session works. Please, restore your /etc/hosts file from /usr/src/etc/hosts and then we'll see what other may be wrong with your current setup. - Giorgos Thank you very much Giorgos for keeping with me on this problem! Here are all of the steps which I have just done: I. I copied /usr/src/etc/hosts to /etc/hosts. Now it looks like: ::1 localhost localhost.my.domain 127.0.0.1 localhost localhost.my.domain everything else is commented out 2. I confirmed that hostname=xenon is still in rc.conf 3. I checked /root/.cshrc has no Xorg related commands in it, just a couple of aliases that I added to the original file. 4. The user .bash_profile no longer has the DISPLAY=xenon:0.0 export DISPLAY in it. The .xinitrc no longer has the xdpyinfo -display :0.0 line in it. 5. I rebooted. Sendmail starts up fine now. 6. So I started up Xorg and I get the errors on startup: bad display name xenon:0 in list command and then upon Xorg shutdown: bad display name xenon:0 in remove command 7. I gave the command xhost +localhost at the xterm prompt I get: localhost being added to access control list 8. I su at the xterm prompt and then give the command setenv DISPLAY localhost:0.0 all ok 9. then I try to run an X related program from the xterm command prompt and get the error: Error: Can't open display localhost:0.0 However, non X type programs like vi start ok without errors I guess my next step will be to add the host xenon to /etc/hosts. Then it looks like this: ::1 localhost xenon 127.0.0.1 localhost xenon Is that correct? Thanks, Rob. -- --- http://www.roblytle.org Rob Lytle Home Page -- --- http://www.roblytle.org Rob Lytle Home Page ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
Please try to interleave the replies with quoted material. It's much easier to read related stuff if it close together, instead of having to page up and down my entire original reply :( I've reorganized this post and moved things around, so you may find that the numbering of your text is not exactly consecutive. Sorry about this, but I can't reply to a long multi-page message by constantly moving up and down. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: 1. 127.0.0.1 localhost xenon 2 127.0.0.1 localhost What are the 1. and 2 at the beginning of the lines above? I hope they are not part of your /etc/hosts file. You have obviously messed up your /etc/hosts file too much. Before you do anything else, please restore it from the sources, by copying `/usr/src/etc/hosts' over it. Then re-add xenon at the localhost line. Here are all of the steps which I have just done: I. I copied /usr/src/etc/hosts to /etc/hosts. Now it looks like: ::1 localhost localhost.my.domain 127.0.0.1 localhost localhost.my.domain everything else is commented out That's not exactly what I said though. You missed re-adding the xenon entry, so you are back to square one, with xenon being unresolvable. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: The only thing that I have done which changes the error message is to set /etc/rc.conf hostname=xenon Then in .bash_profile put DISPLAY=xenon:0.0 export DISPLAY No. That's a *horrible* idea. The `startx' utility can start an X11 server with a slightly different display, i.e. with: $ startx -- :1 Then your .bash_profile will override the default DISPLAY of the X11 session, messing up everything. If you happen to run two X11 sessions at the same time, you will be opening windows in the first session no matter where you run the commands that you will use. 4. The user .bash_profile no longer has the DISPLAY=xenon:0.0 export DISPLAY in it. The .xinitrc no longer has the xdpyinfo -display :0.0 line in it. You don't need to include DISPLAY in your .bash_profile. As I have tried to emphasize, this is wrong and can even prove harmful if you ever find yourself in the need for multiple X11 sessions. You have done a good thing when you removed the xdpyinfo command too. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: Then I get the different error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 The error message means you still have name resolution problems. Your system doesn't know that xenon, localhost, 127.0.0.1 are all equivalents ways of referring to itself. So I guess now I have tried every combination of the following: setting hostname in rc.conf to either or xenon setting DISPLAY=xenon:0.0 or leaving that line out in .bash_profile A hostname of is wrong. A hostname of xenon is almost right. 2. I confirmed that hostname=xenon is still in rc.conf Very nice. That's the spirit :) On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: And finally, putting in xinitrc xdpyinfo -display :0.0 or just leaving that line out. This should be without any real side-effects regarding the way your X11 session works. Please, restore your /etc/hosts file from /usr/src/etc/hosts and then we'll see what other may be wrong with your current setup. 3. I checked /root/.cshrc has no Xorg related commands in it, just a couple of aliases that I added to the original file. Nice thing too. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: 5. I rebooted. Sendmail starts up fine now. 6. So I started up Xorg and I get the errors on startup: bad display name xenon:0 in list command and then upon Xorg shutdown: bad display name xenon:0 in remove command Now that you have removed xenon from /etc/hosts, there's no way to resolve this name. This is an expected error, I guess. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: 7. I gave the command xhost +localhost at the xterm prompt I get: localhost being added to access control list 8. I su at the xterm prompt and then give the command setenv DISPLAY localhost:0.0 all ok 9. then I try to run an X related program from the xterm command prompt and get the error: Error: Can't open display localhost:0.0 Now we're getting close. What is probably happening now is that your X11 server has started fine, but is not listening for network connections. Can you check with sockstat(1) to see if the X server is listening to port 6000 (this is what DISPLAY=:0 actually means)? An example of running
Re: problem regarding setting DISPLAY env variable and hostname
On Thu, 23 Feb 2006 23:29:47 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: Please try to interleave the replies with quoted material. It's much easier to read related stuff if it close together, instead of having to page up and down my entire original reply :( I am sorry. I sometimes don't know when I should do this as I have seen the debates on -questions about top posting, bottom posting, etc. I've reorganized this post and moved things around, so you may find that the numbering of your text is not exactly consecutive. Sorry about this, but I can't reply to a long multi-page message by constantly moving up and down. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: 1. 127.0.0.1 localhost xenon 2 127.0.0.1 localhost What are the 1. and 2 at the beginning of the lines above? I hope they are not part of your /etc/hosts file. You have obviously messed up your /etc/hosts file too much. Before you do anything else, please restore it from the sources, by copying `/usr/src/etc/hosts' over it. Then re-add xenon at the localhost line. Here are all of the steps which I have just done: I. I copied /usr/src/etc/hosts to /etc/hosts. Now it looks like: ::1 localhost localhost.my.domain 127.0.0.1 localhost localhost.my.domain everything else is commented out That's not exactly what I said though. You missed re-adding the xenon entry, so you are back to square one, with xenon being unresolvable. After I tried the above /etc/hosts file, I did change it to: ::1 localhostxenon 127.0.0.1localhostxenon On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: The only thing that I have done which changes the error message is to set /etc/rc.conf hostname=xenon Then in .bash_profile put DISPLAY=xenon:0.0 export DISPLAY No. That's a *horrible* idea. The `startx' utility can start an X11 server with a slightly different display, i.e. with: $ startx -- :1 Then your .bash_profile will override the default DISPLAY of the X11 session, messing up everything. If you happen to run two X11 sessions at the same time, you will be opening windows in the first session no matter where you run the commands that you will use. 4. The user .bash_profile no longer has the DISPLAY=xenon:0.0 export DISPLAY in it. The .xinitrc no longer has the xdpyinfo -display :0.0 line in it. You don't need to include DISPLAY in your .bash_profile. As I have tried to emphasize, this is wrong and can even prove harmful if you ever find yourself in the need for multiple X11 sessions. You have done a good thing when you removed the xdpyinfo command too. Yes, both the DISPLAY variable and xdpyinfo are gone for good. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: Then I get the different error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 The error message means you still have name resolution problems. Your system doesn't know that xenon, localhost, 127.0.0.1 are all equivalents ways of referring to itself. So I guess now I have tried every combination of the following: setting hostname in rc.conf to either or xenon setting DISPLAY=xenon:0.0 or leaving that line out in .bash_profile A hostname of is wrong. A hostname of xenon is almost right. 2. I confirmed that hostname=xenon is still in rc.conf Very nice. That's the spirit :) On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: On Thu, 23 Feb 2006 19:26:28 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: And finally, putting in xinitrc xdpyinfo -display :0.0 or just leaving that line out. This should be without any real side-effects regarding the way your X11 session works. Please, restore your /etc/hosts file from /usr/src/etc/hosts and then we'll see what other may be wrong with your current setup. 3. I checked /root/.cshrc has no Xorg related commands in it, just a couple of aliases that I added to the original file. Nice thing too. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: 5. I rebooted. Sendmail starts up fine now. 6. So I started up Xorg and I get the errors on startup: bad display name xenon:0 in list command and then upon Xorg shutdown: bad display name xenon:0 in remove command Now that you have removed xenon from /etc/hosts, there's no way to resolve this name. This is an expected error, I guess. After I added xenon to /etc/hosts, the error messages went away again. On 2006-02-23 10:23, Rob [EMAIL PROTECTED] wrote: 7. I gave the
Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-23 14:13, Rob [EMAIL PROTECTED] wrote: Then you have two options: 1. Start the X11 server in ``listen mode'', which will enable connections to port 6000: $ startx -listen_tcp I tried that and then at the xterm I again gave the commands xhost +localhost su'd setenv DISPLAY localhost:0.0 And I was able to run X programs as root, so that worked. 2. Use the ~/.Xauthority file of the user who started the X11 session. This can only be done by root or a sufficiently privileged user, and it works like this: $ su - Password: After you have gained superuser privileges, you can `merge' the proper credentials that will allow you to connect to the running X11 session (even though it wasn't `root' that started it), by using xauth(1): csh# setenv DISPLAY localhost:0 csh# xauth merge ~user/.Xauthority Now you should be allowed to run X11 programs just fine. I did that and it worked! I stopped and started Xorg and the changes seem to be permanent. Now I don't have to use the xhost +localhost and setenv DISPLAY localhost:0.0 any more. Great :-) Thanks for taking the time to post a followup, to verify that this was indeed a fix for twhat you were seeing. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
On 2006-02-22 10:17, Rob [EMAIL PROTECTED] wrote: I have been trying to figure out how to set the display name on my computer. I have a program used with Xorg that gives me the error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 also when starting or stopping Xorg I either get: bad display name xenon:0 in remove commandor bad display name xenon:0 in list command Your laptop can't resolve the name xenon. I have my XDISPLAY env variable set using (in Bash): DISPLAY=xenon:0.0 export DISPLAY xenon is the name of the machine I think part of the problem is the setting of the hostname. This laptop runs off of DHCP and I am not really sure about what I should do for setting the hostname. The manual says to set HOSTNAME= in rc.conf if using DHCP, but then I get the amnesiac message upon boot. Sendmail doesn't like that either and hangs during the boot process. So I just set it arbitrarily to xenon Note that the capitalization of rc.conf variables is *significant*. The real rc.conf variable that you have to set to avoid the Amnesiac name is: hostname=xenon I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
On Wed, 22 Feb 2006 20:27:20 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: On 2006-02-22 10:17, Rob [EMAIL PROTECTED] wrote: I have been trying to figure out how to set the display name on my computer. I have a program used with Xorg that gives me the error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 also when starting or stopping Xorg I either get: bad display name xenon:0 in remove commandor bad display name xenon:0 in list command Your laptop can't resolve the name xenon. I have my XDISPLAY env variable set using (in Bash): DISPLAY=xenon:0.0 export DISPLAY xenon is the name of the machine I think part of the problem is the setting of the hostname. This laptop runs off of DHCP and I am not really sure about what I should do for setting the hostname. The manual says to set HOSTNAME= in rc.conf if using DHCP, but then I get the amnesiac message upon boot. Sendmail doesn't like that either and hangs during the boot process. So I just set it arbitrarily to xenon Note that the capitalization of rc.conf variables is *significant*. The real rc.conf variable that you have to set to avoid the Amnesiac name is: hostname=xenon I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. Thanks Giorgios, I think that I have the hostname problem resolved. rc.conf has hostname=xenon and /etc/hosts has: 127.0.0.1 localhost xenon So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Thanks, Rob -- --- http://www.roblytle.org Rob Lytle Home Page ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: problem regarding setting DISPLAY env variable and hostname
Rob wrote: On Wed, 22 Feb 2006 20:27:20 +0200 Giorgos Keramidas [EMAIL PROTECTED] wrote: On 2006-02-22 10:17, Rob [EMAIL PROTECTED] wrote: I have been trying to figure out how to set the display name on my computer. I have a program used with Xorg that gives me the error message: _X11TransSocketINETConnect() can't get address for xenon:6000: hostname nor servname provided, or not known Error: Can't open display: xenon:0.0 also when starting or stopping Xorg I either get: bad display name xenon:0 in remove commandor bad display name xenon:0 in list command Your laptop can't resolve the name xenon. I have my XDISPLAY env variable set using (in Bash): DISPLAY=xenon:0.0 export DISPLAY xenon is the name of the machine I think part of the problem is the setting of the hostname. This laptop runs off of DHCP and I am not really sure about what I should do for setting the hostname. The manual says to set HOSTNAME= in rc.conf if using DHCP, but then I get the amnesiac message upon boot. Sendmail doesn't like that either and hangs during the boot process. So I just set it arbitrarily to xenon Note that the capitalization of rc.conf variables is *significant*. The real rc.conf variable that you have to set to avoid the Amnesiac name is: hostname=xenon I have read manual pages, searched the archives, but I am really confused about all of this. Thank you for any help. All this can be resolved by using `/etc/hosts'. Just add your hostname there and point it to the 127.0.0.1 address. Then all programs should be able to resolve it. Thanks Giorgios, I think that I have the hostname problem resolved. rc.conf has hostname=xenon and /etc/hosts has: 127.0.0.1 localhost xenon So now Xorg does not give errors on startup or shutdown like the bad display name xenon:0 in remove commandor bad display name xenon:0 in list command But when not setting the DISPLAY variable explicitely anywhere I still get the error: out of display lists upon starting the program I want from xterm But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing the program then gives the error: Can't open display: xenon:0.0 so I guess I am back to square one. Maybe I should call it a day and rest, haha. Thanks, Rob Hi, Sorry if you get this twice Rob as I mistakenly sent my reply only to you without including the list I had the same problem. Add this line to your .xinitrc file xdpyinfo -display :0.0 The hostname is not specified. --Duane ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]