Start LinuxCNC in a script

More
8 years 5 months ago #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
Code:
export DISPLAY=:0.0
, couldn't connect to display ":0.0"

Anyone have any ideas for how to accomplish this?

Please Log in to join the conversation.

More
8 years 5 months ago #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 to join the conversation.

More
8 years 5 months ago #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 to join the conversation.

More
8 years 5 months ago #111265 by andypugh
Replied by andypugh on topic Start LinuxCNC in a script

Cpk_Rbt wrote: 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.

Please Log in to join the conversation.

More
8 years 5 months ago #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 to join the conversation.

More
8 years 5 months ago #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 to join the conversation.

More
8 years 5 months ago #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
Code:
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.)

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum