openxenmanager icon indicating copy to clipboard operation
openxenmanager copied to clipboard

Openxenmanager on Mac console not working

Open mrmanishs opened this issue 11 years ago • 16 comments

Openxenmanager on Mac console not working. It just has a blank screen area (screenshot attached). I installed vncviewer and updated my config file to that one and have the latest gtk+ on python 2.7.8.

screen shot 2014-10-16 at 12 01 41 pm

I think I'm missing something, but not sure what. Any guidance would be helpful here. Whenever I click a button in the console, I get the following errors in my terminal:

"Send Ctrl-Alt-Del":

Traceback (most recent call last):
  File "./src/OXM/window_vm.py", line 85, in on_btsendctraltdel_clicked
    self.on_menuitem_tools_cad_activate(widget, data)
  File "./src/OXM/window_menuitem.py", line 995, in on_menuitem_tools_cad_activate
    self.tunnel.send_data("\xfe\x01\x00\x00\x00\x00\x00\x1d")
  File "./src/OXM/tunnel.py", line 109, in send_data
    self.server_fd.send(data)
AttributeError: 'NoneType' object has no attribute 'send'

"Copy selected text":

Traceback (most recent call last):
  File "./src/OXM/window_vm.py", line 115, in on_btcopytext_clicked
    clipboard = self.vnc.get_clipboard(gtk.gdk.SELECTION_CLIPBOARD)
AttributeError: oxcWindow instance has no attribute 'vnc'

"Enter fullscreen": (This does open it in a new window, but nothing is in it)

Traceback (most recent call last):
  File "./src/OXM/window_vm.py", line 150, in on_btenterfullscreen_clicked
    self.builder.get_object("console_area").remove(self.vnc)
AttributeError: oxcWindow instance has no attribute 'vnc'

"Undock":(This does open it in a new window, but nothing is in it)

Traceback (most recent call last):
  File "./src/OXM/window_vm.py", line 132, in on_btundockconsole_clicked
    self.builder.get_object("console_area").remove(self.vnc)
AttributeError: oxcWindow instance has no attribute 'vnc'

mrmanishs avatar Oct 16 '14 16:10 mrmanishs

Thanks for the report. Console suport on both Windows and Mac is rather flakey as OpenXenManager currently has to launch an ouside VNC viewer.

I've been able to test Windows okay... but not Mac as I don't have one... Hopefully you might be able to help point me in the right direction!

Currently we open vncviewer using the following:

elif sys.platform == "darwin":
    # Run ./vncviewer with host, vm renf and session ref
    self.tunnel = Tunnel(self.xc_servers[host].session_uuid, location)
    port = self.tunnel.get_free_port()
    Thread(target=self.tunnel.listen, args=(port,)).start()
    time.sleep(1)
    os.spawnl(os.P_NOWAIT, "./vncviewer", "vncviewer", "localhost::%s" % port)
    console_area = self.builder.get_object("console_area")
    console_alloc = console_area.get_allocation()

I suspect the error may lay in the os.spawnl line, possibly the second parameter which based upon my Linux experience is looking for vncviewer in the same directory e.g: ./

Hopefully you might be able to give me some pointers on how vncviewer is launched on Mac from a terminal

As for the buttons, I'm aware there are some major problems with these... and they are on the to-do list!

TwoWheelDev avatar Oct 16 '14 16:10 TwoWheelDev

Daniel,

Thanks for replying. No problem about the buttons, I just waned to give you more information if it helps.

I'm using a command line executable : /usr/local/bin/vncviewer

In options, I have: [options] vnc_viewer = '/usr/local/bin/vncviewer'

When I run it, I get the attached screenshot.

The command lines for vncviewer are:

TigerVNC Viewer 64-bit v1.3.1 (20141016) Built on Oct 16 2014 at 11:36:23 Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt) See http://www.tigervnc.org for information on TigerVNC.

usage: ./vncviewer [parameters] [host:displayNum] [parameters] ./vncviewer [parameters] -listen [port] [parameters]

Parameters can be turned on with - or off with -=0 Parameters which take a value can be specified as - Other valid forms are = -= --= Parameter names are case-insensitive. The parameters are:

