Adding startup applications to Peppermint 3 [SOLVED]

Having installed Peppermint 3 I wish now to customise it by specifying the startup applications.
The website http://peppermintos.net/viewtopic.php?f=8&t=5683 provides an apparently simple method of adding entries to the .config/autostart file.
Mine already contained Dropbox so I added Thunderbird using the terminal command:
cp /usr/share/applications/thunderbird.desktop ~/.config/autostart/
Here’s what the autostart folder looks like now:
keith@D505 ~ $ ls .config/autostart
dropbox.desktop thunderbird.desktop

Thunderbird is now listed in the Preferences/Desktop-Session-Settings but does not autostart, although Dropbox does.

Any ideas?

For some reason it’s the “%u” on the “Exec=thunderbird %u” line of the .desktop file that’s stopping it from starting.

Run:

gedit ~/.config/autostart/thunderbird.desktop

make it read:-

[Desktop Entry]
Version=1.0
Name=Thunderbird Mail
Name[en_US]=Thunderbird Mail
Comment=Send and receive mail with Thunderbird
Exec=thunderbird
Icon=thunderbird
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;Network;Email;

SAVE the file, and exit gedit.

Log off/on to test.

My thunderbird.desktop file is mostly in foreign tongues, but I removed the %u from the offending line and it worked a treat. When using Ubuntu 12.04 I found that the %u was necessary, so it’s odd that Peppermint (which seems to be based on Ubuntu) doesn’t want it. But who are we to argue?

Is there any reason why I can’t remove all the repeated lines in many languages, keeping just the English ones - or even replace the whole lot with your code?

You can make it read JUST what I put above :slight_smile:

Heck, you can even leave out the

Name[en_US]=Thunderbird Mail

line if you choose :wink:

Just put Firefox in startup, too and all is fine.
Presumably the %u is necessary in the /usr/share/applications/thunderbird.desktop file?

See here for a list of the recognised feild codes:
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html

Quite why pcmanfm doesn’t ignore the “single URL” expansion when starting as an autostart app without a specified URL, I don’t know :o

If you’re interested here’s the freedesktop.org standard for creating .desktop files:
Desktop Entry Specification

Perhaps “interesting” is the wrong word, but the articles certainly helped to put things into perspective, even if I still don’t understand very much.
I found it most disappointing that the Standard contains such poor grammar and forms of expression that it is often difficult to extract the meaning. But then I was brought up proper.
Thanks for your help, Mark.

brought up proper.

Surely that should be “brunged up properly” :wink:


I get what you’re saying about the hard to grasp “language” … but then it’s at least the correct “terminology”.

That document isn’t really written as a tutorial for learners … more as a standard reference document for programmers, so will tend to use their language.

There are better “tutorials” online.


%u

Ok, as I understand it …
(and bear in mind I’m NOT a programmer)

Let’s say you select multiple exported email files in pcmanfm (File Manager), then right-click them and select Open with>Thunderbird … pcmanfm will read the thunderbird.desktop file at /usr/local/share/applications and realise it has to execute “thunderbird %u” … the %u tells it to treat the file locations as a list of “single URL’s” … so a new instance of thunderbird should be spawned for each file.

This doesn’t really apply to the .desktop we created in autostart, as it’s not being passed a file in the first place (and never will be) … though technically (AFAIK) it should just have ignored the %u when not being passed any further command line arguments.

Did that make sense ?

Yep; point taken. And upon a quick re-read, I couldn’t find the bits that read badly so perhaps I was simply misguided by the technicality of it.
Your explanation of %u is very helpful - would that all technical writers were!

My thanks as usual, Mark

:slight_smile: