Using Axis-Remote over SSH

More
13 Jan 2012 22:33 #16739 by spartan21
I'm running AXIS on Ubuntu 10.04, and the 'axis-remote' feature works locally. I am able to do most everything I'd like with axis-remote, except open files in AXIS. Does anyone know how to accomplish this?

But now regarding the topic of my post, I am having trouble getting axis-remote to work over ssh. My remote computer is a Mac running Lion, and I am using 'ssh -X' in Terminal to connect. When I type only 'axis-remote', I get the usage information:

Usage: axis-remote
axis-remote [-c|-p|-r|-q|-m command]

But when I type any command, it throws the line "no application named "axis"". This is contradictory, since it definitely recognizes that axis-remote exists (as evidenced by the usage information).

Can anyone help as to where to start fixing this? Thanks!

Please Log in or Create an account to join the conversation.

More
13 Jan 2012 22:39 - 13 Jan 2012 22:41 #16740 by spartan21
I figured out how to load a file (simply 'axis-remote filename'), but over ssh I get the following error:

Traceback (most recent call last):
File "/usr/bin/axis-remote", line 78, in <module>
t = Tkinter.Tk(); t.wm_withdraw()
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1646, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:10.0"

Maybe this can help with why other ssh commands aren't working. Thanks again for your help.


Edit: I tried connecting using "ssh -Y" instead of "ssh -X" and now when I try to load a file using the aforementioned method I get the same "no application named "axis"" as with the other commands.
Last edit: 13 Jan 2012 22:41 by spartan21.

Please Log in or Create an account to join the conversation.

More
14 Jan 2012 02:25 #16749 by dgarrett
I think your error is consistent with X11 not running on your mac-lion host.


Does a command with no use of X11 work, for example:

$ from_mac_machine ssh -X name_of_emc_machine date

Does a simple command that uses X11 work, for example:

$ from_mac_machine ssh -X name_of_emc_machine xeyes

If either of these fail, what are the error messages if any?

Please Log in or Create an account to join the conversation.

More
14 Jan 2012 23:55 #16776 by andypugh
I ssh from my Mac to EMC on a very regular basis (in fact, I code in Xcode and compile on the EMC2 machine.)
ssh -X does not work for opengl applications at all, but does for others, so I can open a remote stepconf, or a remote TkEMC, but I can't open a remote Axis.

However, the error returned is not the one you are seeing, (I can't remember the details, but it is definitely about something graphical)

Please Log in or Create an account to join the conversation.

More
15 Jan 2012 22:41 #16793 by spartan21
I appreciate your responses!

dgarrett, X11 is definitely running on my mac, and this is confirmed by 'xeyes' working properly (as well as 'date'). But taking a step back, and this refers to andypugh's post as well, would the type of control I'm trying to achieve even be possible?

Or maybe this error has something to do with my axis-remote commands trying to reference an AXIS instance in X11 (which doesn't exist), when they should be referencing the already running instance of AXIS on my Linux machine?

Please Log in or Create an account to join the conversation.

More
16 Jan 2012 00:15 #16798 by dgarrett
Maybe axis isn't running?

What is the result of this command:

$ from_remote_machine ssh -X name_of_emc_machine ps ax|grep -iE axis\|emc

(all one line)

Please Log in or Create an account to join the conversation.

More
16 Jan 2012 02:21 #16800 by spartan21
The command causes the EMC2 configuration tool to open. But when I select my existing configuration with AXIS already running on the Linux machine, it asks if I would like to restart AXIS or not. When I select 'yes' the Linux screen goes black and becomes unresponsive, and my remote connection eventually times out and disconnects.

Without AXIS already running, the configuration process continues, but I receive an error and the configuration process halts:


Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.5
EMC2 - 2.4.6
Machine configuration directory is '/home/jeff/emc2/configs/beam_mapper'
Machine configuration file is 'beam_mapper.ini'
INIFILE=/home/jeff/emc2/configs/beam_mapper/beam_mapper.ini
PARAMETER_FILE=emc.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=
DISPLAY=axis
NML_FILE=
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting EMC2 IO program: io
Starting EMC2 TASK program: milltask
Starting EMC2 DISPLAY program: axis
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=1979
Killing task milltask, PID=2047
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0xffffffff
Serial number of failed request: 736
Current serial number in output stream: 737
1979
PID TTY STAT TIME COMMAND
2047
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 274.389111] I-pipe: Domain RTAI registered.
[ 274.389130] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 274.389137] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 274.389262] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 274.389269] PIPELINE layers:
[ 274.389276] fa0fde20 9ac15d93 RTAI 200
[ 274.389283] c085cb20 0 Linux 100
[ 274.438021] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 274.438698] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 274.438714] RTAI[sched]: hard timer type/freq = APIC/12499768(Hz); default timing: periodic; linear timed lists.
[ 274.438725] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1800053000 hz.
[ 274.438732] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 274.438868] RTAI[usi]: enabled.
[ 274.518336] RTAI[math]: loaded.
[ 274.634932] config string '0x378 out '
[ 278.966278] RTAI[math]: unloaded.
[ 279.008815] SCHED releases registered named ALIEN RTGLBH
[ 279.076448] RTAI[malloc]: unloaded.
[ 279.176030] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 279.182421] I-pipe: Domain RTAI unregistered.
[ 279.182572] RTAI[hal]: unmounted.

