Author Topic: Starting Sailfish default apps from the command line.  (Read 4680 times)

0 Members and 1 Guest are viewing this topic.

Offline globetrotterdk

  • Newbie
  • *
  • Posts: 23
    • View Profile
  • Phone model: Jolla
Starting Sailfish default apps from the command line.
« on: March 19, 2014, 04:54:16 PM »
Can anyone provide a list of commands to start default Sailfish OS apps from the command line? I have found some long path names on maemo.org site that refer to paths that must have been relevant for the Nokia N9, as they include a "nokia" directory in the path name. I assume these paths have changed for Sailfish OS.

It would also be extremely useful to have symlinks added to the next update of Sailfish OS, so that starting  default apps from the command line don't require the need to include very long, user unfriendly paths.

I am personally interested in this issue, because I am trying to diagnose a problem sending emails from the default email app. I am hoping that I can get a more useful error message from the command line, than I get from the GUI:

http://forum.jollausers.com/jolla-phone/smtp-not-working-with-jolla-phoneemail-app/

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Starting Sailfish default apps from the command line.
« Reply #1 on: March 19, 2014, 07:05:28 PM »
No idea, but in Linux the first thing I try is:
Code: [Select]
./<app-name>
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)

Offline Vistaus

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
Re: Starting Sailfish default apps from the command line.
« Reply #2 on: March 19, 2014, 07:23:16 PM »
The apps aren't installed to /home/nemo so ./appname doesn't work.

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Starting Sailfish default apps from the command line.
« Reply #3 on: March 21, 2014, 12:32:47 AM »
So where are they installed and what is the command in that case ?
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)

Offline globetrotterdk

  • Newbie
  • *
  • Posts: 23
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #4 on: March 23, 2014, 09:47:11 PM »
It would really be nice if there were some documentation on this issue and the Sailfish OS command line in general.

Offline nsty

  • Newbie
  • *
  • Posts: 18
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #5 on: March 25, 2014, 11:37:15 AM »
open a terminal, type in:
/usr/bin/jolla-
press tab twice and you will see the names of all the jolla apps.
« Last Edit: March 25, 2014, 11:50:00 AM by nsty »

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Starting Sailfish default apps from the command line.
« Reply #6 on: March 25, 2014, 02:28:45 PM »
Thanks, will try tonight :)
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)

Offline Vistaus

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
Re: Starting Sailfish default apps from the command line.
« Reply #7 on: March 25, 2014, 02:53:30 PM »

(click to enlarge)

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Starting Sailfish default apps from the command line.
« Reply #8 on: March 25, 2014, 04:55:35 PM »
Looks good ! :)
& Is very useful !
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)

Offline globetrotterdk

  • Newbie
  • *
  • Posts: 23
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #9 on: March 25, 2014, 08:28:35 PM »
Cheers. That works for me. So, if I want to capture the output to file, would I use cat or something else? BTW, I have found out that the standard path would be /home/memo/Documents  I assume the command would be something like usr/bin/jolla-email cat /home/memo/Documents/test ???


--Edit

Come to think of it, I would need to save the output to my SD card, to get the output off my Jolla and post it.
« Last Edit: March 25, 2014, 08:37:39 PM by globetrotterdk »

Offline nsty

  • Newbie
  • *
  • Posts: 18
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #10 on: March 25, 2014, 08:53:40 PM »
to pipe the output to a file you can use ">"
so to get a list like on the picture from Vistaus type in:
Code: [Select]
ls /bin/usr/jolla-* > /path/to/file
the SD card is normally mounted at /run/user/100000/media/sdcard

Offline globetrotterdk

  • Newbie
  • *
  • Posts: 23
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #11 on: March 25, 2014, 10:05:33 PM »
Thanks. First off, I found that my sdcard is under /media/sdcard/name-of-card. Second, the output was only the command /usr/bin/jolla-email What I need is to capture the error output of the email program trying to send an email using smtp.

Offline nsty

  • Newbie
  • *
  • Posts: 18
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #12 on: March 25, 2014, 10:34:19 PM »
to redirect the standard error stream to a file just use "2>"

Code: [Select]
/usr/bin/jolla-email 2> /path/to/file
use "1>" to get the standard output or "&>" to get both streams into one file

Offline globetrotterdk

  • Newbie
  • *
  • Posts: 23
    • View Profile
  • Phone model: Jolla
Re: Starting Sailfish default apps from the command line.
« Reply #13 on: March 28, 2014, 10:32:11 AM »
Many thanks.

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Starting Sailfish default apps from the command line.
« Reply #14 on: March 30, 2014, 04:01:49 PM »
Great, works for, thx.
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)