ssh -X works on 8.7 image but not on 9.5 (Stretch) image

177 views
Skip to first unread message

mugginsac

unread,
Aug 29, 2018, 9:56:01 PM8/29/18
to Machinekit
If I boot the 8.7 image with machinekit I can start linuxcnc or stepconf with ssh -X machi...@beaglebone.local. However, when I try to start linuxcnc or machinekit after logging in with ssh -X machi...@beaglebone.local on the 9.5 (Stretch) image, I get the following error (same error whether I type linuxcnc or machinekit).
-------------------------------------------------------------------
MACHINEKIT - 0.1
application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "image"
    while executing
"image create photo -file $f/$i.gif"
    invoked from within
"if [file exists $f/$i.gif] {
            return [image create photo -file $f/$i.gif]
        }"
    (procedure "linuxcnc::image_search" line 7)
    invoked from within
"linuxcnc::image_search machinekit-wizard"
    invoked from within
"set logo [linuxcnc::image_search machinekit-wizard]"
    (file "/usr/lib/tcltk/linuxcnc/bin/pickconfig.tcl" line 31)
-------------------------------------------------------------------------
Since it works under Jessie and not under Stretch, it seems to me that the change must either have something to do with changes made in  either in machinekit or in Stretch. Anyway help would be appreciated.

Alan

schoo...@gmail.com

unread,
Aug 30, 2018, 9:42:56 AM8/30/18
to machi...@googlegroups.com
We don't make the images.

It is either because the host or client ( or both ) does not have an X server or the address of it is not forwarded.

You cannot run an X gui where the host image is headless with no X-org installed and the client is a windoze box without it either, for example.

Some of the ssh defaults changed in Stretch and have to be specifically enabled to work.

There is lots of info on the net.
For example this
https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Alan Condit

unread,
Aug 30, 2018, 9:59:03 AM8/30/18
to schoo...@gmail.com, machi...@googlegroups.com
I forgot to add I am running ssh from my Mac. Since it works from my Mac to the Jessie 8.7 setup I know my Mac has what it needs in general. So, it is just a question of what I need to add to or change on the Stretch 9.5 setup.

You received this message because you are subscribed to a topic in the Google Groups "Machinekit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/machinekit/1dkgEgov6Wg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

schoo...@gmail.com

unread,
Aug 30, 2018, 10:53:10 AM8/30/18
to Alan Condit, machi...@googlegroups.com
Suggest you look at the image and see if it has an X server for a start

Your mac doesn't unless you have installed some special emulator.

Condit Alan

unread,
Aug 30, 2018, 11:12:59 AM8/30/18
to schoo...@gmail.com, machi...@googlegroups.com
Schooner,

That is the kind of info I was looking for. I have done a bunch of googling and have seen a whole bunch of generalized info about other linux strains, but very little specifically about Debian Stretch. I saw something about installing OpenSSH and related server on Stretch but I didn’t know if anyone else had solved this problem and might have specific info about what is needed to make ssh -X work with machinekit on Stretch.

Once this problem is solved would it be feasible for Robert Nelson to add the fix to the Stretch image?

Thanks,
Alan

schoo...@gmail.com

unread,
Aug 30, 2018, 12:01:43 PM8/30/18
to Condit Alan, machi...@googlegroups.com
https://unix.stackexchange.com/questions/314862/minimal-no-hassle-debian-install-with-functioning-x11-login-etc

`apt install xorg` and install a minimal display and window manager for it to work properly.

The response to `apt install xorg` will tell you if the problem is that it is missing.

Condit Alan

unread,
Aug 30, 2018, 12:26:28 PM8/30/18
to schoo...@gmail.com, machi...@googlegroups.com
Schooner,

machinekit@beaglebone:~$ sudo apt install xorg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package xorg

I guess that is the answer. Xorg is missing. If I had a desktop I would use synaptic package manager to fetch and install everything needed. With just a login through terminal how do I locate, download and install what is needed?

Thanks,
Alan

schoo...@gmail.com

unread,
Aug 30, 2018, 12:46:58 PM8/30/18
to Condit Alan, machi...@googlegroups.com

On 30/08/18 17:26, Condit Alan wrote:
Schooner,

machinekit@beaglebone:~$ sudo apt install xorg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package xorg

I guess that is the answer. Xorg is missing.
No, it is telling you rubbish - saying that a package xorg does not exist in the repositories, which it does
https://packages.debian.org/stretch/xorg

You need to make sure /etc/apt/sources.list is up to date
run 'apt update' then try again.

The result you should get if it is installed is

$ apt install xorg

Building dependency tree      
Reading state information... Done
xorg is already the newest version (1:7.7+19).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Ignore the version, I am running sid.

Condit Alan

unread,
Aug 30, 2018, 2:08:01 PM8/30/18
to schoo...@gmail.com, machi...@googlegroups.com
I updated /etc/apt/sources.list and that didn’t make any difference for me. 
However, I downloaded xorg_7.7+19_armhf.deb and ran the following commands:

sudo dpkg -i xorg_7.7+19_armhf.deb
sudo apt-get install xorg
 (This resulted in a number of errors)
sudo apt-get update
sudo apt-get install -f
logout

Maybe if I had just ran "sudo apt update” it would have worked. I may try that on another uSD.

Anyway I have ssh -X working now. I have another problem but I’ll start a new thread for it.

Thanks,
Alan

Paulo Sherring

unread,
Oct 1, 2018, 12:10:34 PM10/1/18
to Machinekit
Hi! Don't know if it is relevant by now, but, I had this issue some time ago and I was missing Xauth and a .Xauthority file on my profile.
To repair it, I ran:
sudo apt-get install xauth
touch ~./Xauthority

Then, endded ssh session and started a new one.
Everything worked as expected after that.

PS.
Reply all
Reply to author
Forward
0 new messages