Author Topic: Adding startup applications to Peppermint 3 [SOLVED]  (Read 1624 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Adding startup applications to Peppermint 3 [SOLVED]
« on: July 30, 2013, 09:48:27 am »
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?
« Last Edit: August 04, 2013, 10:01:26 am by Keith »

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14296
  • Karma: 355
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #1 on: July 30, 2013, 05:24:09 pm »
For some reason it's the "%u" on the "Exec=thunderbird %u" line of the .desktop file that's stopping it from starting.

Run:
Code: [Select]
gedit ~/.config/autostart/thunderbird.desktop

make it read:-
Code: [Select]
[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.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #2 on: July 30, 2013, 06:20:38 pm »
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? 

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14296
  • Karma: 355
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #3 on: July 30, 2013, 06:36:27 pm »
You can make it read JUST what I put above :)

Heck, you can even leave out the

Name[en_US]=Thunderbird Mail

line if you choose ;)
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #4 on: July 30, 2013, 06:59:08 pm »
Just put Firefox in startup, too and all is fine. 
Presumably the %u is necessary in the /usr/share/applications/thunderbird.desktop file?

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14296
  • Karma: 355
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #5 on: July 30, 2013, 07:31:40 pm »
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:
http://standards.freedesktop.org/desktop-entry-spec/latest/index.html

--
« Last Edit: July 30, 2013, 07:36:46 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #6 on: July 31, 2013, 12:59:32 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14296
  • Karma: 355
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #7 on: July 31, 2013, 02:13:39 pm »
Quote
brought up proper.

Surely that should be "brunged up properly" ;)



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 ?

--
« Last Edit: July 31, 2013, 04:03:38 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Keith

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 10
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #8 on: August 03, 2013, 03:08:40 pm »
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

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14296
  • Karma: 355
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Adding startup applications to Peppermint 3
« Reply #9 on: August 03, 2013, 03:55:04 pm »
:)
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal