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>'
title: ocrmypdfgui
base: core18 # the base snap is the execution environment for this snap
version: '0.9.07' # 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. Includes full current version of OCRmyPDF as backend. Icons and banner made by Freepik from www.flaticon.com
icon: gui/ocrmypdfgui.png
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
#
architectures: [amd64]
environment:
TESSDATA_PREFIX: $SNAP/usr/share/tesseract-ocr/4.00/tessdata
GS_LIB: $SNAP/usr/share/ghostscript/9.26/Resource/Init
GS_FONTPATH: $SNAP/usr/share/ghostscript/9.26/Resource/Font
LD_LIBRARY_PATH: $SNAP/usr/lib/x86_64-linux-gnu
apps:
This file has been truncated. show original
Any help would be appreciated. Thanks in advance!