Global Parameters: ZlibLevel - Zlib compression level (default=-1) Log - Specifies which log output should be directed to which target logger, and the level of output to log. Format is ::[, ...]. (default=) ImprovedHextile - Use improved compression algorithm for Hextile encoding which achieves better compression ratios by the cost of using more CPU time (default=1) via - Gateway to tunnel via (default=) FullscreenSystemKeys - Pass special keys (like Alt+Tab) directly to the server when in full screen mode. (default=1) MenuKey - The key which brings up the popup menu (default=F8) SendPrimary - Send the primary selection and cut buffer to the server as well as the clipboard selection (default=1) SendClipboard - Send clipboard changes to the server (default=1) AcceptClipboard - Accept clipboard changes from the server (default=1) Shared - Don't disconnect other viewers upon connection - share the desktop instead (default=0) ViewOnly - Don't send any mouse or keyboard events to the server (default=0) RemoteResize - Dynamically resize the remote desktop size as the size of the local client window changes. (Does not work with all servers) (default=1) listen - Listen for connections from VNC servers (default=0) geometry - Specify size and position of viewer window (default=) DesktopSize - Reconfigure desktop size on the server on connect (if possible) (default=) FullScreen - Full screen mode (default=0) Maximize - Maximize viewer window (default=0) QualityLevel - JPEG quality level. 0 = Low, 9 = High (default=8) NoJPEG - Disable lossy JPEG compression in Tight encoding. (default=0) CompressLevel - Use specified compression level 0 = Low, 6 = High (default=2) CustomCompressLevel - Use custom compression level. Default if CompressLevel is specified. (default=0) PreferredEncoding - Preferred encoding to use (Tight, ZRLE, Hextile or Raw) (default=Tight) LowColourLevel - Alias for LowColorLevel LowColorLevel - Color level to use on slow connections. 0 = Very Low (8 colors), 1 = Low (64 colors), 2 = Medium (256 colors) (default=2) FullColour - Alias for FullColor FullColor - Use full color (default=1) AutoSelect - Auto select pixel format and encoding. Default if PreferredEncoding and FullColor are not specified. (default=1) passwd - Alias for PasswordFile PasswordFile - Password file for VNC authentication (default=) DotWhenNoCursor - Show the dot cursor when the server sends an invisible cursor (default=0) PointerEventInterval - Time in milliseconds to rate-limit successive pointer events (default=0) Viewer Parameters: x509crl - X509 CRL file (default=) x509ca - X509 CA certificate (default=) SecurityTypes - Specify which security scheme to use (None, VncAuth) (default=X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None)

Let me know if I can provide anything else to help.

Manish

On Oct 16, 2014, at 12:16 PM, Daniel Lintott [email protected] wrote:

Thanks for the report. Console suport on both Windows and Mac is rather flakey as OpenXenManager currently has to launch an ouside VNC viewer.

I've been able to test Windows okay... but not Mac as I don't have one... Hopefully you might be able to help point me in the right direction!

Currently we open vncviewer using the following:

elif sys.platform == "darwin": # Run ./vncviewer with host, vm renf and session ref self.tunnel = Tunnel(self.xc_servers[host].session_uuid, location) port = self.tunnel.get_free_port() Thread(target=self.tunnel.listen, args=(port,)).start() time.sleep(1) os.spawnl(os.P_NOWAIT, "./vncviewer", "vncviewer", "localhost::%s" % port) console_area = self.builder.get_object("console_area") console_alloc = console_area.get_allocation() I suspect the error may lay in the os.spawnl line, possibly the second parameter which based upon my Linux experience is looking for vncviewer in the same directory e.g: ./

Hopefully you might be able to give me some pointers on how vncviewer is launched on Mac from a terminal

As for the buttons, I'm aware there are some major problems with these... and they are on the to-do list!

— Reply to this email directly or view it on GitHub.

mrmanishs avatar Oct 16 '14 16:10 mrmanishs

One more note - I ended up linking /usr/local/bin/vncviewer to my directory where openxenmanager resides.

Now it gives me this when I click on console, but nothing still displays.

TigerVNC Viewer 64-bit v1.3.1 (20141016) Built on Oct 16 2014 at 11:36:23 Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt) See http://www.tigervnc.org for information on TigerVNC.

Thu Oct 16 12:25:02 2014 CConn: connected to host localhost port 56851

:)

On Oct 16, 2014, at 12:16 PM, Daniel Lintott [email protected] wrote:

Thanks for the report. Console suport on both Windows and Mac is rather flakey as OpenXenManager currently has to launch an ouside VNC viewer.

I've been able to test Windows okay... but not Mac as I don't have one... Hopefully you might be able to help point me in the right direction!

Currently we open vncviewer using the following:

elif sys.platform == "darwin": # Run ./vncviewer with host, vm renf and session ref self.tunnel = Tunnel(self.xc_servers[host].session_uuid, location) port = self.tunnel.get_free_port() Thread(target=self.tunnel.listen, args=(port,)).start() time.sleep(1) os.spawnl(os.P_NOWAIT, "./vncviewer", "vncviewer", "localhost::%s" % port) console_area = self.builder.get_object("console_area") console_alloc = console_area.get_allocation() I suspect the error may lay in the os.spawnl line, possibly the second parameter which based upon my Linux experience is looking for vncviewer in the same directory e.g: ./

