Skip to content

Running headless (without GUI/display) #131

@Briochorama

Description

@Briochorama

Hi all,

First, thanks @taviso for your amazing work, it's been of great help.

I'm in a peculiar situation, where I have the regular need of converting xls files to wk1. So far, I'm making use of a script that handles this part like so :

# [...]
# Convert .csv to .wk1 using 123elf
command = f'{tool_path} -e /FIN{{ESC}}{{ESC}}{temp_csv_path}~/fs{{ESC}}{{ESC}}{{ESC}}{wk1_output_path}~/qy'
# [...]
# Using subprocess.run to execute the command
subprocess.run(command, shell=True, env=my_env )
# [...]

Short story : I export the xls to csv, then import to 123 using a macro, and finally save to wk1.

This works, when I run the script in the terminal but not if I run it as a service (which is the intended goal). After some experimentation, it looks like it's related to the GUI that's messing things up in the service. I get some weird errors like 123: [69B blob data].

Anyway, looking at 123 -h, there appear to be some kind of way to run this headless :

-n to run without using a video display

However I could not find any information about the autoretrieve file which seems to be needed.

I tried running, just to test : ./123 -n -w /home/me/test.wk1 -e /qy but the terminal screen goes blank and from here I can't do nothing.

▶ Before I start looking at alternate solutions, more complicated, like running the process under 'xvfb' :

  1. Do my explanations make sense ?
  2. Is there a way to execute 123elf from cli, without GUI ?
  3. Should I keep using macros, or is there a better way ?

Thanks for any insight you can provide and again, thanks a lot for your work !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions