Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2019, 05:09 PM   #1
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
Problems running Python3.4/GObject (GTK3.0)

Hi,

I've been experimenting with packaging GTK3 with the corresponding Python3.4 bindings and have been having trouble with running a simple test application. When the test application included is run, the buttons are not drawn on the screen of the Kindle but do respond to touch events. The window title seems to be set correctly, so I'm curious as to what is causing this issue.

Any thoughts?

I've included the script that I'm using to download and extract packages from the Debian Jessie repo, which is a modified version of the script from this thread. To build the environment, run python3 build.py.
Attached Files
File Type: gz GtkTest.tar.gz (2.8 KB, 188 views)
katadelos is offline   Reply With Quote
Old 11-21-2019, 11:16 AM   #2
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
Update:

On the advice of @NiLuJe, I removed Python from the equation entirely and compiled a minimal GTK3 application to see whether the problem lay with Python or GTK3. When I ran my compiled binary, I had the same outcome as before - the titlebar turned invisible but none of the widgets were drawn. However, when I ran my application within Xephyr, it worked perfectly. I also tried to run one of the Python/GTK examples within Xephyr and I had different results depending on whether I was within a debian chroot or not. Outside of the chroot, GTK tried to load fontconfig definitions from the usual system path and failed with a bunch of errors like this:
Code:
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 84: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 84: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 93: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 93: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 102: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 102: Having multiple <family> in <alias> isn't supported and may not work as expected
The program loads but the text doesn't display properly, as shown in the image below. When I'm within the chroot, this is not an issue, presumably because it's loading the font config files from within the chroot.

Why does GTK work within Xephyr but not directly on the Kindle's X11 server?
Attached Thumbnails
Click image for larger version

Name:	awesome.png
Views:	192
Size:	44.8 KB
ID:	175038   Click image for larger version

Name:	xephyr.png
Views:	184
Size:	2.9 KB
ID:	175039   Click image for larger version

Name:	xephyrchroot.png
Views:	187
Size:	4.8 KB
ID:	175040  
katadelos is offline   Reply With Quote
Advert
Old 11-21-2019, 01:15 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I can't comment on the X thing as I'm not familiar with any of it, but the fontconfig thing *is* familiar .

That's a simple version mismatch: the config format evolved in some release long ago, which made newer configs partly unreadable by older versions. Or vice-versa.

This was fun for a while even on desktop, with apps that bundle fontconfig and/or fontconfig shards (looking at you, CEF & Electron ).
NiLuJe is offline   Reply With Quote
Old 11-21-2019, 01:18 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You can force fontconfig's searchpath via env vars to work around the config mismatches somewhat, without having to do anything crazier.

IIRC, FONTCONFIG_FILE points to the "master" fonts.conf (i.e., what's usually /etc/fonts/fonts.conf). This can point to a bogus path if you just need to discard everything (which was my own use-case, but that was a pretty edge-casey one ;p).

There may be finer-grained approaches, check fontconfig's docs .

Last edited by NiLuJe; 11-21-2019 at 01:20 PM.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems running on chakra linux. acemo Calibre 15 05-24-2011 01:51 PM
Problems running. Varlonec enTourage Archive 1 03-05-2011 08:54 AM
problems running Calibre on FreeBSD kacir Calibre 5 10-22-2009 02:24 AM
Observations/problems running Calibre under OS X garygibsonsf Calibre 17 07-25-2008 11:03 PM
Problems running calibre on Windows XP maccow Calibre 2 06-05-2008 01:35 PM


All times are GMT -4. The time now is 03:57 AM.


MobileRead.com is a privately owned, operated and funded community.