Autostarting Octave in Lubuntu

Stuck with a problem in your code? Seek help here.

Autostarting Octave in Lubuntu

Postby evansste » November 21st, 2016, 10:12 am

I'm trying to get Octave to start, automatically, when I boot my computer. There are tons of tutorials that explain how to autostart programs in Linux, but none of them seem to work.

I'm using Lubuntu 14.0.4. I've gotten Octave to show up under the "Autostart" tab in Menu -> Preferences -> Default applications for LXSession. It shows up there, and "GNU Octave" is checked, but it won't startup when I boot the computer.

I've also tried modifying my /etc/xdg/lxsession/Lubuntu/autostart file. I've tried putting a bash file in there, as one person suggested. I've also tried putting "@octave" in there, which also doesn't work.

I've tried other things, too, (I've begun to lose track). I'm mostly interested in finding out if anyone has actually been able to get octave to autostart on Lubuntu 14.0.4. If you have, then I'd love to know how you did it.

I think my biggest problem, with all of the tutorials, is that they appear to be a bit old.

Anyway, if anyone's gotten this to work, I'd love to know what you did. Thanks for your time.
evansste
 
Posts: 100
Joined: October 8th, 2014, 8:19 am

Re: Autostarting Octave in Lubuntu

Postby asheets » November 23rd, 2016, 12:19 pm

I don't have a lot of time today to give this much thought, and I only have 1 older Ubuntu box at my disposal to check things out... but my first though is for you to create an "S"tart script in /etc/rc3.d .

I'll type more later when I have the chance, but if you google and look at /etc/rc3.d scripts you should get a pretty good idea of how it works...

(I'll be the first to admit that this is an older, probably deprecated way of doing things, but at list on my Ubuntu box it is still valid.)
asheets
 
Posts: 307
Joined: February 17th, 2011, 4:30 pm

Re: Autostarting Octave in Lubuntu

Postby bandersnatch » November 24th, 2016, 2:25 am

HI,

IMHO autostart problems are usually caused by shell environment context problems such as:
- The "path" variable
- The username/context (=file access permissions) for the autostart
- Daemons (background services) that have not properly started when the autostart shell script is executed.

As with my previous suggestion regarding non-linear execution times, I suggest you split things down into
smaller problems & gather a bit of info.
Autostart problems can be tricky 'cos you can't usually see what is happening.
The "old school" trick for this is to debug the ouput of your "autostart" script by wrapping it in another script
that pipes the output into a file on your desktop
(or redirect stdout & stderr...)

I suggest you proceed as follows
- Does autostart work at all on your system?
Check with a simple batch file
(echo "These are not the droids you are looking for")

- Does Octave run ok when manually started from a shell?
- Does octave start at all
- Check with a VERY simple octave script

- Is the path variable the same in the autostartenvironment and manual shell environment
- Does the autostart script spit out any file permission/path errors? (my bet on the real cause)
- are the same daemons running in the autostart environment and manual shell environment

I am still shovelling coal into a Lubuntu 14.0.4 VM but don't have a full head of steam yet.
I suggest you do some simple troubleshooting & let us know what you find out.
I will probe a bit deeper only if you make no progress.

Good luck...

STFB
bandersnatch
 
Posts: 150
Joined: September 17th, 2014, 12:06 pm

Re: Autostarting Octave in Lubuntu

Postby bandersnatch » November 24th, 2016, 2:34 am

Hi again,

A quick footnote.
You might like to quickly try the classic filthy trick of replacing filenames with full pathnames
e.g. for "SomeFile" on your desktop, started from the desktop
use: "/home/<user>)/desktop/SomeFIle"
(where <user> is the current username)
instead of: " ./SomeFIle"

Use full pathnames everywhere & it might just work
(I can hear the unix geeks from afar, groaning in contempt... ;^)))
sorry guys, but you know it often works!!!)

STFB
bandersnatch
 
Posts: 150
Joined: September 17th, 2014, 12:06 pm

Re: Autostarting Octave in Lubuntu

Postby bandersnatch » November 24th, 2016, 6:59 am

Hi,

Looks like you need to start octave from a running X-windows shell
Add "xterm octave" to "Manual autostarted applications" under Menu -> Preferences -> Default applications for LXSession
OctaveAutostart.jpg


On my Lubunto 14.0.4 this automatically starts Octave after logging in....

I hope this helps.
Keep us posted on your progress.
STFB
bandersnatch
 
Posts: 150
Joined: September 17th, 2014, 12:06 pm

Re: Autostarting Octave in Lubuntu

Postby evansste » November 24th, 2016, 9:23 am

Thanks, bandersnatch. Your last suggestion worked perfectly! It's funny how simple it is, once you know how to do it. All it took was to type "xterm octave", at the "+add" prompt -- just as you've stated.

Once again, thanks so much. You just saved me a ton of time, and inconvenience, so I greatly appreciate it.

I want to also thank asheets for also taking the time to respond. I recognize that everyone's time is valuable, so I thank you both, so much!
evansste
 
Posts: 100
Joined: October 8th, 2014, 8:19 am


Return to Help Me! Software

Who is online

Users browsing this forum: No registered users and 1 guest