what is convention for desktop application startup scripts?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what is convention for desktop application startup scripts?
Are there any conventions that we still respect for the names and directories (er, "folders") used for home-grown logon-time scripts and utilities?
In the days of terminal-only logon, we tinkered with .profile, and .bashrc and similar for things we wanted to happen at logon-time. Along came X-windows, and we had .xsession (blush) or was it .Xsession to start our X11-aware applications at logon-time. We also used $HOME/bin and /usr/local/bin for our custom utilities and scripts.
Today, our desktop environments have a settings GUI that lets us launch things automatically. It looks like I can call my script anything and put it anywhere. If there are conventions, I want to follow them. If conventions are dead and buried, may they rest in peace.
Thanks in advance,
~~~ 0;-Dan
PS/ There used to be a convention for linux standard command line options. For example, every utility would respond to -?, -h, --help, and --usage as well as anything unrecognized to display command option information. In addition, single-character options were preceded by a single dash and multi-character options were preceded by a double dash. Sigh!
Last edited by SaintDanBert; 11-26-2013 at 12:30 PM.
Reason: clarification
You'll have to be more specific about your environment. It depends on several factors.
What desktop environment are you using?
What window manager are you using?
Do you wish settings to be applied to terminal logins over SSH?
What shell are you using?
For example, openbox has an autostart.sh which executes when the user logs in. Other environments such as Gnome, Unity, or KDE have their own methods (which can be googled).
As far as terminal logins over SSH goes if you're using bash as your shell then .profile and .bashrc still apply. Using $HOME/bin for your own user scripts is still easily accomplished by modifying your user $PATH environment (usually by prepending the bin dir). If you're using ksh, tsh, or some other shell then see their man pages for start up procedures but they all use a $PATH environment variable.
The point I'm making is your question is so open ended that it isn't "answerable" without great detail provided on your part. Indeed most programs have a --help and --version option as well as an accompanying man page. But it also depends on the program, who packaged it, and what distro you're using for how much of it comes installed by default.
You'll have to be more specific about your environment.
...
The point I'm making is your question is so open ended that it isn't "answerable" without great detail provided on your part.
...
Since my LQ profile -- shown in the left column of the forum postings -- says, "Linux Mint-15 Cinnamon and KDE" I did not repeat that information in my original post. I'll be more explicit next time.
Therefore:
boot into Linux Mint-15 running Cinnamon Desktop Environment that ships with Mint-15. (It is v1.8.8)
login
whatever the standard things are start at login
my script(s) run
arrange to have four(4) desktops
launch email and browser onto desktop #1
launch "project folder" open on Desktop #2
launch two terminal windows on Desktop #3
launch "monitoring app" on Desktop #4
once everything is setup
make desktop #1 active
give email application focus
Does that clarify things enough?
~~~ 0;-Dan
Regards,
~~~ 0;-Dan
What's wrong with using the desktop's configuration tool to add start-up scripts? Don't keep a dog and bark yourself! I have a start-up script and it's just a dot-prefixed file in my home directory.
What's wrong with using the desktop's configuration tool to add start-up scripts?
...
I have a start-up script and it's just a dot-prefixed file in my home directory.
My point exactly:
Do we make any dot-something file with whatever name we want?
Do we make a dot-something folder with whatever name we want to hold script files?
Is there an existing '$HOME/something' file that was designed for this use?
Is there a '$HOME/something.d' folder that was designed for this use?
I found the desktop gui utility and I know how to use it to run one of
the several small scripts in '$HOME/bin' that launch various utilities and applications. I probably won't create a master launch script. If there is not a true convention I'll likely create a folder for "desktop oriented anything."
I never cease to be amazed by the number of different place in which distros can hide important things: even keyboard drivers and fonts can be put in different directories. Make your own conventions: that's the Linux way.
I never cease to be amazed by the number of different place in which distros can hide important things: even keyboard drivers and fonts can be put in different directories. Make your own conventions: that's the Linux way.
I've worked with Linux since the middle 90's. Yes, we relied on a lot of AT&T® Unix™ "conventions because the Linux world was still very new and had yet to create its own things. However, there is a lot of value to having conventions for where things live. Consider, '/etc' '/home' '/tmp' '/boot' and so on. This continues with places like $HOME/Desktop, $HOME/Photos and such.
Armed with knowledge of the conventions, not only can an end-user avoid
scattering files around and then searching for them later, but it helps developers, too. Our distro installers already avoid the /home file system -- {grin} unless fat fingers step on it accidentally. Many applications already place their configuration details into $HOME/dot-something {actually, "$HOME/.something"} hidden folders.
Since I would prefer to use something like a "$HOME/.myConfig.d" folder instead of the large set of per-application dot-files. I'll probably do something like that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.