LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-26-2013, 11:54 AM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
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.


Follow-up: (for those who are interested)


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
 
Old 11-26-2013, 02:56 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.

What is your real question? Care to elaborate?

SAM

Last edited by sag47; 11-26-2013 at 02:58 PM.
 
1 members found this post helpful.
Old 11-26-2013, 03:35 PM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by sag47 View Post
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
 
Old 11-27-2013, 12:22 PM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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.
 
1 members found this post helpful.
Old 11-28-2013, 04:24 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by DavidMcCann View Post
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."
 
Old 11-29-2013, 12:53 PM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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.
 
1 members found this post helpful.
Old 11-30-2013, 01:03 PM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by DavidMcCann View Post
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.

Cheers,
~~~ 0;-Dan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startup scripts mas123 Linux - Newbie 6 03-13-2009 09:37 PM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Startup scripts simcox1 Slackware 7 12-05-2005 05:04 PM
Linux Startup Scripts for Oracle Application & Database research2004 Linux - Newbie 1 04-14-2004 05:22 AM
Startup scripts celticselph Slackware 5 04-08-2004 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration