Okay, I've got a directory named .bin in my users home directory which I sometimes use for the purpose of stashing user scripts and I made one with the following contents, it's named test.sh
Code: Select all
#!/bin/bash
/usr/bin/leafpad /home/myusername/Blahblah/test.txt
Code: Select all
# Running a damn bash script in .bin. Yep works ...
bash -c "/home/myusername/.bin/test.sh" &
Code: Select all
/bin/bash /home/myusername/.bin/test.sh &
Code: Select all
bash -c "~/.bin/test.sh" &
Code: Select all
bash -c ".bin/test.sh" &
More random useful stuff, some useful Openbox terminal cmds, in particular just to be overly anal and confirm the syntax of a given line there above worked as expected, could've just sourced the file, yep ... you can use a . (which is shorthand for typing source) /path/to/autostart or script, kind of dirty, worked well enough for this junk though, however another thing which can be good to know is the "openbox --exit" command in a terminal, when used that's what it does, it exits the openbox session. I have my system setup to automatically log my user in so when I enter that cmd, kills the ongoing openbox session but my OS turns right around, logs me back in and during this process my Openbox autostart file gets ran(sourced)each time. Same is going to happen if you were using a display manager set to autologin your user. Other similar Openbox cmds, "openbox --restart" and "openbox --reconfigure" can come in handy too.
Well that's it, yeppers pretty much same approach is sure to work in Fluxbox or others also. Good enough for running user scripts, whereas would be apt to go with something else for system scripts, altering system files or running cmds which require priv's etc. Still this could inspire someone to do something interesting with their OB and/or other windows managers. Also surely any good desktop should, is bound to have similar provisions for such things too. Though there you have it, do something useful and-or cool with this stuff.