maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Extra softwares in Sailfish using CLI, repositories, etc (https://talk.maemo.org/showthread.php?t=92036)

rcolistete 2013-12-15 18:50

Extra softwares in Sailfish using CLI, repositories, etc
 
This topic is to share experiences of installing softwares in Sailfish using Terminal (CLI - Command Line Interface) tools (pkcon, zypper, etc), extra repositories, etc.

Tested on Sailfish port @ Nokia N9.

Set the Developer Mode in Sailfish Settings : choose a password, leave "Allow developer updates" not selected, save. So now you have Terminal and remote connection (via "ssh nemo@<ip-number>").

The pkcon command has many options, see here some documentation.

1) (Don't work on recent Sailfish versions) Jolla file manager, use Terminal to install using pkcon :
$ pkcon install jolla-fileman
This file manager seems to be in alpha/beta state until now (15/12/2013).

There are other file browsers in Jolla Store (File Browser, Cargo Dock) and Warehouse (Filetug).

2) nano text editor to be used inside Teminal :
$ pkcon install nano

3) zypper tool, to complement pkcon :
$ pkcon install zypper
But zypper can't be used at same time with Jolla Store. See some zypper documentation, and zypper cheat sheet (page 1 and 2).

4) programming languages are available and simple to install :
gcc 4.6.4 (with gcc-c++, gcc-objc, gcc-objc++), perl 5.16.1 (already installed), ruby 1.9.3, tcl 8.5.8, tcl/tk 8.5.12 (with mer-tools repository), vala (0.16), etc. For example :

4.a) Python 2.7.5 :
$ pkcon install python

4.b) C/C++ (gcc/g++ 4.6.4) :
$ pkcon install gcc gcc-c++
Yeah, you can compile C/C++ code and run .o objects at CLI. No Harmattan aegis limitations anymore :cool:

5) additional softwares in mer-tools repository, e.g. :
dosfstools, emacs, git, htop, less, mtools, parted, powertop, rsync, ruby 1.9.3, strace, sudo, tcl/tk 8.5.12, zsh.
First enable the repository by entering root (with Developer Mode password) :
$ devel-su
# ssu ar mer-tools
# ssu ur
$ pkcon refresh
Now you can install, for example :
$ pkcon install htop less powertop
htop creates an icon which doesn't work, but inside Terminal it is ok.

6) OpenRepos.net via Warehouse client has many CLI softwares. NielDK published more than one hundred : apache, bash 4.3, cpufrequtils, imagemagick, lynx, mc (Midnight Commander), php, qemu, screen, wget, etc.

shmerl 2013-12-15 20:30

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Is Midnight Commander available anywhere?

rcolistete 2013-12-15 20:38

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by shmerl (Post 1396862)
Is Midnight Commander available anywhere?

No, even with mer-tools enabled.

In OpenRepos.net there is Midnight Commander for MeeGo Harmattan only.

shmerl 2013-12-15 20:46

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
I guess it's good to propose to add it to mer-tools.

szopin 2013-12-17 15:09

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
1 Attachment(s)
Quote:

Originally Posted by shmerl (Post 1396867)
I guess it's good to propose to add it to mer-tools.

wget would be nice too, in the meantime binary attached (might need 'pkcon install gnutls' for ssl, not sure)


edit: wow, building on-device is a bliss, MC compiles/installs nicely, just make sure to configure with '--with-screen=ncurses' as there is no slang currently, subshell (ctrl-o) works, opens .tar.gz, yay! (now we really need hwkb, synergy compiled without problem but as it depends on X crashes right after start, any other options to make use of N900's hwkb?)

w00t 2013-12-17 16:44

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by szopin (Post 1397678)
wget would be nice too, in the meantime binary attached (might need 'pkcon install gnutls' for ssl, not sure)

if you're not picky, 'curl -O' is an acceptable replacement readily available

shmerl 2013-12-17 17:11

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
wget suffered from GPLv3 fate :) But adding it to some community repo is a good idea.

kribber 2013-12-21 06:13

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
"Fatal error: Authentication failed (is SSU set up correctly?)
" yes it is?`. What the **** is this ****?. Last step install fails?

Bundyo 2013-12-21 06:39

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by rcolistete (Post 1396864)
No, even with mer-tools enabled.

In OpenRepos.net there is Midnight Commander for MeeGo Harmattan only.

The Harmattan one works fine - just extract it along with libslang and voila :)

nanderv 2013-12-22 11:23

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Is GHC (haskell compiler) an option? If not, I might build one myself ;).

cloudbuster 2013-12-22 11:38

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
I'd enjoy screen (perhaps even byobu) and irssi.

qwazix 2013-12-22 11:44

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
I'd like to add imagemagick to the requests. I tried to compile it but it's non-trivial: too many dependencies.

The binary does compile okay, but it misses decoders/encoders

casl 2013-12-26 13:55

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Managed to build Mosh on my phone and thought I'd share this with you guys.

What "Mosh"?

http://mosh.mit.edu/

Quote:

Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

Mosh is a replacement for SSH. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

Mosh is free software, available for GNU/Linux, FreeBSD, Solaris, Mac OS X, and Android
Please ask if these instructions don't work. I did many steps forwards and backwards while trying to build some libs manually and installing some using pkcon, so ask if they don't work as intended:

1) First, the dependencies. Open terminal and type:

Code:

pkcon install zlib-devel protobuf-compiler protobuf-devel ncurses-devel openssl-devel
2) Open browser / use wget / whatnot to download:

Code:

http://mosh.mit.edu/mosh-1.2.4.tar.gz
3) In the terminal again:

Code:

devel-su
# insert your developer mode password
cd /home/nemo/Downloads # or other folder where the file is
tar xvfz mosh-1.2.4.tar.gz
cd mosh-1.2.4
./configure
make
make install

Please note that you'll also need make, gcc, and gcc-c++ packages installed.

EDIT: Important note! As you'll install this by compiling Mosh manually from sources, you'll be yourself responsible for possible security updates in the future. So keep checking the website every now and then to keep your Mosh secure.

Kabouik 2013-12-26 15:11

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by casl (Post 1400744)
Managed to build Mosh on my phone and thought I'd share this with you guys.

What "Mosh"?

http://mosh.mit.edu/



Please ask if these instructions don't work. I did many steps forwards and backwards while trying to build some libs manually and installing some using pkcon, so ask if they don't work as intended:

1) First, the dependencies. Open terminal and type:

Code:

pkcon install zlib-devel protobuf-compiler protobuf-devel ncurses-devel openssl-devel
2) Open browser / use wget / whatnot to download:

Code:

http://mosh.mit.edu/mosh-1.2.4.tar.gz
3) In the terminal again:

Code:

devel-su
# insert your developer mode password
cd /home/nemo/Downloads # or other folder where the file is
tar xvfz mosh-1.2.4.tar.gz
cd mosh-1.2.4
./configure
make
make install

Please note that you'll also need make, gcc, and gcc-c++ packages installed.

Thanks! Could you explain for newbies how to use it from a Windows PC to the Jolla? I used to use KiTTY (a PuTTY fork) to connect to the Jolla through WiFI or USB, but really like the roaming feature of mosh. Is there any way to use it from a Windows computer, and if so, how?

casl 2013-12-26 20:24

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by Kabouik (Post 1400753)
Thanks! Could you explain for newbies how to use it from a Windows PC to the Jolla? I used to use KiTTY (a PuTTY fork) to connect to the Jolla through WiFI or USB, but really like the roaming feature of mosh. Is there any way to use it from a Windows computer, and if so, how?

Unfortunately there is no Mosh Windows client yet. You could give it a try though using the experimental Cygwin port from the Mosh website.

etam 2013-12-29 21:11

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Hi,
I just added mer-tools repo as described in the first post
Code:

ssu ar mer-tools
ssu ur

But it seems that the repo does not exist.

Code:

$ ssu lr
[...]
Enabled repositories (user):
 - mer-tools ... https://releases.jolla.com/releases/1.0.2.5/mer-tools/builds/armv7hl/packages/
[...]

Opening this url in browser gives "403 Forbidden"

Does anyone know what's the status of this repo?

etam 2013-12-29 21:27

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Sorry, my bad. I missed the "pkcon refresh" line. Everything works fine :)

xerxes2 2013-12-29 22:05

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
So wget can't be found in Sailfish repos just because it's gplv3?

The one in Nemo works:
http://repo.merproject.org/obs/nemo:...ps.armv7hl.rpm

kollin 2014-01-07 10:49

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
when i try "ssu ar mer-tools" i get:
Code:

void NetworkService::setPath(const QString&) "Method "GetProperties" with signature "" on interface "net.connman.Service" doesn't exist
:confused:

what shall i do now?

rainisto 2014-01-07 10:55

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by kollin (Post 1404475)
:confused:

what shall i do now?

Thats just debug message that can be ignored.

kollin 2014-01-07 12:44

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by rainisto (Post 1404477)
Thats just debug message that can be ignored.

Thank you! *hugz* :D

kollin 2014-01-07 12:51

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by Bundyo (Post 1399339)
The Harmattan one works fine - just extract it along with libslang and voila :)

Is there a way to make a proper jolla/mer/nemo package from it?

Bundyo 2014-01-07 14:30

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Probably would be easy adapting the openSUSE armv7hl packages for Jolla:

http://download.opensuse.org/reposit...E_Factory_ARM/

kollin 2014-01-07 15:04

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by Bundyo (Post 1404534)
Probably would be easy adapting the openSUSE armv7hl packages for Jolla:

http://download.opensuse.org/reposit...E_Factory_ARM/

But how? I'm Gentoo user and the rpm system is absolutely alien to me? :confused:

Bundyo 2014-01-07 17:00

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
rpmbuild with the src package in a Jolla environment :)

kollin 2014-01-07 19:11

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by Bundyo (Post 1404578)
rpmbuild with the src package in a Jolla environment :)

Well i tried, it dies with:

Code:

[nemo@localhost mcsrc]$ rpmbuild --rebuild mc-4.8.11-90.4.src.rpm
Installing mc-4.8.11-90.4.src.rpm
warning: InstallSourcePackage at: psm.c:238: Header V3 RSA/SHA1 Signature, key ID e2c0098c: NOKEY
error: line 88: Unknown tag: Recommends:    mc-lang = 4.8.11

What does it mean?
:(

Used those links for directions:
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment
http://wiki.centos.org/HowTos/RebuildSRPM

Ok commented some lines in the spec file now the drama is different:

Code:

rpmbuild -ba mc.spec
error: Failed build dependencies:
        audiofile-devel is needed by mc-4.8.11-90.1.armv7hl
        e2fsprogs-devel is needed by mc-4.8.11-90.1.armv7hl
        fdupes is needed by mc-4.8.11-90.1.armv7hl
        glib2-devel is needed by mc-4.8.11-90.1.armv7hl
        libtool is needed by mc-4.8.11-90.1.armv7hl
        gpm is needed by mc-4.8.11-90.1.armv7hl
        indent is needed by mc-4.8.11-90.1.armv7hl
        jpeg is needed by mc-4.8.11-90.1.armv7hl
        libjpeg-devel is needed by mc-4.8.11-90.1.armv7hl
        libpng-devel is needed by mc-4.8.11-90.1.armv7hl
        libssh2-devel is needed by mc-4.8.11-90.1.armv7hl
        readline-devel is needed by mc-4.8.11-90.1.armv7hl
        slang-devel is needed by mc-4.8.11-90.1.armv7hl
        update-desktop-files is needed by mc-4.8.11-90.1.armv7hl
        xorg-x11-devel is needed by mc-4.8.11-90.1.armv7hl
[nemo@localhost SPECS]$

:eek:

zypper can't find the devel packages my be they are in different repo? :confused:

J4ZZ 2014-01-08 15:56

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by szopin (Post 1397678)
edit: wow, building on-device is a bliss, MC compiles/installs nicely, just make sure to configure with '--with-screen=ncurses' as there is no slang currently

Could you please explain in detail which version did you pick and how you possibly got around the glib-2.0 error...
If I ./configure it always quits with
Code:

configure: error: glib-2.0 not found or version too old (must be >= 2.12)
although I have glib2-2.32.4-1.2.1.armv7hl and glibc-2.15-1.1.1.armv7hl installed.

I'm using lates src of mc-4.8.11.

Thanks in advance,

J4ZZ

nieldk 2014-01-08 17:14

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by J4ZZ (Post 1404834)
Could you please explain in detail which version did you pick and how you possibly got around the glib-2.0 error...
If I ./configure it always quits with
Code:

configure: error: glib-2.0 not found or version too old (must be >= 2.12)
although I have glib2-2.32.4-1.2.1.armv7hl and glibc-2.15-1.1.1.armv7hl installed.

I'm using lates src of mc-4.8.11.

Thanks in advance,

J4ZZ

you need glib2-devel

szopin 2014-01-08 17:14

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by J4ZZ (Post 1404834)
Could you please explain in detail which version did you pick and how you possibly got around the glib-2.0 error...
If I ./configure it always quits with
Code:

configure: error: glib-2.0 not found or version too old (must be >= 2.12)
although I have glib2-2.32.4-1.2.1.armv7hl and glibc-2.15-1.1.1.armv7hl installed.

I'm using lates src of mc-4.8.11.

Thanks in advance,

J4ZZ

pkcon install glib2-devel

J4ZZ 2014-01-08 20:11

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Edit: ./configure works now but make install doesn't?
Anything else I need to be aware of?

Last lines....
Code:

Making install in skin
make[2]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[3]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[2]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
Making install in tty
make[2]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/tty'
  CC      key.lo
key.c: In function 'tty_get_event':
key.c:2121:5: error: 'flag' undeclared (first use in this function)
key.c:2121:5: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [key.lo] Error 1
make[2]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/tty'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib'
make: *** [install-recursive] Error 1

Cheers,

J4ZZ

nieldk 2014-01-08 21:09

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Search for bugs ;), for example:https://www.midnight-commander.org/ticket/3144

btw, version 4.8.10 is on my openrepos ;)
https://openrepos.net/content/nieldk/midnight-commander

J4ZZ 2014-01-08 22:19

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Hmmm, ok.
I'll just use yours. ;)

So, thanks for adding mc to your openrepos... http://talk.maemo.org/images/icons/icon14.gif

Regards,

J4ZZ

xerxes2 2014-01-08 22:19

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
@neildk

You seems to be the man to ask for cli apps so I would like to make a request for wget. If you would add that to openrepos that would be awesome. Curl -O works but still wget is less to write. :)

J4ZZ 2014-01-08 22:26

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Already available
Code:

[root@localhost Downloads]# pkcon get-packages | grep wget
Installed    wget-1.13.4-2.4.Nemo.Apps.armv7hl

Edit: Sorry, my bad. I probably just compiled it myself.
Edit2: See post#38 ;)

szopin 2014-01-08 22:26

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by J4ZZ (Post 1404921)
Edit: ./configure works now but make install doesn't?
Anything else I need to be aware of?

Last lines....
Code:

Making install in skin
make[2]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[3]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
make[2]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/skin'
Making install in tty
make[2]: Entering directory `/home/nemo/Downloads/mc-4.8.11/lib/tty'
  CC      key.lo
key.c: In function 'tty_get_event':
key.c:2121:5: error: 'flag' undeclared (first use in this function)
key.c:2121:5: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [key.lo] Error 1
make[2]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib/tty'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/nemo/Downloads/mc-4.8.11/lib'
make: *** [install-recursive] Error 1

Cheers,

J4ZZ

Checking my bash history...

Code:

./configure --with-screen=ncurses
After this make worked on 4.8.11, no bug fixes/patches needed (you might need to install ncurses-devel and gettext-devel), then again maybe are needed for the overlays from fingerterm, refreshing is kinda screwed (works perfectly when sshed from n900 though, so I blame fingerterm).

xerxes2 2014-01-08 22:31

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by J4ZZ (Post 1404954)
Already available
Code:

[root@localhost Downloads]# pkcon get-packages | grep wget
Available    wget-1.13.4-2.4.Nemo.Apps.armv7hl


I don't have it but I know that it exists in a Nemo repository but that is not an official repo for Sailfish. Would be much better to have a supported version on openrepos than from some repo that might not work with Sailfish.

szopin 2014-01-08 22:33

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by xerxes2 (Post 1404956)
I don't have it but I know that it exists in a Nemo repository but that is not an official repo for Sailfish. Would be much better to have a supported version on openrepos than from some repo that might not work with Sailfish.

I attached sailfish binary here:
http://talk.maemo.org/showpost.php?p...78&postcount=5
Would be nice to have it auto-updating though

J4ZZ 2014-01-08 22:47

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
I took the one from nemo posted by xerxes2.

Code:

curl http://repo.merproject.org/obs/nemo:/devel:/apps/next_armv7hl/armv7hl/wget-1.13.4-2.4.Nemo.Apps.armv7hl.rpm -o wget.rpm
followed by
pkcon install-local wget.rpm

:)

J4ZZ 2014-01-08 22:52

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by szopin (Post 1404955)
Checking my bash history...

Code:

./configure --with-screen=ncurses
(you might need to install ncurses-devel and gettext-devel)

I did but make still won't work.
Do I need any other additional packages? So far I've also installed autoconf automake libtool and cvs.

Would be nice to know if there are more *-devel packages I probably missed out.

TIA,

J4ZZ

szopin 2014-01-08 22:55

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by J4ZZ;14'04968
I did but make still won't work.
May I miss additional packages?
I've also installed autoconf automake libtool and cvs.

Would be nice to no if there are more *-devel packages I probably missed out.

TIA,

J4ZZ

'pkcon install pcre' might also be needed, is configure finishing for you? Usually it should inform you that it is not finding a lib


All times are GMT. The time now is 12:19.

vBulletin® Version 3.8.8