running X in a telnet session
Hi All, I'm using telnet to log into my desktop machine from my laptop and I would like to be able to run an application on the desktop machine and have the display be on the laptop. After loging into the desktop and switching the DISPLAY variable: export DISPLAY=192.168.1.2:0.0 I get this error message when I try to run a program: Xlib: connection to 192.168.1.2:0.0 refused by server Xlib: Client is not authorized to connect to Server Application initialization failed: couldn't connect to display 192.168.1.2:0.0 Any ideas? thanks, Andy __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com
Re: running X in a telnet session
Andrew Dwight Dixon [EMAIL PROTECTED] writes: Hi All, I'm using telnet to log into my desktop machine from my laptop and I would like to be able to run an application on the desktop machine and have the display be on the laptop. After loging into the desktop and switching the DISPLAY variable: export DISPLAY=192.168.1.2:0.0 I get this error message when I try to run a program: Xlib: connection to 192.168.1.2:0.0 refused by server Xlib: Client is not authorized to connect to Server Application initialization failed: couldn't connect to display 192.168.1.2:0.0 Any ideas? Your X11 server is set to refuse connections from random machines. This is the correct thing to do, for without it anyone could connect to the machine and watch every key you type. The best way to solve this, as well as to prevent people reading your password from the network as you telnet in, is to install ssh(1) on the desktop. ssh(1) will happily forward X11 connections for you. Read the ssh(1) manpage, log in with it, and it should just work(tm). If you really want to use telnet, though, there are two ways to go about it. One is the complicated xauth(1) method, shipping the magic number across the network to the desktop. If you read the manpage for xauth(1), it has examples that will let you work it out. Given that you are using telnet to connect, though, and would be shipping the xauth key in the clear, I wouldn't bother with that. The insecure, but simple, way of allowing programs on the desktop machine to connect is to run the command: ] xhost +desktop.machine.name This will allow *anyone* on the desktop machine to connect to your X session. So, if you choose not to use the ssh(1) thing, *your server is insecure*. Anyone on the same network can steal your passwork and watch *every* keystroke (or mouse click) on the X server. Please, unless you have some pressing reason not to, adopt ssh for this sort of network connection. Daniel -- I am constantly amazed when I talk to young people to learn how much they know about sex and how little about soap. -- Billie Burke
Re: running X in a telnet session
Andrew Dwight Dixon [EMAIL PROTECTED] writes: ADD I'm using telnet to log into my desktop machine from my laptop and ADD I would like to be able to run an application on the desktop machine and ADD have the display be on the laptop. After loging into the desktop and ADD switching the DISPLAY variable: ADD export DISPLAY=192.168.1.2:0.0 You really want to be using ssh with X forwarding. Both telnet and the X protocol are completely insecure and leave you open to a variety of attacks from anyone on the same network as you are. Plus, once you enable X forwarding in ssh (Debian's ssh packages ship with it disabled), all of these issues are magically taken care of for you. That having been said: ADD I get this error message when I try to run a program: ADD ADD Xlib: connection to 192.168.1.2:0.0 refused by server ADD Xlib: Client is not authorized to connect to Server ADD Application initialization failed: couldn't connect to display ADD 192.168.1.2:0.0 X uses a couple of different access control methods to prevent any random person who can guess your IP address from accessing your display. They're described, among other places, in the Remote-X-Apps mini-HOWTO. I think the Woody X is also configured by default to not listen to TCP connections at all when you run 'startx', which could also cause this connection refused message. -- David Maze [EMAIL PROTECTED] http://www.mit.edu/~dmaze/ Theoretical politics is interesting. Politicking should be illegal. -- Abra Mitchell