[GH-ISSUE #1602] private-lib must be disabled for hexchat to start #1069

Closed
opened 2026-05-05 07:24:57 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @Ryujinra on GitHub (Oct 12, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1602

On Archlinux, private-lib must be disabled or hexchat complains about python encodings missing.

Relevant part of error:

Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Originally created by @Ryujinra on GitHub (Oct 12, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1602 On Archlinux, private-lib must be disabled or hexchat complains about python encodings missing. Relevant part of error: Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'
gitea-mirror 2026-05-05 07:24:57 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SkewedZeppelin commented on GitHub (Oct 13, 2017):

Do you happen to have any plugins enabled?

<!-- gh-comment-id:336338341 --> @SkewedZeppelin commented on GitHub (Oct 13, 2017): Do you happen to have any plugins enabled?
Author
Owner

@Fred-Barclay commented on GitHub (Oct 13, 2017):

@Ryujinra It does seem to be an issue with a python library (without plugins, hexchat starts with no problems on my Arch system). Do you also have to comment out private-bin?

@SpotComms I recall we recently had a discussion about hexchat & python plugins 😁. Since our private-bin filter also should break python plugins, if we disable private-lib solely for the sake of plugins we would probably have to disable private-bin as well.

<!-- gh-comment-id:336343464 --> @Fred-Barclay commented on GitHub (Oct 13, 2017): @Ryujinra It does seem to be an issue with a python library (without plugins, hexchat starts with no problems on my Arch system). Do you also have to comment out `private-bin`? @SpotComms I recall we recently had a discussion about [hexchat & python plugins](https://github.com/netblue30/firejail/commit/c6259375dff79484b9f3d587da9fbfa76a3b68b9#commitcomment-24783828) 😁. Since our private-bin filter also should break python plugins, if we disable private-lib solely for the sake of plugins we would probably have to disable private-bin as well.
Author
Owner

@Fred-Barclay commented on GitHub (Oct 13, 2017):

@Ryujinra Come to think of it, could you try to replace your private-lib line with the following?
private-lib python3.6,libpython3.6m.so.1.0

<!-- gh-comment-id:336344508 --> @Fred-Barclay commented on GitHub (Oct 13, 2017): @Ryujinra Come to think of it, could you try to replace your `private-lib` line with the following? `private-lib python3.6,libpython3.6m.so.1.0`
Author
Owner

@Ryujinra commented on GitHub (Oct 13, 2017):

@SpotComms @Fred-Barclay Yes it appears the Python plugin is enabled, though I don't remember ever loading it manually. It seems Python is enabled in the PKGBUILD for hexchat in community repo: community/hexchat

Disabling private-bin is not necessary for me.

Of course, the default plugins like sysinfo are also enabled.

@Fred-Barclay Using the line private-lib python3.6,libpython3.6m.so.1.0 does indeed fix the issue.

<!-- gh-comment-id:336379756 --> @Ryujinra commented on GitHub (Oct 13, 2017): @SpotComms @Fred-Barclay Yes it appears the Python plugin is enabled, though I don't remember ever loading it manually. It seems Python is enabled in the PKGBUILD for hexchat in community repo: [community/hexchat](https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/hexchat) Disabling private-bin is not necessary for me. Of course, the default plugins like sysinfo are also enabled. @Fred-Barclay Using the line `private-lib python3.6,libpython3.6m.so.1.0` does indeed fix the issue.
Author
Owner

@netblue30 commented on GitHub (Oct 14, 2017):

I have removed private-lib from xchat, it looks like we have problems with python. I also removed memory-deny-write-execute, it breaks python consistently at least on Debian.

Fixed fcopy warnings, nice bug! It was in private-bin from the beginning. On Arch /bin and /usr/bin are pointing to the same directory and we ended up installing private-bin executables twice.

I'll bring in some more private-lib programs and see how is going. GTK 2 and 3 and Qt4 should work fine on all distros. So far we have problems with Qt5 (Arch and Ubuntu 17.04, Debian stable seems to be fine) and python (also on Arch, Debian stable is ok).

b0a97b9df5

<!-- gh-comment-id:336636487 --> @netblue30 commented on GitHub (Oct 14, 2017): I have removed private-lib from xchat, it looks like we have problems with python. I also removed memory-deny-write-execute, it breaks python consistently at least on Debian. Fixed fcopy warnings, nice bug! It was in private-bin from the beginning. On Arch /bin and /usr/bin are pointing to the same directory and we ended up installing private-bin executables twice. I'll bring in some more private-lib programs and see how is going. GTK 2 and 3 and Qt4 should work fine on all distros. So far we have problems with Qt5 (Arch and Ubuntu 17.04, Debian stable seems to be fine) and python (also on Arch, Debian stable is ok). https://github.com/netblue30/firejail/commit/b0a97b9df55bc61d136c968db6e3a6583495ed55
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1069
No description provided.