Hopefully you might be able to give me some pointers on how vncviewer is launched on Mac from a terminal

As for the buttons, I'm aware there are some major problems with these... and they are on the to-do list!

— Reply to this email directly or view it on GitHub.

mrmanishs avatar Oct 16 '14 16:10 mrmanishs

Okay... I've just made a small edit so that it'll read the vnc_viewer variable on Mac now.

I shall have to take more of a look into why the console isn't actually displaying

TwoWheelDev avatar Oct 16 '14 16:10 TwoWheelDev

One more note - I ended up linking /usr/local/bin/vncviewer to my directory where openxenmanager resides.

Now it gives me this when I click on console, but nothing stil

TigerVNC Viewer 64-bit v1.3.1 (20141016) Built on Oct 16 2014 at 11:36:23 Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt) See http://www.tigervnc.org for information on TigerVNC.

Thu Oct 16 12:25:02 2014 CConn: connected to host localhost port 56851

:)

mrmanishs avatar Oct 16 '14 16:10 mrmanishs

Thanks Daniel.

When do you think you would be able to look at it? I'm somewhat dependent on this to set up my servers.

On Oct 16, 2014, at 12:31 PM, Daniel Lintott [email protected] wrote:

Okay... I've just made a small edit so that it'll read the vnc_viewer variable on Mac now.

I shall have to take more of a look into why the console isn't actually displaying

— Reply to this email directly or view it on GitHub.

mrmanishs avatar Oct 16 '14 16:10 mrmanishs

I shall endevour to look into it in the next few days

TwoWheelDev avatar Oct 16 '14 18:10 TwoWheelDev

Cool.

On Thu, Oct 16, 2014 at 2:22 PM, Daniel Lintott [email protected] wrote:

I shall endevour to look into it in the next few days

— Reply to this email directly or view it on GitHub https://github.com/OpenXenManager/openxenmanager/issues/45#issuecomment-59406463 .

mrmanishs avatar Oct 16 '14 18:10 mrmanishs

Another item I tried is I loaded Ubuntu 14.04 into Virtualbox and tried it on there. I'm seeing the same issue as well where the console does not display anything.

On Oct 16, 2014, at 2:22 PM, Manish Shah [email protected] wrote:

Cool.

On Thu, Oct 16, 2014 at 2:22 PM, Daniel Lintott [email protected] wrote: I shall endevour to look into it in the next few days

— Reply to this email directly or view it on GitHub.

mrmanishs avatar Oct 16 '14 18:10 mrmanishs

When I click on the console tab I get:

Traceback (most recent call last):
  File "./src/OXM/window.py", line 1023, in on_tabbox_focus_tab
    viewer = self.config['options']['vnc_viewer']
  File "/usr/local/lib/python2.7/site-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'options'

Which config file am I supposed to edit? The one in src/OXM/oxc.conf? I tried setting it /usr/local/bin/vncviewer made no difference

cscd98 avatar Mar 06 '15 11:03 cscd98

The correct file to edit will be in ~/openxenmanager/oxc.conf

TwoWheelDev avatar Mar 06 '15 16:03 TwoWheelDev

I created the directory ~/openxenmanager and created a file oxc.conf in that location with the contents of:

[options]
vnc_viewer = '/usr/local/bin/vncviewer'

However, I still get the error above

cscd98 avatar Mar 09 '15 09:03 cscd98

Hmm... That's odd! I have started adding some debugging code, that will hopefully help solve this issue

TwoWheelDev avatar Mar 19 '15 01:03 TwoWheelDev

@craigcarnell the config file on Mac OS X is actually ~/.config/openxenmanager/oxc.conf. I was able to get this working after setting the path to vncviewer in that config.

mcm avatar May 16 '15 15:05 mcm

@mcm correct. But if anyone still has any dudes, follow my tutorial (https://github.com/OpenXenManager/openxenmanager/issues/107) or feel free to make a question to me here.

ovflowd avatar Jun 20 '16 18:06 ovflowd

Running iMac HighSierra v10.13.6

Getting the following when trying to access the console of a VM

Built on: 2019-05-09 12:32
Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.

Thu May  9 12:46:57 2019
 CConn:       connected to host localhost port 51011
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/site-packages/openxenmanager-0.1b1-py2.7.egg/OXM/tunnel.py", line 51, in listen
    data = self.server_fd.recv(17)
error: [Errno 54] Connection reset by peer```

ntmggr avatar May 09 '19 09:05 ntmggr