Writing apps/programs for pine phone
#1
Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.
  Reply
#2
  • First you'll need a desktop file that gives the OS the information about your App.

Example of desktop file:

[Desktop Entry]
Name=Your Apps Name
Type=Application
Comment=Short Description of your App
Icon=/home/YOURUSER/MyApps/App/App.png
Exec=python3 /home/YOURUSER/MyApps/App/MyCoolApp.py
Categories=Games;
Terminal=false

  • Now save that as a desktop file: MyCoolApp.desktop
  • Next make a small icon for your App.
  • Once you have those 2 files and your App files in the same folder, put all of it somewhere like /home/YOURUSER/MyApps.
  • Finally move your MyCoolApp.desktop to /home/YOURUSER/.local/share/applications
  Reply
#3
(09-09-2021, 04:45 PM)katesfb Wrote: Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.

The simple answer is, the same way you would on linux. That doesn't apply to Nemo, Luneos, UT, Sailfish, or android, but it applies to all of the other linux distros.

I suspect that doesn't help you though. There is also myriad of ways to write programs for a linux system. C, Rust, python, java, etc., which all have different (though similar) ways of compiling and starting software. If you mean, how do you host or package software in a repository, for .deb, flathub, snap, or app-whatever-that-one-is-called, that is a different question.

Do you currently write software in python?
  Reply
#4
Like luney said, just like on any other GNU/Linux.  What NW_Dev said is more if you want an icon in your app drawer.

1. Copy files / dir to the phone by whatever method.

2. Open shell, navigate to that directory.

3. Make sure the file is executable:

Code:
chmod +x your_program

4. Execute the file:

Code:
./your_program

Let us know what you are trying to do, what you did, and where you are stuck (or, let us know you got it to work  Smile ),

EDIT: Also check out the link in my signature for even more ways (to make GUI apps).
  Reply
#5
I would like to have a discussion involving Pine64, and the various OSs' communities.
We need to decide on how we can get as many users access to the many great user made programs.
At this point flatpak is probably the solution as it crosses OSs.
Most of the OSs, in particular I am familiar with Mobian, there is a strict vetting and requirements to support any submitted apps for their official repos.
We need something which approximates the setup for Maemo though in that case we had single OS and single hardware platform; there were 4 levels of repo for maemo5, the official OVI store, maemo extras, extras testing, and extras devel; the OVI/OTA updates official repo was replaced by a community seamless software update service.
This is an ongoing request for comment until we have established a reasonable way to accept pinephone/pinetab community software community contributions across as many OSs as possible.
What creative way would you suggest we incorporate pine community contributed software?
  Reply
#6
+1 biketool

I'd like to write an application for pinephone. However, I'm currently using mobian phosh and I'm deeply concerned about battery performance (pinephone uses too much in idle locked state) and software specially made for mobile instead of porting desktop applications to phone. I tried pmOS sxmo and was shocked by the amount of battery used by such a wm based system.

How is user experience managed since mouse and trackpad maneuvering is different from touch maneuvering? Are all apps designed on frameworks like Qt and GTK where resizing window to mobile size takes care of pinephone and normal aspect ratio takes care of desktops?
Today, the forces which make richer and poor poorer have their roots in computer security. Never has it been more important to work towards abolishing the power of the powerful.

Let's use hyperbola or other libre OSes and strive towards stateless hardware (Rutkowska 2015). Let's use GNU/Linux phones and shun Android. Let's make our data available to everyone or else absolutely no one.
  Reply
#7
(09-09-2021, 04:45 PM)katesfb Wrote: Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.

Example for loading Python script (opens the kgx terminal and runs 'mact' script when you 'tap' the icon) you could use a line like:

Code:
Exec=/usr/bin/kgx --command mact

Where 'mact' acts as a start script command (in /usr/bin or using the direct path with +x)

(for Exec line in the .desktop as in example NW_dev shared above)
- RTP

"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki

My Blog: https://politictech.wordpress.com
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  list of linux native apps/softwares for pinephone on the wiki alexandre 7 2,107 Yesterday, 11:56 PM
Last Post: bcnaz
  Why are certain apps so slow? gamerminstrel 10 704 10-18-2021, 02:01 PM
Last Post: bosi564
  updated now phone won't start techariah 3 160 10-17-2021, 11:41 PM
Last Post: bcnaz
  PinePhone Covid Apps bigtreeman 12 239 10-17-2021, 05:24 AM
Last Post: evilbunny
  Changed pin to blank and can't get into phone now. umop 7 308 10-14-2021, 05:16 AM
Last Post: megous
  Aftermarket Pine Phone Batteries Katsujinken 8 500 10-10-2021, 11:42 AM
Last Post: Fred Zyphal
  New Pine Phone User In Canada Katsujinken 14 154 10-06-2021, 09:11 AM
Last Post: dachalife
  Pine phone Junior, message phone ? bcnaz 22 1,269 09-30-2021, 12:04 AM
Last Post: biketool
  New phone - setup - only landscape - KDE plasma westsamoa 2 185 09-27-2021, 02:23 AM
Last Post: Uturn
  GCI data on Pine Phone nelstomlinson 0 151 09-26-2021, 04:04 PM
Last Post: nelstomlinson

Forum Jump:


Users browsing this thread: 1 Guest(s)