简体   繁体   中英

Start octave with GUI from cron

I would like to use a cronjob to open octave with the force-gui option.

Writing

00 22 * * * octave --force-gui > ~/log 2>&1

doesn't start octave but gives the log message

octave: unrecognized option '--force-gui'

usage: octave [-HVdfhiqvx] [--debug] [--echo-commands] [--eval CODE]
     [--exec-path path] [--help] [--image-path path] [--info-file file]
     [--info-program prog] [--interactive] [--line-editing]
     [--no-history] [--no-init-file] [--no-init-path] [--no-line-editing]
     [--no-site-file] [--no-window-system] [-p path] [--path path]
     [--silent] [--traditional] [--verbose] [--version] [file]

When I enter

octave --force-gui

directly in the terminal, octave opens just fine.

I noticed that the same error as in the log file is produced when I enter

/usr/bin/octave --force-gui

into a terminal.

Question: How can I start the octave GUI via Cron?

I am using Octave version 3.8.1 on Linux Mint 16.

Sounds like you have two different versions of Octave installed. One in /usr/bin/octave (an older version without the --force-gui option), and a new version that is in your path but not on the path when cron runs.

Type which octave to see where is the octave version you want to run and fix your paths. You may want to uninstall the old version of Octave too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM