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).
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  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 the rich 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


[ Pinephone Original | Pinetab v1 / v2 Enjoyer ]


Linux Device Privacy / Security Playlist



  Reply
#8
Thanks for this
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  2G, 3G still is in phone. Piotr Bujakowski 5 1,005 09-19-2024, 03:49 AM
Last Post: jennybaso
  My new phone stopped working. gunnygee 1 557 08-02-2024, 07:20 AM
Last Post: mikehenson
  Looking for the "non-phone" OS wakyct 7 2,898 03-14-2024, 03:51 AM
Last Post: MTXP
  How To Access the Pine Phone Auxillary microSD Without Removing Card pinephoneuser22 2 1,555 01-09-2024, 07:02 PM
Last Post: britelite
  Android bank apps ionmich 4 3,004 12-12-2023, 01:01 PM
Last Post: mannzrespouse
  Pine company idea aular 9 3,015 12-07-2023, 12:32 AM
Last Post: KC9UDX
  Can the Pine Phone be serviced and updated remotely? profileyourcity 3 1,625 10-02-2023, 05:19 PM
Last Post: Zebulon Walton
  UBports on pine phone? robb777 16 5,912 09-01-2023, 04:26 AM
Last Post: gregb49
  US Cell Phone Service Providers with prices and phone numbers - UPDATED jovval 0 999 07-01-2023, 01:25 AM
Last Post: jovval
  Basic question: KDE apps on GNOME and vice versa jojuma 4 1,805 06-15-2023, 01:42 PM
Last Post: jojuma

Forum Jump:


Users browsing this thread: 1 Guest(s)