WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] flatpak and TCL  (Read 1026 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: flatpak and TCL
« Reply #15 on: December 15, 2025, 11:43:19 AM »
maybe try the  noembed  boot code?
Hi Rich. YES! That was the missing piece of the puzzle! :o I've always known you are a wizard in disguise!

I've been trying to create a flatpak extension for TCL off and on since 2020 (see https://forum.tinycorelinux.net/index.php/topic,23848.0.html). Well, here we are 5 years later and I think it will finally happen. Better late than never :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: flatpak and TCL
« Reply #16 on: December 15, 2025, 12:34:55 PM »
flatpak submitted for TCL16 x86_64 :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: flatpak and TCL
« Reply #17 on: December 15, 2025, 01:03:19 PM »
Hi Rich. Is there a way to use a startup script (e.g., /usr/local/tce.installed/flatpak) to achieve the same end result as booting with the  noembed  boot code? I will also be looking into this.

EDIT: I see that the  noembed  boot code is handled by /init
« Last Edit: December 15, 2025, 01:10:34 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: flatpak and TCL
« Reply #18 on: December 15, 2025, 02:44:42 PM »
Hi Rich. Is there a way to use a startup script (e.g., /usr/local/tce.installed/flatpak) to achieve the same end result as booting with the  noembed  boot code? I will also be looking into this.

EDIT: I see that the  noembed  boot code is handled by /init
Never mind, Rich. /init takes care of this before /sbin/init even runs. I doubt it is possible to do this after system is up and running and, even if it were possible, I don't think this is something that an application's startup script should be doing without user being aware.

In flatpak's .info file I will note that the  noembed  boot code is required.

Thank you so much for suggesting this boot code. Thread may be marked as Solved! :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12362
Re: [Solved] flatpak and TCL
« Reply #19 on: December 15, 2025, 04:31:04 PM »
Hi GNUser
You might be able to switch_root with a running system, but I
suspect it might not be safe to do.

... Thread may be marked as Solved! :)
So marked. ;D

Offline hiro

  • Hero Member
  • *****
  • Posts: 1250
Re: [Solved] flatpak and TCL
« Reply #20 on: December 15, 2025, 04:52:12 PM »
nice, GNUser :D

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: [Solved] flatpak and TCL
« Reply #21 on: December 17, 2025, 01:03:30 PM »
nice, GNUser :D
Hi hiro. Enjoy!
 
While I'm here, let me point out two issues I've encountered when playing around with flatpak:

1. /var/local/lib/flatpak/repo: No such file or directory
Some flatpaks (e.g., com.google.Chrome) fail like this:
Code: [Select]
$ flatpak --user run com.google.Chrome
...
error: While opening repository /var/local/lib/flatpak/repo: opening repo: opendir(/var/local/lib/flatpak/repo): No such file or directory
When run with the  --user  flag, flatpak should not be mucking around in /var (its root dir should be $HOME/.local/share/flatpak, not /var/local/lib/flatpak). The solution for this kind of naughty behavior is simple:

Code: [Select]
$ mkdir -p /var/local/lib; ln -s $HOME/.local/share/flatpak /var/local/lib/flatpak; flatpak --user run com.google.Chrome
2. No sound
Flatpak requires pulseaudio for sound. If you are an alsa purist like me, your terminal may show errors like this when a flatpak tries to output sound:
Code: [Select]
ALSA lib ../../pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
If alsa is properly configured, it is trivial to temporarily use pulseaudio:
Code: [Select]
$ tce-load -wil pulseaudio; sudo /usr/local/etc/init.d/dbus start; pulseaudio 2>/dev/null &
    [Edit]: Fixed typo. Changed  puseaudio  to  pulseaudio.  Rich
« Last Edit: December 17, 2025, 02:27:53 PM by Rich »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1729
Re: [Solved] flatpak and TCL
« Reply #22 on: December 17, 2025, 01:43:06 PM »
Hi Rich. Can you please fix the typo in the last command above? I'd fix it myself but the forum won't let me any more (the timeout for allowing edits is very short--it would be nice if the timeout were longer). It should be  pulseaudio  in the command, of course, not  puseaudio. Then please feel free to delete this post.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12362
Re: [Solved] flatpak and TCL
« Reply #23 on: December 17, 2025, 02:28:40 PM »
Hi GNUser
Typo fixed. :)