Please Log in or Create an account to join the conversation.

More
16 Jan 2012 03:11 #16801 by dgarrett
sorry, either joomla or I omitted a backslash (\) character in the example
command for grep with multiple expressions

I'm trying to suggest running a ps command to determine if axis and/or
other emc related programs are running.

ps ax ________________ Shows all processes
| ____________________ Pipes output to the next command
grep -iE 'axis|emc' ______ looks for emc related items in output from ps

maybe using single quotes will help, you could try:

$ from_remote_machine ssh -X name_of_emc_machine ps ax|grep -iE 'axis|emc'

(all one line)

On my test, I get:

$ ssh -X u51 ps ax|grep -iE axis\|emc
16971 pts/2 S+ 0:00 /bin/bash /home/git/emc/scripts/emc sim_mill.ini
17000 pts/2 S+ 0:00 emcsvr -ini /home/gemc/mysim/sim_mill.ini
17009 pts/2 S+ 0:02 io -ini /home/gemc/mysim/sim_mill.ini
17011 pts/2 S+ 0:18 halui -ini /home/gemc/mysim/sim_mill.ini
17016 pts/2 S+ 3:22 /home/git/emc/bin/rtapi_app load trivkins
17022 pts/2 Sl+ 1:33 /usr/bin/python /home/git/emc/bin/hal_manualtoolchange
17027 pts/2 S+ 5:28 milltask -ini /home/gemc/mysim/sim_mill.ini
17028 pts/2 Sl+ 2:58 /usr/bin/python /home/git/emc/bin/axis -ini /home/gemc/mysim/sim_mill.ini

showing the relevant processes on the machine named u51

However, your note that "it asks if I would like to restart AXIS or not"
indicates axis is running so I'm out of ideas.

Based on Andy's remark about opengl, the command glxinfo might give
some information, e.g.:

$ from_remote_machine ssh -X emc_machine glxinfo

Maybe emcrsh will do what you want, for info:
$ man emcrsh

Please Log in or Create an account to join the conversation.

More
16 Jan 2012 11:12 #16810 by andypugh
dgarrett wrote:

I'm trying to suggest running a ps command to determine if axis and/or
other emc related programs are running.


It is worth noting that the default shell in Lion is bash, but you might have a carryover setting which is over-riding that. (the default used to be tcsh)

Please Log in or Create an account to join the conversation.

More
16 Jan 2012 12:41 #16813 by andypugh
spartan21 wrote:

The command causes the EMC2 configuration tool to open. But when I select my existing configuration with AXIS already running on the Linux machine, it asks if I would like to restart AXIS or not. When I select 'yes' the Linux screen goes black and becomes unresponsive, and my remote connection eventually times out and disconnects.
...
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)

This matches my experience.
So far I have been unable to run any application which uses OpenGL via ssh -X.
You will probably find that you can run the tkemc examples without any trouble.

Does VNC offer you what you want? You can type vnc://servername in the Connect to Server dialog and control the remote computer that way, which is what I tend to do.

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum