x11docker: Can't run x11docker within script.
Trying to run x11docker from within a script, however, xorg refuses to run. Error is as follows:
x11docker ERROR: Error during startup of X server --xorg.
Last lines of xinit log:
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/hosh/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
sed: -e expression #1, char 16: Invalid collation character
Error: Can't open display: :100
Trying to run it simply using:
#!/usr/bin/env bash
set -exo pipefail
x11docker --gpu --homedir "/tmp/kodi/home" -- --volume /tmp/kodi/media:/media:ro -- erichough/kodi &>/tmp/kodi.log &
sleep 20
echo "it's running!"
Have had this issue previously while doing something else, but was unable to fix it. Any ideas how I can get this running?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- catch failing tty check #176 — committed to mviereck/x11docker by mviereck 5 years ago
- shebang 'bash -i +H' to make script interactive. #166 #176 — committed to mviereck/x11docker by mviereck 5 years ago
- drop extended shebang #176, fails in some coreutil versions — committed to mviereck/x11docker by mviereck 5 years ago
- --enforce-i: experimental option to enforce bash interactive mode #166 #176 — committed to mviereck/x11docker by mviereck 5 years ago
- --enforce-i --interactive: Disable --interactive #176 — committed to mviereck/x11docker by mviereck 5 years ago
Thank you for your tests! The latest release v6.2.0 includes the fixes for this ticket.
--enforce-iis part of this release. However, it seems it will be needed for rare edge cases like in #166 now.Works!
Re
-S, I guess you could simply check$-to see if the relevant options are there, and rerun bash using correct options if they’re not. Something like:I’m not sure if
iandHare the correct options since I can’t test against/usr/bin/env -S.