Start LinuxCNC in a script

More
24 May 2018 21:06 #111097 by Cpk_Rbt
I'm trying to launch LinuxCNC when my computer boots, by way of a bash script.
INI DISPLAY = linuxcncrsh
classicladder is launched --nogui

I'm still getting an error that there either:
is no $DISPLAY environment variable
or, if I
export DISPLAY=:0.0
, couldn't connect to display ":0.0"

Anyone have any ideas for how to accomplish this?

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

More
25 May 2018 00:13 #111098 by Grotius
Replied by Grotius on topic Start LinuxCNC in a script
If you install linux from cd i think it will work with standard bash script.
Try also ini display = axis
If booting up and showing ladder you are at the right way !

If you cloned linux from source i think you have to add several scripts to your bash file like in the script folder :
. ./rip-environment
linuxcnc

So at this moment it can be several things.

In beginning you can load classicladder in hal section. i see.
Buy in your ini section maybe delete display section. That can also make difference.

To only load classicladder is possible, you need some time to investegate.

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

More
25 May 2018 13:28 #111117 by Cpk_Rbt
Replied by Cpk_Rbt on topic Start LinuxCNC in a script
I foolishly thought that I could test via SSH and it would be the same, I was wrong. When launching in a script while sitting in front of the PC, it works fine.

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

More
29 May 2018 15:00 #111265 by andypugh
Replied by andypugh on topic Start LinuxCNC in a script

I foolishly thought that I could test via SSH and it would be the same, I was wrong.


ssh -Y

Tends to work, just for future reference.
The following user(s) said Thank You: Cpk_Rbt

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

More
29 May 2018 20:41 #111286 by Thom
Replied by Thom on topic Start LinuxCNC in a script
Check this out
forum.linuxcnc.org/9-installing-linuxcnc...4-autostart-linuxcnc
It starts not by script, but it is much easyer

Regards,
Thom

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

More
30 May 2018 14:00 #111315 by Cpk_Rbt
Replied by Cpk_Rbt on topic Start LinuxCNC in a script
That's a handy tip! Thanks for sharing.

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

More
30 May 2018 14:13 - 30 May 2018 14:14 #111316 by andypugh
Replied by andypugh on topic Start LinuxCNC in a script
The command now would be "linuxcnc" and you might simply want to auto-start the last-started config.

So add a startup item with the command
linuxcnc -l
(Lower-case "L" not number 1)
(That message is from an old version before the lawyers of the EMC corporation forced us to change the project name.)
Last edit: 30 May 2018 14:14 by andypugh.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum