# RubyX11 - how to make it work?

**URL:** <https://www.ruby-forum.com/t/rubyx11-how-to-make-it-work/75282>\
**Category:** Ruby\
**Created:** [November 8, 2006, 9:26pm UTC](https://www.ruby-forum.com/t/rubyx11-how-to-make-it-work/75282 "2006-11-08T21:26:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [November 8, 2006, 9:26pm UTC](https://www.ruby-forum.com/t/rubyx11-how-to-make-it-work/75282/1 "2006-11-08T21:26:29Z")

</div>

Hello

I tried RubyX11. As seen in some sort of example code I tried to  
create an instance of Display first.

However, I get a message about invalid cookie.

0.5 and 0.6pre1 give the same result.

$ irb -I. -r X11/Display  
irb(main):001:0\> X11::Display.new  
auth\_proto\_data:"\321\020\e\234j\364z\0327{^\371PO\323V"  
RuntimeError: Connection to server failed (version 11.0 – Invalid  
MIT-MAGIC-COOKIE-1 key  
from ./X11/Display.rb:261:in `authorization' from ./X11/Display.rb:235:in`connect\_to’  
from ./X11/Display.rb:196:in `initialize' from (irb):1:in`new’  
from (irb):1  
irb(main):002:0\> `xauth extract - $DISPLAY`  
=\>  
“\001\000\000\aheretic\000\0010\000\022MIT-MAGIC-COOKIE-1\000\020f\231N\260\277ve=\267t\235t\016k\237H”  
irb(main):003:0\>

Anything I am doing wrong?

Thanks

Michal
