This stage snap ships the tcltk-launch
launcher to your snap, which fixes Tcl/Tk applications.
How to use
Merge the following part definition:
parts:
# The tcltk-launch launcher: Fix Tcl/Tk applications in the snap runtime
# https://forum.snapcraft.io/t/the-tcltk-launch-launcher-fix-tcl-tk-applications-in-the-snap-runtime/11740
source: https://github.com/Lin-Buo-Ren/tcltk-launch.git
source-tag: v1.0.0
plugin: dump
stage:
- bin/*
then add bin/tcltk-launch
to the command chain to launch the application:
apps:
_app_name_:
adapter: full
command: bin/_app_executable_
command-chain:
- bin/tcltk-launch
This launcher depends on The debian-multiarch-triplet-provider-launch launcher: Enable DEBIAN_MULTIARCH_TRIPLET-like environment variable in the snap runtime , refer the topic to integrate it into the snapcraft recipe.
Implementation
Snaps that uses this stage snap
T.B.A.
1 Like
@Lin-Buo-Ren I’m having trouble with this. My snap seems to work perfectly except that it does not accept keyboard input when assigned to foreign scripts. This is even the case in devmode
. Do you know why this is?
First of all, apologies for the ignorance.
Might be an input method framework compatibility issue or a XCompose(5) compatibility issue. Which foreign script you’re using?
I was trying to write in Cyrillic, but I’m pretty sure it didn’t work for other character sets as well. I’m not working on this project anymore, so probably don’t worry about it, unless someone else has problems.
1 Like
Thanks for your input! I’ll definitely check it out after knowing how to reproduce them.
@admins Please set this topic as a wiki, thanks!
Done, and thank you for all the fantastic additions over the last couple of days!
1 Like
Hi!
I have been trying to replicate your success with tkinter in a snap environment and am getting stuck on a “Module not found” error. I believe I am doing something incorrectly.
File “/snap/ocrmypdfgui/24/usr/lib/python3.8/tkinter/init .py”, line 36, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named ‘_tkinter’
My Snapcraft.yaml can be found here:
name: ocrmypdfgui # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Hobby Project GUI for the Python Program "OCRmyPDF" by James R. Barlow
description: |
I use James R. Barlow's OCRmyPDF heavily in my paperless Office and have created this Python Project as a GUI wrapper to run batch jobs on my filesystem. This is strictly a Hobby Project and is not "official". Feel free to use it if you like.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
architectures:
- build-on: [amd64]
parts:
# https://forum.snapcraft.io/t/the-debian-multiarch-triplet-provider-launch-stage-snap/11738
debian-multiarch-triplet-provider-launch:
source: https://github.com/Lin-Buo-Ren/debian-multiarch-triplet-provider-launch.git
source-tag: v1.0.0
plugin: dump
stage:
This file has been truncated. show original
Any help would be appreciated. Thanks in advance!