Jump to content

Remote X session


Guest anon
 Share

Recommended Posts

Hey nice tutorial, how about getting a mod to sticky that!!

I've been meaning to do this properly for a while .... I took a cheat option and left the RH box a remotely log into in RL3. Then I just startx and missout the login manager... Not elegant but Im the only user.

 

Andrewksi:

In order to do this you need a xserver and xclient. X is somewhat bizzare in what it calls a serverr and client (IMHO) but we'll let that pass.

 

First you need an XServer in windows capable of receiving the XProtocol.

Commercial solutions exist AND are expensive.

Exceed (from Hummingbird)

Reflection X (can't remember who).

 

I used to use Exceed a lot..... now its replaced with a neater web based solution which is of course even more expensive !!!

 

I haven't actually tried any free ones.

 

Anyway, thats almost all there is to it. Except you have to play around with permissions etc.

Link to comment
Share on other sites

I've been wading through the Google results to "free windows Xserver" and came up with two seemingly-worthwhile results:

 

http://www.cygwin.com/xfree/

http://www.thecyborg.com/howto/xserver.html

 

Any idea if either of these would be good?

 

Also, would you mind explaining what the "setting up permissions" would involve (unless it's something either Xserver app will explain).

 

Thanks!

Link to comment
Share on other sites

Please note this is the Solaris man page not linux but it's applicable just the same.

(From man X ) Solaris 8

 

DISPLAY NAMES

From the user's prospective, every X server has a display

name of the form:

 

hostname:displaynumber.screennumber

 

This information is used by the application to determine how

it should connect to the server and which screen it should

use by default (on displays with multiple monitors):

 

hostname

The hostname specifies the name of the machine to

which the display is physically connected. If the

hostname is not given, the most efficient way of

communicating to a server on the same machine will

be used.

 

displaynumber

The phrase "display" is usually used to refer to

collection of monitors that share a common keyboard

and pointer (mouse, tablet, etc.). Most worksta-

tions tend to only have one keyboard, and therefore,

only one display. Larger, multi-user systems, how-

ever, frequently have several displays so that more

than one person can be doing graphics work at once.

To avoid confusion, each display on a machine is

assigned a display number (beginning at 0) when the

X server for that display is started. The display

number must always be given in a display name.

 

screennumber

Some displays share a single keyboard and pointer

among two or more monitors. Since each monitor has

its own set of windows, each screen is assigned a

screen number (beginning at 0) when the X server for

that display is started. If the screen number is

 

X Version 11 Last change: Release 6 2

 

Device and Network Interfaces X11(7)

 

not given, screen 0 will be used.

 

On POSIX systems, the default display name is stored in your

DISPLAY environment variable. This variable is set automat-

ically by the xterm terminal emulator. However, when you

log into another machine on a network, you will need to set

DISPLAY by hand to point to your display. For example,

 

% setenv DISPLAY myws:0

$ DISPLAY=myws:0; export DISPLAY

 

Finally, most X programs accept a command line option of

-display displayname to temporarily override the contents of

DISPLAY. This is most commonly used to pop windows on

another person's screen or as part of a "remote shell" com-

mand to start an xterm pointing back to your display. For

example,

 

% xeyes -display joesws:0 -geometry 1000x1000+0+0

% rsh big xterm -display myws:0 -ls </dev/null &

 

X servers listen for connections on a variety of different

communications channels (network byte streams, shared

memory, etc.). Since there can be more than one way of con-

tacting a given server, The hostname part of the display

name is used to determine the type of channel (also called a

transport layer) to be used. X servers generally support

the following types of connections:

Link to comment
Share on other sites

Thanks for that Stephen, although I'm not sure I can glean any info from that.... Only a bit of that terminology makes sense to me.

 

So, I'll take on the responsibility of finding the Xserver for the Win computer, but I'm not sure how to configure my Linux computer to accept it. I'm wanting a "complete desktop" solution and the fastest one available. I'm supposing VNC would not be the way to go, but I'm not sure what would be. X? XDMCP? If anyone can help me wade through all the info on the web, I'd greatly appreciate it. It's a lot for me to chew on, but it gets me exposed!

 

Thanks.

Link to comment
Share on other sites

XDMCP is a way of broadcasting looking for an Xserver.

It more use in a large environment.

 

What you basically need to do is:

xhost + <host> where host is the name of the win machine or its IP

You need to do this as the owner of the desktop, ie the user you logged in as

 

On the remote machine you can then 'log-in' with a Xterm.

You should just get an xterm on your windows machine.

 

You can start an app here but you must first tell it where to display

export DISPLAY=<hostname>

So if you type, xterm again you should get a second on.

 

If you can get to this point we can be more specific about how to get a whole desktop. :D If this doesn't work the desktop won't

 

From your linux machine make sure you can connect to yourself.

 

i.e. you need a telnet/rlogin/ssh whichever your windopws Xserver can use.

 

ssh is best :-)

so

ssh <localhost>

You should be able to login .....

also try by IP and hostname

ssh <hostname>

Link to comment
Share on other sites

I try the xhost command and get the following:

[root@name home]# xhost + 204.78.8.146

X connection to localhost:10.0 broken (explicit kill or server shutdown).

 

And I'm confused.

On the remote machine you can then 'log-in' with a Xterm.

You should just get an xterm on your windows machine.

Ok, I think I got to that point; using X-Win (only available for 30 minutes at a time) I mapped the display to localhost, getting Galeon and Opera to run on the Windows machine. I logged in and ran the commands using putty. However, it was very slow... slower than it used to be running my entire desktop from Windows. That's not very good at all...!

 

Ok, so you said you could be more specific about getting the entire desktop; could you now? :)

Link to comment
Share on other sites

OK andrewsi,

 

You got that far ...

Im really snowed under fixing my firewall at the moment but theres a really good thread from where you are now to where you want to get ...

 

Hey, wait its this thread, you need back up and follow the YinYeti.

 

If you can open an application then you can open the whole Xserver. First you have to do some edis on the linux machine...

 

Just go back to page 1 :-)

 

Hopefully, I'll be back later if I don't firewall myself off the internet :-)

Link to comment
Share on other sites

I've been wading through the Google results to "free windows Xserver" and came up with two seemingly-worthwhile results:

 

http://www.cygwin.com/xfree/

 

Yes' date=' Cygwin X works quite well, plus with Cygwin you can have the rest of the utilities you need (ssh, keychain) and want (perl, awk, bash etc)

 

 

 

This is very outdated, and very insecure, don't follow anything you read here ...

 

Cygwin X works great, try the -rootless or -fullscreen options:

 

XWin -query <IP> -rootless

or

XWin -fullscreen &

ssh host

gdm

 

etc etc.

Link to comment
Share on other sites

There are two ways to run a remote 100%-X session:

 

2)- connect first to remote X session manager (gdm, kdm...), and then login graphically.

 

Here's how:

Let's assume your address is 10.0.0.2, and you want to run X programs on 10.0.0.1

 

2) First configure the server's display manager to accept XDMCP connections, then

$ X -query 10.0.0.1 :1

This time, you have the full remote desktop on another X vt (CtrlAltF7 is your first X display, numbered :0 ; and CtrlAltF8 is the second, numbered :1)

 

Out of the four he gives, I think number 2 is what I'm looking at. I'm not at a Windows computer, so I'll have to figure out the Cygwin solution later. (Ranger, thanks for the tip.) In the meantime, I'm testing on my friend's computer (also running Mandrake 9.1). That should make it easier, yes? All I need is already running on both computers.

 

In any case, I have no idea how to set up XDMCP on my/his computer (or which would need it), which might be why I'm unsuccessfully connecting. When I type

[andrew@cname andrew]$ X -query 10.0.0.1 :1

I get a blue screen with an "X" cursor, as if it were about to bring up a login screen.

 

