public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Re: Possible to use clipboard with remote/xdm connection?
@ 2004-01-12 19:57 Kevin Markle
  2004-01-12 20:00 ` Harold L Hunt II
  0 siblings, 1 reply; 28+ messages in thread
From: Kevin Markle @ 2004-01-12 19:57 UTC (permalink / raw)
  To: cygwin-xfree

Hello,

I'm unable to get my DISPLAY variable to work. I use my IP address
followed by:0.0. The message I get is that the server can't connect to
the x11 server? If you have any experience in this I would appreciate
the help.

"Chris Green" <chris@areti.co.uk> wrote in message
news:<20040102144403.GA4596@areti.co.uk>...
> On Fri, Jan 02, 2004 at 03:33:42PM +0100, Alexander Gottwald wrote:
> > On Fri, 2 Jan 2004, Chris Green wrote:
> > 
> > > The trouble is that when I run 'xhost 127.0.0.1' in a cygwin 
> > > window on my win2k system I just get the error:-
> > >     xhost: unable to open display ""
> > 
> > that would be DISPLAY=127.0.0.1:0 xhost 127.0.0.1
> > 
> > But most likely you will have no access from windows. Run xhost from

> > the
> > session started via xdmcp.
> > 
> But if I run xhost in that session I will be setting xhost permissions

> on the Linux Slackware system which is most definitely not what is 
> required.
> 
> It seems very odd that xhost requires access to the local display in 
> order to work as you need xhost to set permission to acces the local 
> display - sort of catch 22.
> 
> If I open just a cygwin terminal window on my Win2k system I simply 
> can't run xhost at all.
> 
> E.G.:-
> 
>     $ xhost
>     xhost: Unable to open display ""
> 
>     $ export DISPLAY=192.168.13.25:0.0
>     $ xhost
>     Xlib: connection to 192.168.13.25:0.0 refused by server
>     Xlib: no protocol specified
> 
>     xhost: Unable to open display 192.168.13.25:0.0
> 
> So how can one ever run xhost (and thus xwinclip)?
> 
> > > What should the DISPLAY environment variable be set to for the 
> > > local display?  I'm used to setting it for remote systems but I 
> > > can't get the right value for this one.
> > 
> > Fot the local display this is 127.0.0.1:0 or :0
> > 
> Maybe my win2k set up is wonly but 127.0.0.1 won't work for me, the 
> actual IP address of 192.168.13.25 does work though.  However a second

> try seems to be OK, maybe I'd got into a mess before.  The 'catch 22' 
> above still applies though.
> 
> --
> Chris Green (chris@areti.co.uk)
> 




We're shaking things up with BOOHBAH!
All new on PBS KIDS. Catch it weekdays, beginning January 19th. 
pbskids.org/boohbah


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-12 19:57 Possible to use clipboard with remote/xdm connection? Kevin Markle
@ 2004-01-12 20:00 ` Harold L Hunt II
  0 siblings, 0 replies; 28+ messages in thread
From: Harold L Hunt II @ 2004-01-12 20:00 UTC (permalink / raw)
  To: cygwin-xfree

Kevin,

Wait for the new XFree86-xserv-4.3.0-39 release to show up on your local 
mirror, install it, then just use the '-clipboard' command-line 
parameter to XWin.exe and forget about xhost and xwinclip.

Please report if/when you are successful.

Harold

Kevin Markle wrote:

> Hello,
> 
> I'm unable to get my DISPLAY variable to work. I use my IP address
> followed by:0.0. The message I get is that the server can't connect to
> the x11 server? If you have any experience in this I would appreciate
> the help.
> 
> "Chris Green" <chris@areti.co.uk> wrote in message
> news:<20040102144403.GA4596@areti.co.uk>...
> 
>>On Fri, Jan 02, 2004 at 03:33:42PM +0100, Alexander Gottwald wrote:
>>
>>>On Fri, 2 Jan 2004, Chris Green wrote:
>>>
>>>
>>>>The trouble is that when I run 'xhost 127.0.0.1' in a cygwin 
>>>>window on my win2k system I just get the error:-
>>>>    xhost: unable to open display ""
>>>
>>>that would be DISPLAY=127.0.0.1:0 xhost 127.0.0.1
>>>
>>>But most likely you will have no access from windows. Run xhost from
> 
> 
>>>the
>>>session started via xdmcp.
>>>
>>
>>But if I run xhost in that session I will be setting xhost permissions
> 
> 
>>on the Linux Slackware system which is most definitely not what is 
>>required.
>>
>>It seems very odd that xhost requires access to the local display in 
>>order to work as you need xhost to set permission to acces the local 
>>display - sort of catch 22.
>>
>>If I open just a cygwin terminal window on my Win2k system I simply 
>>can't run xhost at all.
>>
>>E.G.:-
>>
>>    $ xhost
>>    xhost: Unable to open display ""
>>
>>    $ export DISPLAY=192.168.13.25:0.0
>>    $ xhost
>>    Xlib: connection to 192.168.13.25:0.0 refused by server
>>    Xlib: no protocol specified
>>
>>    xhost: Unable to open display 192.168.13.25:0.0
>>
>>So how can one ever run xhost (and thus xwinclip)?
>>
>>
>>>>What should the DISPLAY environment variable be set to for the 
>>>>local display?  I'm used to setting it for remote systems but I 
>>>>can't get the right value for this one.
>>>
>>>Fot the local display this is 127.0.0.1:0 or :0
>>>
>>
>>Maybe my win2k set up is wonly but 127.0.0.1 won't work for me, the 
>>actual IP address of 192.168.13.25 does work though.  However a second
> 
> 
>>try seems to be OK, maybe I'd got into a mess before.  The 'catch 22' 
>>above still applies though.
>>
>>--
>>Chris Green (chris@areti.co.uk)
>>
> 
> 
> 
> 
> 
> We're shaking things up with BOOHBAH!
> All new on PBS KIDS. Catch it weekdays, beginning January 19th. 
> pbskids.org/boohbah
> 
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 22:43                   ` Chris Green
@ 2004-01-03 11:00                     ` Alexander Gottwald
  0 siblings, 0 replies; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-03 11:00 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

