Rosetta_Launch.sh - Start Rosetta
Rosetta’s Key Programs: Overview · Rosetta_Launch.sh · Rosetta_Settings.sh · Rosetta_Backup.sh · Rosetta_Update.sh · Rosetta_Change_Network.sh · Rosetta_Install_Debian_13_Trixie.sh
Purpose
Rosetta_Launch.sh starts a Rosetta session. It first builds this machine's own LinuxCNC configuration from the shipped templates and this machine's settings file, then starts LinuxCNC on that generated configuration.
It exists so that the shipped files (Rosetta.ini, Rosetta.hal, Rosetta_PostGUI_v1.hal) are never changed on the machine. An update can then replace them without wiping out this machine's own choices (axis assignments, jog speeds, measurement system, tuning, accessories).
See Launching Rosetta for the full start-up sequence.
How it is run
- The Rosetta desktop icon, and Applications > Rosetta.
- From a terminal, which also shows everything it prints:
|
/home/reuben/linuxcnc/configs/Rosetta/Rosetta_Launch.sh |
Parameters
None. Anything typed after the name is ignored.
What it does
- Runs python3 Rosetta_Setup/Rosetta_Generate_Local_Ini.py. Before building anything, it checks the gcode folder for reserved file names (see below).
- If that fails, it stops there (the script uses set -e), so LinuxCNC never starts on a half-built configuration.
- Otherwise it replaces itself with linuxcnc Rosetta.local.ini.
Programs it calls
| Program | What for |
| Rosetta_Setup/Rosetta_Generate_Local_Ini.py | Builds the .local files below. Uses Rosetta_Display/rosetta_settings_io.py to read the settings file, and runs ip -4 addr show dev eth0 to choose the base card's address (192.168.1.121 while the Raspberry Pi is still on 192.168.1.x, otherwise 10.10.10.10). |
| linuxcnc | Started on Rosetta.local.ini. LinuxCNC in turn loads the HAL files, the AXIS screen with the Rosetta side panel (Rosetta_Display/Rosetta_main.py), Rosetta_Settings_Restore.py (puts the saved scale, PID and limits onto the HAL pins), and at shutdown Rosetta_Shutdown.hal, which runs Rosetta_Scale_Persist.py. AXIS also runs Rosetta_Display/Rosetta_Axis_Commands.py as it starts (see the notes below). |
Files it reads
All paths are under /home/reuben/linuxcnc/configs/Rosetta unless shown in full.
- Rosetta.ini - the configuration template
- Rosetta.hal - the realtime HAL template
- Rosetta_Display/Rosetta_PostGUI_v1.hal - the side-panel HAL template
- Rosetta_Display/Rosetta_Splash.ngc - the empty start-up program (used when X and Z aren't both assigned)
- gcode/ - only the file names, for the reserved-name check
- /home/reuben/Documents/RosettaSet_v1.ini - this machine's settings
- /home/reuben/.axisrc - AXIS window size (read by AXIS, through Rosetta_Axis_Commands.py)
Files it creates
These are rewritten at every launch. Never edit them - change the settings (Rosetta Settings) or the templates instead.
| File | Contents |
| Rosetta.local.ini | Rosetta.ini with this machine's axis assignment, units, speed limits, jog speeds and backlash, pointing at the files below. This is the file LinuxCNC runs on. |
| Rosetta.local.hal | Rosetta.hal with the Mesa card line for one or both cards, each role on its assigned channel, and the limit jacks, E-stop button, signal tower and lost-card E-stop wired in. |
| Rosetta_Display/Rosetta_PostGUI_v1.local.hal | Rosetta_PostGUI_v1.hal plus the sound and signal-tower lines. |
| Rosetta_Display/Rosetta_Splash.local.ngc | The "Rosetta / ROSETTA" drawing shown in the preview at start-up. Preview only - pressing Run skips every move in it. |
LinuxCNC itself also writes sim.var (G-code parameters) while it runs, and at shutdown Rosetta_Scale_Persist.py saves the live values back into RosettaSet_v1.ini.
Notes for support
- "Reserved file name found - startup stopped": the gcode folder holds a file whose name starts with Rosetta (any case) or is M100 - M199. LinuxCNC looks in that folder first, so such a file would run in place of Rosetta's own subroutines. Rename it (the Gcode folder shortcut opens the folder), then start again. A short sound plays when startup is stopped. Rosetta Settings' Other tab has a Startup File Check setting: Abort startup - recommended (the default) or Warn, but let me continue.
- Nothing happens when the icon is clicked: run Rosetta_Launch.sh from a terminal. The desktop icon hides the output; the terminal shows the generator's messages and any error.
- The generator explains itself. It prints which cards it loads and at which addresses, which role is on which channel, and which limit jacks, E-stop and signal tower are wired. If it finds a problem it prints REFUSING to write Rosetta.local.hal with the reason, and LinuxCNC doesn't start.
- Changes need a restart. Everything Rosetta.local.ini sets is read once when LinuxCNC starts, so a change made in Rosetta Settings applies at the next launch.
- Card can't be found: check the Raspberry Pi's wired address with Rosetta_Change_Network.sh check (see Rosetta_Change_Network.sh). With the cable unplugged, the generator prints a note and uses 10.10.10.10.
- Expansion Box - Connected must match the hardware. Ticked with no expansion card answering, LinuxCNC stops with a card error.
- To compare what was generated with the template, open Rosetta.local.hal and Rosetta.hal side by side.
- Rosetta_Axis_Commands.py and .axisrc: Rosetta.ini names Rosetta_Axis_Commands.py as AXIS's [DISPLAY]USER_COMMAND_FILE. With that set, AXIS no longer reads /home/reuben/.axisrc itself, so Rosetta_Axis_Commands.py runs it first. If .axisrc has a mistake, AXIS shows an Error in ~/.axisrc box and carries on.
- "X not enabled" box when clicking Run (since 08 November 2026): the loaded program moves an axis whose ENA button is off - it would stop with a following error as soon as that axis had to move. Cancel (the default) and turn the ENA on, or Run Anyway. The side panel's index, Sync Move and Threading buttons give the same warning (with Move Anyway), and also check the spindles. The check uses AXIS's preview, so a rapid move before the program's first feed move isn't seen.
Related pages
|
eMail comments to |
