unset DISPLAY
soffice -headless -accept="socket,host=localhost,port=8100;urp;" -nofirststartwizard

保存为
*.sh