Chris Green wrote:

> > The win2k system and xwin are two different systems.
> >
> Not in this situation, they're both running on a machine to which I
> have administrator and root (if you want to call it that) access.
> Thus in reality I have access to *everything* that's going on in the
> machine.  Whatever 'security' X wants to put in my way I can (if I'm a
> reasonably capable programmer) circumvent.

you want root (in case it is not you) to have access to your passwords?

> > The first may be used by more than one person and the second must only be
> > used by you.
> >
> Why must xwin only be used by me?

you can alter this with xhost and xauth. But the default is to grant access
only to one person (or better session).

> > Just imagine someone wants to steal a password from you and starts a client
> > which registers all keystrokes entered in a xterm. This program can be started
> > from a linux box or from the win2k system itself. The X11 security model tries
> > to prevent this by not allowing any connection that is not started by you.
> >
> But the connection from which I wanted to run xwinclip *was* run by
> me.

This is clear to you but not to the xserver. There are several models to
convince the xserver that you are allowed to connect. Either host based via
xhost and token based via xauth. The later works well if you have shared
home directories (eg via nfs, afs or samba). After logging in to the xdmcp
server a token is stored in ~/.Xauthority. If this file is readable to
an xclient then the xclient knows the token for connecting to the xserver.

(see man Xsecurity for details on xauth)

> > If you've lost your key you'll be able to leave your house but are not able
> > to enter it again. These are two different situations and the design is good
> > but you have a problem if you've lost your key.
> >
> Not round here, no need to lock houses, it makes life *much* simpler
> to live.  Security is a huge waste of human resources with very few
> advantages or uses.

start the xserver with the parameter -ac. This makes it open to everyone.

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 19:33                   ` Alexander Gottwald
  2004-01-02 19:49                     ` Thomas Dickey
@ 2004-01-02 22:50                     ` Chris Green
  1 sibling, 0 replies; 28+ messages in thread
From: Chris Green @ 2004-01-02 22:50 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 08:33:41PM +0100, Alexander Gottwald wrote:
> Chris Green wrote:
> 
> > The xterm that one runs by clicking on the cygwin icon, the standard
> > cygwin (not cygwin/X) terminal window.
> 
> This is not xterm. This is just a windows console with bash.
> 
Yes, I've since realised that, not obvious initially.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 19:20                     ` Harold L Hunt II
@ 2004-01-02 22:50                       ` Chris Green
  0 siblings, 0 replies; 28+ messages in thread
From: Chris Green @ 2004-01-02 22:50 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 02:19:54PM -0500, Harold L Hunt II wrote:
> 
> Umm... I'm not sure what you want to do.  It is not currently possible 
> to pre-authenticate xwinclip via xhost from a script run on your Windows 
> machine, but it is possible to use the X hosts file like Alexander 

Yes, it's that enabled me to do it in the end.  For the rest see my
other reply.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 20:13                 ` Alexander Gottwald
@ 2004-01-02 22:43                   ` Chris Green
  2004-01-03 11:00                     ` Alexander Gottwald
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-02 22:43 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 09:13:26PM +0100, Alexander Gottwald wrote:
> Chris Green wrote:
> 
> > > Same with the gates of a castle. To get in, you must open it from inside.
> > > This is the main principle of security. You can not allow those who have
> > > no access to change the permissions.
> > >
> > ... but I am "within the castle", I'm sitting running a script on the
> > win2k system
> 
> The win2k system and xwin are two different systems.
> 
Not in this situation, they're both running on a machine to which I
have administrator and root (if you want to call it that) access.
Thus in reality I have access to *everything* that's going on in the
machine.  Whatever 'security' X wants to put in my way I can (if I'm a
reasonably capable programmer) circumvent.


