Opening a spreadsheet at startup on LibreOffice in Ubuntu studio 21.04
I have Ubuntu Studio 21.04 installed and I want to open a spreadsheet automatically when I log in. I've included LibreOffice calc in the autostart applications, but I can't get it to open up the spreadsheet, just the application with a blank spreadsheet. I've edited the autostart properties for the application so they point to the spreadsheet:
'soffice --calc -o ⁄home⁄chris⁄Documents⁄Spreadsheets⁄Top\ 250\ films.ods'
If I run this command from the terminal, the spreadsheet opens as expected, but not in autostart. I've tried single quote, double quotes and using backslashes in file name, all give the same result.
What am I doing wrong?
Solution 1:
Your string is:
'soffice --calc -o ⁄home⁄chris⁄Documents⁄Spreadsheets⁄Top\ 250\ films.ods'
whereas it should be
'soffice --calc -o /home/chris/Documents/Spreadsheets/Top\ 250\ films.ods'
Do you see the difference? Probably no. If you cannot see the difference, then echo
the string to cat -t
and you will:
$ echo 'soffice --calc -o ⁄home⁄chris⁄Documents⁄Spreadsheets⁄Top\ 250\ films.ods' | cat -t
soffice --calc -o M-bM-^AM-^DhomeM-bM-^AM-^DchrisM-bM-^AM-^DDocumentsM-bM-^AM-^DSpreadsheetsM-bM-^AM-^DTop\ 250\ films.ods
$ echo 'soffice --calc -o /home/chris/Documents/Spreadsheets/Top\ 250\ films.ods' | cat -t
soffice --calc -o /home/chris/Documents/Spreadsheets/Top\ 250\ films.ods
You are using the Unicode Fraction Slash character as directory separator, while you must use the ASCII Slash character.