Skip to content

Commit c8c59b7

Browse files
committed
🐛 Fixed xhost: unable to open display "127.0.0.53:0.0"
1 parent 460afa3 commit c8c59b7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/upload_python_package.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
env:
12-
# DISPLAY: :0.0
13-
XAUTHORITY: /run/user/1000/gdm/Xauthority
14-
LIBGL_ALWAYS_INDIRECT: 1
12+
DISPLAY: :0
1513

1614
steps:
1715
- uses: actions/checkout@v2
1816
- name: Set up Python
1917
uses: actions/setup-python@v2
2018
with:
2119
python-version: '3.x'
22-
- name: Setup Device Information.
20+
- name: Setup xvfb
2321
run: |
24-
echo "export DISPLAY=\$(cat /etc/resolv.conf | grep nameserver | awk '{print \$2}'):0.0" >> ~/.profile
25-
source ~/.profile
26-
pip install xkeysnail
27-
xhost +SI:localuser:root
28-
xkeysnail config.py
22+
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
23+
# start xvfb in the background
24+
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
2925
- name: Install dependencies
3026
run: |
3127
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)