@arubislander meh ...i think i would rather do a straight forward ...charge then unlock and no BS kinda go back in the day pay once no irritation its yours

Posts
-
RE: full python clickable app prototype
-
RE: full python clickable app prototype
@arubislander im thinking librepay? i would implement a unlock or something i think or look into ad revenue ....but it feels like heresy to put google ads in a UT application?? ....any thoughts on non google adds maybe even crypto i know there a few options maybe you heard some rumors?
-
RE: Get app name and hook at runtime
@Plarde Yes, it is possible — though not entirely straightforward — to infer some runtime information like the app's name and the hook that launched it on Ubuntu Touch, particularly if the app is deployed as a click package.
Here’s a breakdown of your goals and possible solutions:
Goal: Get the App ID or Name from Manifest
In Ubuntu Touch click packages, metadata is defined in a manifest.json file, which contains fields like:
{
"name": "appname.yourname",
"version": "1.0.0",
"framework": "ubuntu-sdk-20.04",
...
}How to get this at runtime?
At runtime, this data isn’t directly exposed via traditional environment variables like APP_NAME. However:
Environment Variables Available at Runtime: The AppArmor profile and the Ubuntu Touch application launch mechanism set a number of environment variables, including: APP_ID: Often the full app name like appname.yourname APP_PATH: The full installation path to the app APP_BIN: The binary or hook name
You can access these using C/C++/SDL via getenv("APP_ID"), etc.
Goal: Get the Hook Name (i.e., the launcher binary name)
Click packages specify "hooks" (executables, wrappers, or scripts) in the manifest.json under "hooks":
"hooks": {
"myhook": {
"apparmor": "myhook.apparmor",
"desktop": "myhook.desktop"
}
}How to get the hook at runtime?
There’s no standard variable like APP_HOOK, but you can infer it from:
argv[0] or /proc/self/exe: #include <unistd.h> #include <limits.h> char path[PATH_MAX]; ssize_t len = readlink("/proc/self/exe", path, sizeof(path)-1); if (len != -1) { path[len] = '\0'; printf("Executable Path: %s\n", path); } Then extract the final component to get the executable name — likely the hook.
Summary of Techniques
What You Want How to Get It
App ID (from manifest) getenv("APP_ID") or getenv("APP_NAME") (test both)
App Install Path getenv("APP_PATH")
Executable Name / Hook Use argv[0] or resolve /proc/self/exe
Manifest Contents Parse /opt/click.ubuntu.com/<appid>/manifest.json manually
Bonus: Parsing the Manifest Programmatically
If you want full manifest access:
#include <stdio.h>
#include <stdlib.h>
#include <json-c/json.h>void print_manifest_field(const char* field) {
const char* appid = getenv("APP_ID");
if (!appid) return;char manifest_path[512]; snprintf(manifest_path, sizeof(manifest_path), "/opt/click.ubuntu.com/%s/current/manifest.json", appid); FILE* file = fopen(manifest_path, "r"); if (!file) return; struct json_object *parsed_json; parsed_json = json_object_from_file(manifest_path); if (parsed_json) { struct json_object *value; if (json_object_object_get_ex(parsed_json, field, &value)) { printf("%s: %s\n", field, json_object_get_string(value)); } json_object_put(parsed_json); } fclose(file);
}
️ Caveats
These variables are set by the Ubuntu Touch application launcher, so they only exist in the app context. Hook names are not exported as a separate variable unless the launcher sets one explicitly. SDL3 libraries should allow injection or configuration of these values from the hosting application (e.g., via init).
Final Advice for SDL3 Porting
Since SDL3 is a library and shouldn't hardcode values:
Consider requiring the host app to pass APP_ID and HOOK_NAME to SDL3 during initialization. You could fallback to the environment and /proc/self/exe as a best-effort fallback.
Let me know if you want a ready-made SDL3-compatible utility wrapper function for this.
-
RE: Firefox from Snap crushed after run.
@PiotrBujakowski i know its been a minute but ....can you elaborate?
-
not all distros are equal in the eyes of clickable
im noticing that alot of distro package managers are not up to snuff on qt components ....is it possible to refactor clickables pip install to include needed qt components so a developer does not have to hunt down proper or recent qtversions ...i got it working on pop_os but not without some struggle ...or is this outside of the UT community control?? ...also pop_os always uses a older ubuntu base so there is that
-
RE: full python clickable app prototype
truth is maybe if i try really hard i could be a success here? .....i work at burger king ....is there any money in creating clickable apps full time?? ...i understand almost everything is open source or free with UT? ...i have never seen a paid app on the open store ??? ...this python app will be free ...but i cant always do free ...or am i thinking about barking up the wrong tree?? (for money ill still make apps but for fun and have much less time to invest)
-
RE: full python clickable app prototype
i am the poster child for ADHD ..i am all over the place makes it really hard to finish things ....but once i get to a place i can "paint" with clickable and qml ....your app shortage is over
-
full python clickable app prototype
i need ideas and such ...its almost complete as it runs but does not quite work yet ...the idea is to create and manage virtual python environments within the apps sandboxed space and then do thing within the environment via the terminal not much to look at yet ...i plan on fancying it up of course visually but functionality first and if this goes well i was thinking maybe rust is next??? ...but anyways i didnt forget about y'all ....even when back to UT to make this happen ...this will happen
-
RE: Some Confusion about the install requirements
@GosuSan i have the same device you will actually need 12.02 as the final version will work but for some reason screen rotation is broken i dont know why you should just be able to use the installer but if you cannot you will need to use fastboot command from the terminal and you will have to fasboot flash <partition> filename.img to each file the partiton names are the same as the filenames
-
RE: Which devices support Ubuntu Touch to run games smoothly?
i for one would love to play openMW on UT and doom3 "dehm3" (not sure if i spelled that right)
-
RE: I am about to give up and leave
@jojumaxx i feel the same way im a dev for over 30 years .....after banging my head into brick walls over and over again and i complained non stop for a bit .....but really i just had to step back and realize "this isnt linux" ....ask all these guys they will tell you ......i dont have any answers it just is what it is ....the sooner you accept that the better off you will be ......i have like 50 programs i want to port to UT but i keep running into outdated libs and dead links all kinds of issues .......but ultimately the scope of UT versus how many developers is extremely unbalanced and as time goes forward UT seems to be falling behind .......its just not very cool to bust the existing developers ballz as they are doing their best and usually not even getting paid ......i totally get your frustration tho (like im your #1 fan in this) ........if you know how to code forge ahead and add the features you want (will be a learning experience)
-
RE: Would it be possible to port this app?
omg i see why axolotl isnt getting any development love ........its a giant mess .....this may take a extremely long time .....30 years of writing software i have come to the conclusion the K.I.S.S method is really king ....axolotl does not and i repeat does not follow K.I.S.S (keep it simple silly) ....i can build it kinda so we shall see
-
RE: Would it be possible to port this app?
@Moem im cloning it now if i can get it to build on my system ill prob be able to do something with it ....although i prob wont be able to directly help them because im locked out of github atm
-
RE: Would it be possible to port this app?
@Moem actually i can make the script i have use it automatically so you wouldnt have to use the terminal ....but alas i think its just to outdated to bother
-
RE: Would it be possible to port this app?
when the newer libraries become available i can make it happen pretty easy i already have the main shell of the program as you see ....so eventually it prob will happen ...depends on the core devs
-
RE: Would it be possible to port this app?
so iv been stalking the signal github ....and right now im thinking it wont be possible for alot of reasons ....the only way currently would be to install the signal-cli program and that would might not work because of alot of current updates to the core libs of signal and lack of updates with everything else ...currently .....have you tried to use libertine? (i have never gotten it to work) ....im sorry i wanted to make this happen for you
-
RE: Would it be possible to port this app?
one main issue im running into is signal does not provide a public api so i have to use signal-cli to make things happen the issue is UT file system is locked ....so i dont know what to do .....can a clickable app download and install a program for the system or does it only use its own space to do anything? ...if its a command line app like signal-cli can it run in a apps user space? ....so much i dont know about clickable ........this is why im usually complaining about this or that on UT regarding the locked file system ....great for security but makes app development .....really hard ....im sure its just something simple (or complicated lol)i need to learn though
-
RE: Would it be possible to port this app?
@Moem do you prefer to use you username and password or do you use any Oauth i.e google, github, ect?