> The first may be used by more than one person and the second must only be
> used by you.
> 
Why must xwin only be used by me?


> Just imagine someone wants to steal a password from you and starts a client
> which registers all keystrokes entered in a xterm. This program can be started
> from a linux box or from the win2k system itself. The X11 security model tries
> to prevent this by not allowing any connection that is not started by you.
> 
But the connection from which I wanted to run xwinclip *was* run by
me.


> > and I can't see how to run xwinclip there because it
> > won't give me permission to display on the terminal that I'm already
> > using.
> 
> If you've lost your key you'll be able to leave your house but are not able
> to enter it again. These are two different situations and the design is good
> but you have a problem if you've lost your key.
> 
Not round here, no need to lock houses, it makes life *much* simpler
to live.  Security is a huge waste of human resources with very few
advantages or uses.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 21:40                             ` Thomas Dickey
@ 2004-01-02 21:44                               ` Harold L Hunt II
  0 siblings, 0 replies; 28+ messages in thread
From: Harold L Hunt II @ 2004-01-02 21:44 UTC (permalink / raw)
  To: cygwin-xfree

Thomas Dickey wrote:

> On Fri, 2 Jan 2004, Harold L Hunt II wrote:
> 
> 
>>>I understood that, and was hinting that if you chose to make the
>>>explanation simple & to the point - perhaps to someplace online where it's
>>>discussed lucidly - you wouldn't have to exercise the keyboard so much.
>>
>>A detailed write-up does not exist on the web.  It would already exist
>>if someone had time to write it.  Nobody has had time yet.  We always
>>welcome contributions, since we have more than enough to do right now.
> 
> 
> perhaps start by cut/paste from this thread
> 
> (though it's rather repetitive)

Right.  It wouldn't be much of a start.  :)

Harold


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 21:33                           ` Harold L Hunt II
@ 2004-01-02 21:40                             ` Thomas Dickey
  2004-01-02 21:44                               ` Harold L Hunt II
  0 siblings, 1 reply; 28+ messages in thread
From: Thomas Dickey @ 2004-01-02 21:40 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, 2 Jan 2004, Harold L Hunt II wrote:

> > I understood that, and was hinting that if you chose to make the
> > explanation simple & to the point - perhaps to someplace online where it's
> > discussed lucidly - you wouldn't have to exercise the keyboard so much.
>
> A detailed write-up does not exist on the web.  It would already exist
> if someone had time to write it.  Nobody has had time yet.  We always
> welcome contributions, since we have more than enough to do right now.

perhaps start by cut/paste from this thread

(though it's rather repetitive)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 20:56                         ` Thomas Dickey
@ 2004-01-02 21:33                           ` Harold L Hunt II
  2004-01-02 21:40                             ` Thomas Dickey
  0 siblings, 1 reply; 28+ messages in thread
From: Harold L Hunt II @ 2004-01-02 21:33 UTC (permalink / raw)
  To: cygwin-xfree

Thomas Dickey wrote:
> On Fri, 2 Jan 2004, Alexander Gottwald wrote:
> 
> 
>>Thomas Dickey wrote:
>>
>>
>>>The windows console talks to the windows clipboard.
>>>Does the X clipboard talk to the windows clipboard (or will it someday)?
>>
>>This thread is all about this. There is the internal clipboard manager and
>>this is also available as an external program (xwinclip).
> 
> 
> I understood that, and was hinting that if you chose to make the
> explanation simple & to the point - perhaps to someplace online where it's
> discussed lucidly - you wouldn't have to exercise the keyboard so much.

A detailed write-up does not exist on the web.  It would already exist 
if someone had time to write it.  Nobody has had time yet.  We always 
welcome contributions, since we have more than enough to do right now.

Harold


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 20:15                       ` Alexander Gottwald
@ 2004-01-02 20:56                         ` Thomas Dickey
  2004-01-02 21:33                           ` Harold L Hunt II
  0 siblings, 1 reply; 28+ messages in thread
From: Thomas Dickey @ 2004-01-02 20:56 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, 2 Jan 2004, Alexander Gottwald wrote:

> Thomas Dickey wrote:
>
> > The windows console talks to the windows clipboard.
> > Does the X clipboard talk to the windows clipboard (or will it someday)?
>
> This thread is all about this. There is the internal clipboard manager and
> this is also available as an external program (xwinclip).

I understood that, and was hinting that if you chose to make the
explanation simple & to the point - perhaps to someplace online where it's
discussed lucidly - you wouldn't have to exercise the keyboard so much.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 19:49                     ` Thomas Dickey
@ 2004-01-02 20:15                       ` Alexander Gottwald
  2004-01-02 20:56                         ` Thomas Dickey
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 20:15 UTC (permalink / raw)
  To: cygwin-xfree

Thomas Dickey wrote:

> The windows console talks to the windows clipboard.
> Does the X clipboard talk to the windows clipboard (or will it someday)?

This thread is all about this. There is the internal clipboard manager and
this is also available as an external program (xwinclip).

bye
    ago

NP: grauzone.03-12-28
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 18:00               ` Chris Green
  2004-01-02 18:28                 ` Harold L Hunt II
@ 2004-01-02 20:13                 ` Alexander Gottwald
  2004-01-02 22:43                   ` Chris Green
  1 sibling, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 20:13 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

Chris Green wrote:

> > Same with the gates of a castle. To get in, you must open it from inside.
> > This is the main principle of security. You can not allow those who have
> > no access to change the permissions.
> >
> ... but I am "within the castle", I'm sitting running a script on the
> win2k system

The win2k system and xwin are two different systems.

The first may be used by more than one person and the second must only be
used by you.

Just imagine someone wants to steal a password from you and starts a client
which registers all keystrokes entered in a xterm. This program can be started
from a linux box or from the win2k system itself. The X11 security model tries
to prevent this by not allowing any connection that is not started by you.

for further reading I advice man Xsecurity. There are all security models
described in detail.

> and I can't see how to run xwinclip there because it
> won't give me permission to display on the terminal that I'm already
> using.

If you've lost your key you'll be able to leave your house but are not able
to enter it again. These are two different situations and the design is good
but you have a problem if you've lost your key.

> It's of little use to be able to allow xwinclip to run on the win2k
> system by executing something on the Linux system.  One wants a means
> to do it from the X startup script.

Yes, it still has problems. Maybe a solution which is more closely bound to
the xserver is a better design.

eg:

XChangeSelection (or ProcSetSelectionOwner)
    -> check for recursion
    -> convert X11 Selection to windows clipboard

winWndProc(WM_DRAWCLIPBOARD)
    -> check for recursion
    -> convert Windows clipboard to X11 selection

I'm not familar with the Xserver internals on selection managment. Harold or
Kensuke, can you please comment this?

That design would remove the need for an external app (or another thread)
which acts as client and is therefore bound to the security problems.

bye
    ago

NP: Project Pitchfork - Go further
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 19:33                   ` Alexander Gottwald
@ 2004-01-02 19:49                     ` Thomas Dickey
  2004-01-02 20:15                       ` Alexander Gottwald
  2004-01-02 22:50                     ` Chris Green
  1 sibling, 1 reply; 28+ messages in thread
From: Thomas Dickey @ 2004-01-02 19:49 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, 2 Jan 2004, Alexander Gottwald wrote:

> Chris Green wrote:
>
> > The xterm that one runs by clicking on the cygwin icon, the standard
> > cygwin (not cygwin/X) terminal window.
>
> This is not xterm. This is just a windows console with bash.

The windows console talks to the windows clipboard.
Does the X clipboard talk to the windows clipboard (or will it someday)?

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 18:03                 ` Chris Green
@ 2004-01-02 19:33                   ` Alexander Gottwald
  2004-01-02 19:49                     ` Thomas Dickey
  2004-01-02 22:50                     ` Chris Green
  0 siblings, 2 replies; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 19:33 UTC (permalink / raw)
  To: cygwin-xfree

Chris Green wrote:

> The xterm that one runs by clicking on the cygwin icon, the standard
> cygwin (not cygwin/X) terminal window.

This is not xterm. This is just a windows console with bash.

bye
    ago
NP: Project Pitchfork - Go further
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 18:50                   ` Chris Green
@ 2004-01-02 19:20                     ` Harold L Hunt II
  2004-01-02 22:50                       ` Chris Green
  0 siblings, 1 reply; 28+ messages in thread
From: Harold L Hunt II @ 2004-01-02 19:20 UTC (permalink / raw)
  To: cygwin-xfree

Chris Green wrote:

> On Fri, Jan 02, 2004 at 01:28:22PM -0500, Harold L Hunt II wrote:
> 
>>>It's of little use to be able to allow xwinclip to run on the win2k
>>>system by executing something on the Linux system.  One wants a means
>>>to do it from the X startup script.
>>
>>Sure, one wants to, but there is not a way to do it.  Patches are welcome.
>>
> 
> So are we now saying that what I want to do is impossible?

Umm... I'm not sure what you want to do.  It is not currently possible 
to pre-authenticate xwinclip via xhost from a script run on your Windows 
machine, but it is possible to use the X hosts file like Alexander 
suggested, or to run xhost on the remote machine after logging in.

So, if you want to do the first item, then you would need to try to 
design a change to the X security system and provide a patch that 
implements it.  It would be difficult to design such a change without 
opening up security holes that do not currently exist; or, it may not be 
possible.

> I thought people were initially saying that although the '-clipboard'
> parameter to Xwin wouldn't work when using xdmcp the separate xwinclip
> executable should work OK.  However it would now seem that it's
> actually impossible to execute xwinclip in the situation where one has
> am xdmcp connection to a remote computer.

No, it is not impossible.  Alexander told you how to use xwinclip (run 
xhost on the remote machine once you have logged in), but you did not 
believe him that it worked so you didn't try it.  Remember who is asking 
for help here and who is helping... we are telling you how to do it, you 
just need to try it.

> I'm not complaining (much!), but I am rather confused.  :-)

It's okay.  You'll figure it out.

Harold


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 18:28                 ` Harold L Hunt II
@ 2004-01-02 18:50                   ` Chris Green
  2004-01-02 19:20                     ` Harold L Hunt II
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-02 18:50 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 01:28:22PM -0500, Harold L Hunt II wrote:
> 
> >It's of little use to be able to allow xwinclip to run on the win2k
> >system by executing something on the Linux system.  One wants a means
> >to do it from the X startup script.
> 
> Sure, one wants to, but there is not a way to do it.  Patches are welcome.
> 
So are we now saying that what I want to do is impossible?

I thought people were initially saying that although the '-clipboard'
parameter to Xwin wouldn't work when using xdmcp the separate xwinclip
executable should work OK.  However it would now seem that it's
actually impossible to execute xwinclip in the situation where one has
am xdmcp connection to a remote computer.

I'm not complaining (much!), but I am rather confused.  :-)

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 18:00               ` Chris Green
@ 2004-01-02 18:28                 ` Harold L Hunt II
  2004-01-02 18:50                   ` Chris Green
  2004-01-02 20:13                 ` Alexander Gottwald
  1 sibling, 1 reply; 28+ messages in thread
From: Harold L Hunt II @ 2004-01-02 18:28 UTC (permalink / raw)
  To: cygwin-xfree

Chris Green wrote:

> On Fri, Jan 02, 2004 at 05:10:57PM +0100, Alexander Gottwald wrote:
> 
>>On Fri, 2 Jan 2004, Chris Green wrote:
>>
>>
>>>But if I run xhost in that session I will be setting xhost permissions
>>>on the Linux Slackware system which is most definitely not what is
>>>required.
>>
>>No. It sets the permissions of the __xserver__ to which the session belongs.
>>
>>Try it!
>>
>>linux$ echo $DISPLAY
>>win2k.local.net:0.0
>>linux$ xhost 127.0.0.1
>>127.0.0.1 being added to access control list
>>linux$ xhost            
>>access control enabled, only authorized clients can connect
>>INET:localhost
>>linux$ DISPLAY=127.0.0.1:0.0 xhost
>>xhost:  unable to open display "127.0.0.1:0.0"
>> 
>>win2k$ DISPLAY=127.0.0.1:0 xhost
>>access control enabled, only authorized clients can connect
>>INET:win2k
>>
>>
>>>It seems very odd that xhost requires access to the local display in
>>>order to work as you need xhost to set permission to acces the local
>>>display - sort of catch 22.
>>
>>Same with the gates of a castle. To get in, you must open it from inside.
>>This is the main principle of security. You can not allow those who have
>>no access to change the permissions. 
>>
> 
> ... but I am "within the castle", I'm sitting running a script on the
> win2k system and I can't see how to run xwinclip there because it
> won't give me permission to display on the terminal that I'm already
> using.

Argue if you want, it won't change the way that the X security model was 
designed and works.

> It's of little use to be able to allow xwinclip to run on the win2k
> system by executing something on the Linux system.  One wants a means
> to do it from the X startup script.

Sure, one wants to, but there is not a way to do it.  Patches are welcome.

Harold


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 17:27               ` Alexander Gottwald
@ 2004-01-02 18:03                 ` Chris Green
  2004-01-02 19:33                   ` Alexander Gottwald
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-02 18:03 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 06:27:42PM +0100, Alexander Gottwald wrote:
> On Fri, 2 Jan 2004, Chris Green wrote:
> 
> > The "start /B xhost 127.0.0.1" and the "start /B xwinclip" both fail
> > because they haven't got permission to access display 127.0.0.1:0.0.
> > 
> > How on earth can one set this permission if xhost can't be run?
> 
> create a file /etc/X0.hosts and add all hosts which should have access
> to the xserver.
> 
Ah, now that seems a good idea, thanks!

> > The xterm one is running in has permission to display so why can't
> > xhost and xwinterm display there too?
> 
> Which xterm? The one from linux has permission because you started it 
> from the xdm session. The one from windows has no permission because
> someone might have logged on the the windows host and started it from
> there. This is a simple security issue.
> 
The xterm that one runs by clicking on the cygwin icon, the standard
cygwin (not cygwin/X) terminal window.  It's there that I'm trying to
start my session from (well, actually it's a batch file, but I'm
running it from that window).

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 16:10             ` Alexander Gottwald
@ 2004-01-02 18:00               ` Chris Green
  2004-01-02 18:28                 ` Harold L Hunt II
  2004-01-02 20:13                 ` Alexander Gottwald
  0 siblings, 2 replies; 28+ messages in thread
From: Chris Green @ 2004-01-02 18:00 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 05:10:57PM +0100, Alexander Gottwald wrote:
> On Fri, 2 Jan 2004, Chris Green wrote:
> 
> > But if I run xhost in that session I will be setting xhost permissions
> > on the Linux Slackware system which is most definitely not what is
> > required.
> 
> No. It sets the permissions of the __xserver__ to which the session belongs.
> 
> Try it!
> 
> linux$ echo $DISPLAY
> win2k.local.net:0.0
> linux$ xhost 127.0.0.1
> 127.0.0.1 being added to access control list
> linux$ xhost            
> access control enabled, only authorized clients can connect
> INET:localhost
> linux$ DISPLAY=127.0.0.1:0.0 xhost
> xhost:  unable to open display "127.0.0.1:0.0"
>  
> win2k$ DISPLAY=127.0.0.1:0 xhost
> access control enabled, only authorized clients can connect
> INET:win2k
> 
> > It seems very odd that xhost requires access to the local display in
> > order to work as you need xhost to set permission to acces the local
> > display - sort of catch 22.
> 
> Same with the gates of a castle. To get in, you must open it from inside.
> This is the main principle of security. You can not allow those who have
> no access to change the permissions. 
> 
... but I am "within the castle", I'm sitting running a script on the
win2k system and I can't see how to run xwinclip there because it
won't give me permission to display on the terminal that I'm already
using.

It's of little use to be able to allow xwinclip to run on the win2k
system by executing something on the Linux system.  One wants a means
to do it from the X startup script.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 15:20             ` Chris Green
@ 2004-01-02 17:27               ` Alexander Gottwald
  2004-01-02 18:03                 ` Chris Green
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 17:27 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

On Fri, 2 Jan 2004, Chris Green wrote:

> The "start /B xhost 127.0.0.1" and the "start /B xwinclip" both fail
> because they haven't got permission to access display 127.0.0.1:0.0.
> 
> How on earth can one set this permission if xhost can't be run?

create a file /etc/X0.hosts and add all hosts which should have access
to the xserver.

> The xterm one is running in has permission to display so why can't
> xhost and xwinterm display there too?

Which xterm? The one from linux has permission because you started it 
from the xdm session. The one from windows has no permission because
someone might have logged on the the windows host and started it from
there. This is a simple security issue.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 14:44           ` Chris Green
  2004-01-02 15:20             ` Chris Green
@ 2004-01-02 16:10             ` Alexander Gottwald
  2004-01-02 18:00               ` Chris Green
  1 sibling, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 16:10 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

On Fri, 2 Jan 2004, Chris Green wrote:

> But if I run xhost in that session I will be setting xhost permissions
> on the Linux Slackware system which is most definitely not what is
> required.

No. It sets the permissions of the __xserver__ to which the session belongs.

Try it!

linux$ echo $DISPLAY
win2k.local.net:0.0
linux$ xhost 127.0.0.1
127.0.0.1 being added to access control list
linux$ xhost            
access control enabled, only authorized clients can connect
INET:localhost
linux$ DISPLAY=127.0.0.1:0.0 xhost
xhost:  unable to open display "127.0.0.1:0.0"
 
win2k$ DISPLAY=127.0.0.1:0 xhost
access control enabled, only authorized clients can connect
INET:win2k

> It seems very odd that xhost requires access to the local display in
> order to work as you need xhost to set permission to acces the local
> display - sort of catch 22.

Same with the gates of a castle. To get in, you must open it from inside.
This is the main principle of security. You can not allow those who have
no access to change the permissions. 

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 14:44           ` Chris Green
@ 2004-01-02 15:20             ` Chris Green
  2004-01-02 17:27               ` Alexander Gottwald
  2004-01-02 16:10             ` Alexander Gottwald
  1 sibling, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-02 15:20 UTC (permalink / raw)
  To: cygwin-xfree

Well I'm getting a little further with this problem but I'm still
hitting the fundamental problem that xhost can't set the required
local display permission so that xwinclip can be run.

Thus I have the following .bat file to start the xdm session:-

    SET DISPLAY=127.0.0.1:0.0

    SET REMOTE_HOST=192.168.13.1

    SET CYGWIN_ROOT=\cygwin

    SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%


    REM Cleanup after last run.

    if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
    attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
    del %CYGWIN_ROOT%\tmp\.X11-unix\X0

    :CLEANUP-FINISH
    if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir
    %CYGWIN_ROOT%\tmp\.X11-unix

    echo startxdmcp.bat - Starting on Windows NT/2000/XP

    start /B XWin -query %REMOTE_HOST%
    start /B xhost 127.0.0.1
    start /B xwinclip


The "start /B xhost 127.0.0.1" and the "start /B xwinclip" both fail
because they haven't got permission to access display 127.0.0.1:0.0.

How on earth can one set this permission if xhost can't be run?

The xterm one is running in has permission to display so why can't
xhost and xwinterm display there too?

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 14:33         ` Alexander Gottwald
@ 2004-01-02 14:44           ` Chris Green
  2004-01-02 15:20             ` Chris Green
  2004-01-02 16:10             ` Alexander Gottwald
  0 siblings, 2 replies; 28+ messages in thread
From: Chris Green @ 2004-01-02 14:44 UTC (permalink / raw)
  To: cygwin-xfree

On Fri, Jan 02, 2004 at 03:33:42PM +0100, Alexander Gottwald wrote:
> On Fri, 2 Jan 2004, Chris Green wrote:
> 
> > The trouble is that when I run 'xhost 127.0.0.1' in a cygwin window on
> > my win2k system I just get the error:-
> >     xhost: unable to open display ""
> 
> that would be DISPLAY=127.0.0.1:0 xhost 127.0.0.1
> 
> But most likely you will have no access from windows. Run xhost from the 
> session started via xdmcp.
> 
But if I run xhost in that session I will be setting xhost permissions
on the Linux Slackware system which is most definitely not what is
required.

It seems very odd that xhost requires access to the local display in
order to work as you need xhost to set permission to acces the local
display - sort of catch 22.

If I open just a cygwin terminal window on my Win2k system I simply
can't run xhost at all.

E.G.:-

    $ xhost
    xhost: Unable to open display ""

    $ export DISPLAY=192.168.13.25:0.0
    $ xhost
    Xlib: connection to 192.168.13.25:0.0 refused by server
    Xlib: no protocol specified

    xhost: Unable to open display 192.168.13.25:0.0

So how can one ever run xhost (and thus xwinclip)?

> > What should the DISPLAY environment variable be set to for the local
> > display?  I'm used to setting it for remote systems but I can't get
> > the right value for this one.
> 
> Fot the local display this is 127.0.0.1:0 or :0
> 
Maybe my win2k set up is wonly but 127.0.0.1 won't work for me, the
actual IP address of 192.168.13.25 does work though.  However a second
try seems to be OK, maybe I'd got into a mess before.  The 'catch 22'
above still applies though.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-02 14:04       ` Chris Green
@ 2004-01-02 14:33         ` Alexander Gottwald
  2004-01-02 14:44           ` Chris Green
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-02 14:33 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

On Fri, 2 Jan 2004, Chris Green wrote:

> The trouble is that when I run 'xhost 127.0.0.1' in a cygwin window on
> my win2k system I just get the error:-
>     xhost: unable to open display ""

that would be DISPLAY=127.0.0.1:0 xhost 127.0.0.1

But most likely you will have no access from windows. Run xhost from the 
session started via xdmcp.

> What should the DISPLAY environment variable be set to for the local
> display?  I'm used to setting it for remote systems but I can't get
> the right value for this one.

Fot the local display this is 127.0.0.1:0 or :0

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-01 18:26     ` Alexander Gottwald
@ 2004-01-02 14:04       ` Chris Green
  2004-01-02 14:33         ` Alexander Gottwald
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-02 14:04 UTC (permalink / raw)
  To: cygwin-xfree

On Thu, Jan 01, 2004 at 07:26:45PM +0100, Alexander Gottwald wrote:
> Chris Green wrote:
> 
> > Do I then need to run a *local* cygwin window on my win2k system and
> > run 'xwinclip'?  In that case what will running 'xhost 127.0.0.1' on
> > the remote system do?  (I know what xhost does, I just don't see what
> > it has to do with running xwinclip).
> 
> The xserver running on the windows host is setup to accept only clients
> from the session started by xdm. xhost now tells the server (which is
> on the windows computer) to allow connections from local (to the xserver)
> clients.
> 
> This means the xhost 127.0.0.1 tells the xserver to accept connections
> from the windows host. After that you can start xwinclip on the windows
> host.
> 
The trouble is that when I run 'xhost 127.0.0.1' in a cygwin window on
my win2k system I just get the error:-
    xhost: unable to open display ""

What should the DISPLAY environment variable be set to for the local
display?  I'm used to setting it for remote systems but I can't get
the right value for this one.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
  2004-01-01 15:37   ` Chris Green
@ 2004-01-01 18:26     ` Alexander Gottwald
  2004-01-02 14:04       ` Chris Green
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Gottwald @ 2004-01-01 18:26 UTC (permalink / raw)
  To: cygwin-xfree, chris.green

Chris Green wrote:

> Do I then need to run a *local* cygwin window on my win2k system and
> run 'xwinclip'?  In that case what will running 'xhost 127.0.0.1' on
> the remote system do?  (I know what xhost does, I just don't see what
> it has to do with running xwinclip).

The xserver running on the windows host is setup to accept only clients
from the session started by xdm. xhost now tells the server (which is
on the windows computer) to allow connections from local (to the xserver)
clients.

This means the xhost 127.0.0.1 tells the xserver to accept connections
from the windows host. After that you can start xwinclip on the windows
host.

bye
        ago
NP: Letzte Instanz - Glockenrequiem
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Possible to use clipboard with remote/xdm connection?
       [not found] ` <3FF34EE3.9070300@msu.edu>
@ 2004-01-01 15:37   ` Chris Green
  2004-01-01 18:26     ` Alexander Gottwald
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2004-01-01 15:37 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, Dec 31, 2003 at 05:34:11PM -0500, Harold L Hunt II wrote:
> Chris Green wrote:
> 
> >Should it be possible to get the '-clipboard' parameter to work with
> >cyxwin/X when connecting to a remote xdm program?
> >
> >I'm using cygwin/X on a win2k system to connect to a Slackware Linux
> >(9.1) system on my home LAN.  Is it possible to get clipboard
> >cut/paste to work either to or from my WIn2k desktop?
> >
> 
> I think there is a timing and authentication problem with the internal 
> -clipboard implementation and remote XDM sessions.  You can, instead, 
> use the 'xwinclip' program (installed via Cygwin's setup.exe) and wait 
> to launch it until after you have logged in to your remote XDM host. 
> You may have to run 'xhost 127.0.0.1' on the remote host after you have 
> logged in.
> 
I'm a little confused as to what I should do where! :-)

I start up cygwin/x and it immediately displays the xdm login from the
slackware system.  The only thing I can do then is log into to my
linux system.

Do I then need to run a *local* cygwin window on my win2k system and
run 'xwinclip'?  In that case what will running 'xhost 127.0.0.1' on
the remote system do?  (I know what xhost does, I just don't see what
it has to do with running xwinclip).

Or have I got hold of completely the wrong end of the stick?

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Possible to use clipboard with remote/xdm connection?
@ 2003-12-31 23:21 Chris Green
       [not found] ` <3FF34EE3.9070300@msu.edu>
  0 siblings, 1 reply; 28+ messages in thread
From: Chris Green @ 2003-12-31 23:21 UTC (permalink / raw)
  To: cygwin-xfree

Should it be possible to get the '-clipboard' parameter to work with
cyxwin/X when connecting to a remote xdm program?

I'm using cygwin/X on a win2k system to connect to a Slackware Linux
(9.1) system on my home LAN.  Is it possible to get clipboard
cut/paste to work either to or from my WIn2k desktop?

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2004-01-12 20:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-12 19:57 Possible to use clipboard with remote/xdm connection? Kevin Markle
2004-01-12 20:00 ` Harold L Hunt II
  -- strict thread matches above, loose matches on Subject: below --
2003-12-31 23:21 Chris Green
     [not found] ` <3FF34EE3.9070300@msu.edu>
2004-01-01 15:37   ` Chris Green
2004-01-01 18:26     ` Alexander Gottwald
2004-01-02 14:04       ` Chris Green
2004-01-02 14:33         ` Alexander Gottwald
2004-01-02 14:44           ` Chris Green
2004-01-02 15:20             ` Chris Green
2004-01-02 17:27               ` Alexander Gottwald
2004-01-02 18:03                 ` Chris Green
2004-01-02 19:33                   ` Alexander Gottwald
2004-01-02 19:49                     ` Thomas Dickey
2004-01-02 20:15                       ` Alexander Gottwald
2004-01-02 20:56                         ` Thomas Dickey
2004-01-02 21:33                           ` Harold L Hunt II
2004-01-02 21:40                             ` Thomas Dickey
2004-01-02 21:44                               ` Harold L Hunt II
2004-01-02 22:50                     ` Chris Green
2004-01-02 16:10             ` Alexander Gottwald
2004-01-02 18:00               ` Chris Green
2004-01-02 18:28                 ` Harold L Hunt II
2004-01-02 18:50                   ` Chris Green
2004-01-02 19:20                     ` Harold L Hunt II
2004-01-02 22:50                       ` Chris Green
2004-01-02 20:13                 ` Alexander Gottwald
2004-01-02 22:43                   ` Chris Green
2004-01-03 11:00                     ` Alexander Gottwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).