Anyone want to offer some tips, or a URL, on XDMCP? I'm not sure what to believe out there.[/code]

Link to comment
Share on other sites

Out of the four he gives, I think number 2 is what I'm looking at.  I'm not at a Windows computer, so I'll have to figure out the Cygwin solution later.  (Ranger, thanks for the tip.)  In the meantime, I'm testing on my friend's computer (also running Mandrake 9.1).  That should make it easier, yes?  All I need is already running on both computers.

 

In any case, I have no idea how to set up XDMCP on my/his computer (or which would need it), which might be why I'm unsuccessfully connecting.  When I type

[andrew@cname andrew]$ X -query 10.0.0.1 :1

I get a blue screen with an "X" cursor, as if it were about to bring up a login screen.

 

Anyone want to offer some tips, or a URL, on XDMCP?  I'm not sure what to believe out there.[/code]

 

There unfortunately is very little documentation available on setting up XDMCP, but here goes:

 

1)You want XDMCP enabled on a display manager on the machine you want to connect to.

 

2)You may have to restart the display manager for changes to take effect (maybe not with gdm)

 

3)xdm, gdm and kdm (including mdkkdm) all support XDMCP, but it's easiest to configure with gdm (run the config tool and check the "enable XDMCP" box on the last tab).

 

For kdm/mdkkdm, you can enable XDMCP by editing /usr/share/config/kdm/kdmrc, in the Xdmcp section, change "Enable=false" to "Enable=true" and restart kdm if necessary.

 

If there are firewalls running on either the client or the server, or anything in between, you may have to disable for testing, and add extra rules for normal use (hint: ports 177 and 6000-6010)

Link to comment
Share on other sites

  • 6 months later...

Thanks YinYeti this works great!

 

Andrewski

I have used VNC on a windows client to connect to a linux box before it was a few years ago now but i don't remember it being very hard to setup.

I think it was this client.

http://www.uk.research.att.com/archive/vnc/index.html

Link to comment
Share on other sites

  • 8 months later...

My first post on any forum so please take it easy.

 

I'm trying Mandrake 10.0 and I want to put the machine in a remote location (on the LAN) but occasionally run the graphical interface via cygwin from my XP (pro) machine.

 

I have set this up many times before using Redhat 8/9 without problems.

 

I have the remote desktop working for me fine, but now the local console on the Mandrake machine flashes at me during boot a few times then drops into a command shell. This **MIGHT** be ok, as I won't normally be near the local machine, but it is annoying to not understand why.

 

I only understand a little of what I'm doing with the dm configuration, but the procedure has worked for me in that past on Redhat and works on Mandrake too but after modifying the following files and **REBOOTING***, the problem on the local console begins. (The remote access via GUI and xwin works fine). It seems like it must be something simple and stupid and hope someone can tell me what.

 

The files I modified (primarily following directions found many places on the internet) :

 

/etc/rc.d/init.d/xfs

(change font port to 7100)

 

/etc/X11/fs/config

(comment out #no-listen = tcp)

 

run: service xfs restart

 

Do one or the other OR both of these next two (doesn't if do one or both):

 

/etc/X11/xdm/xdm-config

comment out this line (put the ! in front)

! DisplayManager.requestPort: 0

 

-AND/OR-

 

/etc/X11/xdm/Xaccess

 

Uncomment the line removing the # (on mandrake it is already that way

#* # any host can get a login window

 

/usr/share/config/kdm/kdmrc (for Mandrake)

 

[xdmcp]

Enable=true

(also added next line)

Port=177

 

bounce X

init 3

init 5

 

 

================

Result is works until reboot, then local console cannot show X windows, however remote continues to work even after reboot via cygwin using something like any of these:

xwin -query <mandrake-machine>

xwin -query <mandrake-machine> :0

xwin -query <mandrake-machine> :1

xwin -query <mandrake-machine> -once

 

=======

Thanks in advance to anyone who knows what I've missed that would make my local console work running X after reboot.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...