Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhost: unable to open display ":0" #213

Closed
WBP20 opened this issue Apr 21, 2024 · 9 comments
Closed

xhost: unable to open display ":0" #213

WBP20 opened this issue Apr 21, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@WBP20
Copy link

WBP20 commented Apr 21, 2024

Describe the bug

I have this error message when starting my container, then I am not able to launch firefox from the container.

Steps To Reproduce

  1. sudo exegol start htb
  2. firefox

Exegol Wrapper Version

[*] Exegol is currently in version v4.3.2
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/

⭐ Container summary                                            
┌──────────────────┬───────────────────────────────────────────┐
│             Name │ htb                                       │
│            Image │ light - v.3.1.3 (Up to date)              │
├──────────────────┼───────────────────────────────────────────┤
│      Credentials │ root : dsjdhsjdhsdjshdsjdhsdjshdjdshd     │
│   Remote Desktop │ Off 🪓                                    │
│    Creation date │ 20/04/2024 15:31                          │
│      Console GUI │ On ✔ (X11)                                │
│          Network │ host                                      │
│         Timezone │ On ✔                                      │
│ Exegol resources │ On ✔ (/opt/resources)                     │
│     My resources │ On ✔ (/opt/my-resources)                  │
│    Shell logging │ Off 🪓                                    │
│       Privileged │ Off ✔                                     │
│        Workspace │ Dedicated (/workspace)                    │
│          Volumes │ /root/.exegol/workspaces/htb ➡ /workspace │
└──────────────────┴───────────────────────────────────────────┘

sudo exegol info htb -vv
[*] Exegol is currently in version v4.3.2
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[V] Listing user configurations                                 

🧠 User configurations                            
┌────────────────────────────────────────────────┐
│ User config file: /root/.exegol/config.yml     │
│ Private workspace: /root/.exegol/workspaces    │
│ Exegol resources: /opt/Exegol/exegol-resources │
│ My resources: /root/.exegol/my-resources       │
│ Auto-check updates: On ✔                       │
│ Auto-remove images: On ✔                       │
│ Auto-update fs: Off 🪓                         │
│ Default start shell: zsh                       │
│ Shell logging method: asciinema                │
│ Shell logging compression: On ✔                │
│ Desktop enabled by default: Off 🪓             │
│ Desktop default protocol: http                 │
│ Desktop default host: localhost                │
└────────────────────────────────────────────────┘

[V] Listing git repositories                                    
[V] Git wrapper init submodules                                 

🐙 Project modules                         
┌───────────┬────────────┬────────────────┐
│ Name      │ Status     │ Current branch │
├───────────┼────────────┼────────────────┤
│ Wrapper   │ Up to date │ master         │
│ Images    │ Up to date │ main           │
│ Resources │ Up to date │ main           │
└───────────┴────────────┴────────────────┘


⭐ Container summary                                            
┌──────────────────┬───────────────────────────────────────────┐
│             Name │ htb                                       │
│            Image │ light - v.3.1.3 (Up to date) (arm64)      │
├──────────────────┼───────────────────────────────────────────┤
│      Credentials │ root : sdkjqkdqdqdkqjdqkjdqkdjqsjdqqd     │
│   Remote Desktop │ Off 🪓                                    │
│    Creation date │ 20/04/2024 15:31                          │
│      Console GUI │ On ✔ (X11)                                │
│          Network │ host                                      │
│         Timezone │ On ✔                                      │
│ Exegol resources │ On ✔ (/opt/resources)                     │
│     My resources │ On ✔ (/opt/my-resources)                  │
│    Shell logging │ Off 🪓                                    │
│       Privileged │ Off ✔                                     │
│        Workspace │ Dedicated (/workspace)                    │
│             Envs │ DISPLAY=:0                                │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1             │
│                  │ QT_X11_NO_MITSHM=1                        │
│                  │ EXEGOL_RANDOMIZE_SERVICE_PORTS=true       │
│                  │ PATH=/usr/local/sbin:/usr/local/bin:/usr… │
│          Volumes │ (RO)                                      │
│                  │ /opt/Exegol/exegol/utils/imgsync/spawn.sh │
│                  │ ➡ /.exegol/spawn.sh                       │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix      │
│                  │ (RO) /etc/localtime ➡ /etc/localtime      │
│                  │ (RW) /root/.exegol/my-resources ➡         │
│                  │ /opt/my-resources                         │
│                  │ (RW) /opt/Exegol/exegol-resources ➡       │
│                  │ /opt/resources                            │
│                  │ (RW) /root/.exegol/workspaces/htb ➡       │
│                  │ /workspace                                │
└──────────────────┴───────────────────────────────────────────┘

Host OS

Linux

Configuration of the concerned container

[D] Loading git at /opt/Exegol                                      
[D] Repo path: /opt/Exegol/.git                                     
[D] Git repository successfully loaded                              
[*] Exegol is currently in version v4.3.2
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[D] Pip installation: Off 🪓                                        
[D] Git source installation: On ✔                                   
[D] Host OS: Linux (Kernel)                                         
[D] Arch: arm64                                                     
[D] Raw arch: aarch64                                               
[D] Docker desktop: Off 🪓                                          
[D] Shell type: Linux                                               
[D] Last wrapper update check: 20/04/2024                           

[V] Listing user configurations                                     

🧠 User configurations                            
┌────────────────────────────────────────────────┐
│ User config file: /root/.exegol/config.yml     │
│ Private workspace: /root/.exegol/workspaces    │
│ Exegol resources: /opt/Exegol/exegol-resources │
│ My resources: /root/.exegol/my-resources       │
│ Auto-check updates: On ✔                       │
│ Auto-remove images: On ✔                       │
│ Auto-update fs: Off 🪓                         │
│ Default start shell: zsh                       │
│ Shell logging method: asciinema                │
│ Shell logging compression: On ✔                │
│ Desktop enabled by default: Off 🪓             │
│ Desktop default protocol: http                 │
│ Desktop default host: localhost                │
└────────────────────────────────────────────────┘

[V] Listing git repositories                                        
[D] Loading git at /opt/Exegol                                      
[D] Repo path: /opt/Exegol/.git                                     
[D] Git repository successfully loaded                              
[V] Git wrapper init submodules                                     
[D] Loading repo submodules: sources                                
[D] Loading repo submodules: exegol-resources                       
[D] Loading repo submodules: encrypted_disks/napper-for-tpm         
[D] Loading repo submodules: encrypted_disks/bitleaker              
[D] Loading repo submodules: linux/mimipy                           
[D] Loading repo submodules: linux/mimipenguin                      
[D] Loading repo submodules: webshells/PHP/p0wny-shell              
[D] Loading repo submodules: windows/WinEnum                        
[D] Loading repo submodules: windows/SharpCollection                
[D] Loading repo submodules: windows/PrivescCheck                   
[D] Loading repo submodules: windows/nishang                        
[D] Loading repo submodules: windows/MailSniper                     
[D] Loading repo submodules: windows/Inveigh                        
[D] Loading repo submodules: windows/impacket-examples-windows      
[D] Loading repo submodules: windows/PowerSploit                    
[D] Git submodule repository detected                               
[D] Loading git at /opt/Exegol/exegol-docker-build                  
[D] Repo path: /opt/Exegol/.git/modules/sources                     
[D] Git repository successfully loaded                              
[D] Git submodule repository detected                               
[D] Loading git at /opt/Exegol/exegol-resources                     
[D] Repo path: /opt/Exegol/.git/modules/exegol-resources            
[D] Git repository successfully loaded                              
[D] Fetch flags : 4                                                 
[D] Fetch note :                                                    
[D] Fetch old commit : None                                         
[D] Fetch remote path : master                                      
[D] HEAD UP TO DATE flag detected                                   
[D] Fetch flags : 4                                                 
[D] Fetch note :                                                    
[D] Fetch old commit : None                                         
[D] Fetch remote path : main                                        
[D] HEAD UP TO DATE flag detected                                   
[D] Fetch flags : 4                                                 
[D] Fetch note :                                                    
[D] Fetch old commit : None                                         
[D] Fetch remote path : main                                        
[D] HEAD UP TO DATE flag detected                                   

🐙 Project modules                         
┌───────────┬────────────┬────────────────┐
│ Name      │ Status     │ Current branch │
├───────────┼────────────┼────────────────┤
│ Wrapper   │ Up to date │ master         │
│ Images    │ Up to date │ main           │
│ Resources │ Up to date │ main           │
└───────────┴────────────┴────────────────┘

[D] Attribute not found in parameters: multicontainertag            
[D] Loading container: exegol-htb                                   
[D] └── Parsing envs : DISPLAY=:0                                   
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                           
[D] └── Parsing envs : EXEGOL_RANDOMIZE_SERVICE_PORTS=true          
[D] └── Parsing envs :                                              
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin   
[D] └── Parsing label : org.exegol.app                              
[D] └── Parsing label : org.exegol.build_date                       
[D] └── Parsing label : org.exegol.metadata.creation_date           
[D] └── Parsing label : org.exegol.metadata.passwd                  
[D] └── Parsing label : org.exegol.src_repository                   
[D] └── Parsing label : org.exegol.tag                              
[D] └── Parsing label : org.exegol.version                          
[D] └── Capabilities : []                                           
[D] └── Load devices : []                                           
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol-resources', 'Destination': '/opt/resources',    
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/workspaces/htb', 'Destination': '/workspace', 'Mode':
'', 'RW': True, 'Propagation': 'rprivate'}                          
[D] └── Loading workspace volume source :                           
/root/.exegol/workspaces/htb                                        
[D] └── Private workspace detected                                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Destination':         
'/.exegol/spawn.sh', 'Mode': '', 'RW': False, 'Propagation':        
'rprivate'}                                                         
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/tmp/.X11-unix',
'Destination': '/tmp/.X11-unix', 'Mode': '', 'RW': True,            
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/localtime',
'Destination': '/etc/localtime', 'Mode': '', 'RW': False,           
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/my-resources', 'Destination': '/opt/my-resources',   
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── light   → (remote)                                          
sha256:84fdafb3c5c59e4ad166699dcb45aef394d45c437c4afacdc31d69897af8a
935                                                                 
[D] Auto-load remote version for the specific image 'light'         

⭐ Container summary                                                
┌──────────────────┬───────────────────────────────────────────────┐
│             Name │ htb                                           │
│            Image │ light - v.3.1.3 (Up to date) (arm64)          │
├──────────────────┼───────────────────────────────────────────────┤
│      Credentials │ root : dsdsdsdssdsdsdsdsdsdsdsdsdsdss         │
│   Remote Desktop │ Off 🪓                                        │
│    Creation date │ 20/04/2024 15:31                              │
│      Console GUI │ On ✔ (X11)                                    │
│          Network │ host                                          │
│         Timezone │ On ✔                                          │
│ Exegol resources │ On ✔ (/opt/resources)                         │
│     My resources │ On ✔ (/opt/my-resources)                      │
│    Shell logging │ Off 🪓                                        │
│       Privileged │ Off ✔                                         │
│        Workspace │ Dedicated (/workspace)                        │
│             Envs │ DISPLAY=:0                                    │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                 │
│                  │ QT_X11_NO_MITSHM=1                            │
│                  │ EXEGOL_RANDOMIZE_SERVICE_PORTS=true           │
│                  │ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbi… │
│          Volumes │ (RW) /opt/Exegol/exegol-resources ➡           │
│                  │ /opt/resources                                │
│                  │ (RW) /root/.exegol/workspaces/htb ➡           │
│                  │ /workspace                                    │
│                  │ (RO)                                          │
│                  │ /opt/Exegol/exegol/utils/imgsync/spawn.sh ➡   │
│                  │ /.exegol/spawn.sh                             │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix          │
│                  │ (RO) /etc/localtime ➡ /etc/localtime          │
│                  │ (RW) /root/.exegol/my-resources ➡             │
│                  │ /opt/my-resources                             │
└──────────────────┴───────────────────────────────────────────────┘

Execution logs in debug mode

[Apr 21, 2024 - 12:01:27 (CEST)] exegol-htb /workspace # firefox
Authorization required, but no authorization protocol specified

Error: cannot open display: :0

Exception

No response

Anything else?

I am running Asahi Fedora Linux on MacM1 hardware with Hyprland
Some of my host ENV if it may help
XDG_CURRENT_DESKTOP=Hyprland
WAYLAND_DISPLAY=wayland-1
DISPLAY=:0
XDG_SESSION_TYPE=wayland

@WBP20 WBP20 added the bug Something isn't working label Apr 21, 2024
@QU35T-code
Copy link
Member

QU35T-code commented Apr 21, 2024

Hi @WBP20,

You need to install X11 server on your Linux host.

https://wiki.archlinux.org/title/xorg
https://archlinux.org/packages/extra/x86_64/xorg-xhost/

@Dramelac
Copy link
Member

Did you have warning or error messages when creating your container ?

@WBP20
Copy link
Author

WBP20 commented Apr 21, 2024

@QU35T-code is it mandatory to install X11 server ? Xwayland could not be sufficient ?

@Dramelac when creating new container (test), i have this error message :

[D] Adding xhost ACL to local:exegol-test
Authorization required, but no authorization protocol specified
xhost:  unable to open display ":0"

@QU35T-code
Copy link
Member

Oh yes, I had forgotten that. Wayland should be supported by exegol, @Dramelac will give you more information !

@Dramelac
Copy link
Member

Hello @WBP20
It seems like your X11 server need authentication (through xauth) which isn't supported by Exegol for the moment unfortunately.

Regarding wayland, it should work but i can see it hasn't been connected to your container... Can you create a new container in debug mode (-vvv) and share the full output ?
Thank you !

@WBP20
Copy link
Author

WBP20 commented Apr 22, 2024

Hello @Dramelac , sure

[?] Select an image by its name (light): light
[V] Config: Enabling display sharing                                
[V] Config: Enabling host timezones                                 
[V] File /etc/timezone is missing on host, cannot create volume for 
this.                                                               
[V] Volume was successfully added for /etc/localtime                
[V] Config: Enabling my-resources volume                            
[V] Updating the permissions of /root/.exegol/my-resources (and     
sub-folders) to allow file sharing between the container and the    
host user                                                           
[D] Adding setgid permission recursively on directories from        
/root/.exegol/my-resources                                          
[D] Git submodule repository detected                               
[D] Loading git at /opt/Exegol/exegol-resources                     
[D] Repo path: /opt/Exegol/.git/modules/exegol-resources            
[D] Git repository successfully loaded                              
[V] Config: Enabling exegol resources volume                        

⭐ Container summary                                                
┌──────────────────┬───────────────────────────────────────────────┐
│             Name │ newContainer                                  │
│            Image │ light - v.3.1.3 (Up to date) (arm64)          │
├──────────────────┼───────────────────────────────────────────────┤
│      Credentials │ root : dsdsdsdsdsdsdsdsdsdsdsds         │
│   Remote Desktop │ Off 🪓                                        │
│      Console GUI │ On ✔ (X11)                                    │
│          Network │ host                                          │
│         Timezone │ On ✔                                          │
│ Exegol resources │ On ✔ (/opt/resources)                         │
│     My resources │ On ✔ (/opt/my-resources)                      │
│    Shell logging │ Off 🪓                                        │
│       Privileged │ Off ✔                                         │
│        Workspace │ Dedicated (/workspace)                        │
│             Envs │ DISPLAY=:0                                    │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                 │
│                  │ QT_X11_NO_MITSHM=1                            │
│          Volumes │ (RO)                                          │
│                  │ /opt/Exegol/exegol/utils/imgsync/spawn.sh ➡   │
│                  │ /.exegol/spawn.sh                             │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix          │
│                  │ (RO) /etc/localtime ➡ /etc/localtime          │
│                  │ (RW) /root/.exegol/my-resources ➡             │
│                  │ /opt/my-resources                             │
│                  │ (RW) /opt/Exegol/exegol-resources ➡           │
│                  │ /opt/resources                                │
└──────────────────┴───────────────────────────────────────────────┘

[*] Creating new exegol container                                   
[V] Updating the permissions of                                     
/root/.exegol/workspaces/newContainer (and sub-folders) to allow    
file sharing between the container and the host user                
[D] Adding setgid permission recursively on directories from        
/root/.exegol/workspaces/newContainer                               
[D] newContainer - light                                            
Privileged: False                                                   
Capabilities: []                                                    
Sysctls: {}                                                         
X: True                                                             
TTY: True                                                           
Network host: host                                                  
Ports: {}                                                           
Share timezone: True                                                
Common resources: True                                              
Envs (3): {'DISPLAY': ':0', '_JAVA_AWT_WM_NONREPARENTING': '1',     
'QT_X11_NO_MITSHM': '1'}                                            
Labels (0): {}                                                      
Shares (6): [{'Target': '/.exegol/spawn.sh', 'Source':              
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Type': 'bind',        
'ReadOnly': True}, {'Target': '/tmp/.X11-unix', 'Source':           
'/tmp/.X11-unix', 'Type': 'bind', 'ReadOnly': False}, {'Target':    
'/etc/localtime', 'Source': '/etc/localtime', 'Type': 'bind',       
'ReadOnly': True}, {'Target': '/opt/my-resources', 'Source':        
'/root/.exegol/my-resources', 'Type': 'bind', 'ReadOnly': False},   
{'Target': '/opt/resources', 'Source':                              
'/opt/Exegol/exegol-resources', 'Type': 'bind', 'ReadOnly': False}, 
{'Target': '/workspace', 'Source':                                  
'/root/.exegol/workspaces/newContainer', 'Type': 'bind', 'ReadOnly':
False}]                                                             
Devices (0): []                                                     
VPN: N/A                                                            
[D] Entrypoint: ['/bin/bash', '/.exegol/entrypoint.sh']             
[D] Cmd: ['load_setups', 'endless']                                 
[+] Exegol container successfully created !                         
[D] Loading container: exegol-newContainer                          
[D] └── Parsing envs : DISPLAY=:0                                   
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                           
[D] └── Parsing envs : EXEGOL_RANDOMIZE_SERVICE_PORTS=true          
[D] └── Parsing envs :                                              
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin   
[D] └── Parsing label : org.exegol.app                              
[D] └── Parsing label : org.exegol.build_date                       
[D] └── Parsing label : org.exegol.metadata.creation_date           
[D] └── Parsing label : org.exegol.metadata.passwd                  
[D] └── Parsing label : org.exegol.src_repository                   
[D] └── Parsing label : org.exegol.tag                              
[D] └── Parsing label : org.exegol.version                          
[D] └── Capabilities : []                                           
[D] └── Load devices : []                                           
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/workspaces/newContainer', 'Destination':             
'/workspace', 'Mode': '', 'RW': True, 'Propagation': 'rprivate'}    
[D] └── Loading workspace volume source :                           
/root/.exegol/workspaces/newContainer                               
[D] └── Private workspace detected                                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Destination':         
'/.exegol/spawn.sh', 'Mode': '', 'RW': False, 'Propagation':        
'rprivate'}                                                         
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/tmp/.X11-unix',
'Destination': '/tmp/.X11-unix', 'Mode': '', 'RW': True,            
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/localtime',
'Destination': '/etc/localtime', 'Mode': '', 'RW': False,           
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/my-resources', 'Destination': '/opt/my-resources',   
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol-resources', 'Destination': '/opt/resources',    
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] Adding xhost ACL to local:exegol-newContainer                   
Authorization required, but no authorization protocol specified
xhost:  unable to open display ":0"
[D] Entrypoint script path:                                         
/opt/Exegol/exegol/utils/imgsync/entrypoint.sh                      
[V] Starting exegol                                                 
[V] Installing my-resources custom setup ...                        
[V] Compressing my-resources logs                                   
[V] My-resources loaded                                             
[D] Updating the root password inside the container                 
[*] Location of the exegol workspace on the host :                  
/root/.exegol/workspaces/newContainer                               
[+] Opening shell in Exegol 'newContainer'                          
[D] Opening shell with: docker exec -e EXEGOL_START_SHELL=zsh -ti   
94e9a1a61ffe5dae6270[?] Select an image by its name (light): light
[V] Config: Enabling display sharing                                
[V] Config: Enabling host timezones                                 
[V] File /etc/timezone is missing on host, cannot create volume for 
this.                                                               
[V] Volume was successfully added for /etc/localtime                
[V] Config: Enabling my-resources volume                            
[V] Updating the permissions of /root/.exegol/my-resources (and     
sub-folders) to allow file sharing between the container and the    
host user                                                           
[D] Adding setgid permission recursively on directories from        
/root/.exegol/my-resources                                          
[D] Git submodule repository detected                               
[D] Loading git at /opt/Exegol/exegol-resources                     
[D] Repo path: /opt/Exegol/.git/modules/exegol-resources            
[D] Git repository successfully loaded                              
[V] Config: Enabling exegol resources volume                        

⭐ Container summary                                                
┌──────────────────┬───────────────────────────────────────────────┐
│             Name │ newContainer                                  │
│            Image │ light - v.3.1.3 (Up to date) (arm64)          │
├──────────────────┼───────────────────────────────────────────────┤
│      Credentials │ root : PJlDHhyv6YmD4RFt5AUOR6xuAZnsH2         │
│   Remote Desktop │ Off 🪓                                        │
│      Console GUI │ On ✔ (X11)                                    │
│          Network │ host                                          │
│         Timezone │ On ✔                                          │
│ Exegol resources │ On ✔ (/opt/resources)                         │
│     My resources │ On ✔ (/opt/my-resources)                      │
│    Shell logging │ Off 🪓                                        │
│       Privileged │ Off ✔                                         │
│        Workspace │ Dedicated (/workspace)                        │
│             Envs │ DISPLAY=:0                                    │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                 │
│                  │ QT_X11_NO_MITSHM=1                            │
│          Volumes │ (RO)                                          │
│                  │ /opt/Exegol/exegol/utils/imgsync/spawn.sh ➡   │
│                  │ /.exegol/spawn.sh                             │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix          │
│                  │ (RO) /etc/localtime ➡ /etc/localtime          │
│                  │ (RW) /root/.exegol/my-resources ➡             │
│                  │ /opt/my-resources                             │
│                  │ (RW) /opt/Exegol/exegol-resources ➡           │
│                  │ /opt/resources                                │
└──────────────────┴───────────────────────────────────────────────┘

[*] Creating new exegol container                                   
[V] Updating the permissions of                                     
/root/.exegol/workspaces/newContainer (and sub-folders) to allow    
file sharing between the container and the host user                
[D] Adding setgid permission recursively on directories from        
/root/.exegol/workspaces/newContainer                               
[D] newContainer - light                                            
Privileged: False                                                   
Capabilities: []                                                    
Sysctls: {}                                                         
X: True                                                             
TTY: True                                                           
Network host: host                                                  
Ports: {}                                                           
Share timezone: True                                                
Common resources: True                                              
Envs (3): {'DISPLAY': ':0', '_JAVA_AWT_WM_NONREPARENTING': '1',     
'QT_X11_NO_MITSHM': '1'}                                            
Labels (0): {}                                                      
Shares (6): [{'Target': '/.exegol/spawn.sh', 'Source':              
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Type': 'bind',        
'ReadOnly': True}, {'Target': '/tmp/.X11-unix', 'Source':           
'/tmp/.X11-unix', 'Type': 'bind', 'ReadOnly': False}, {'Target':    
'/etc/localtime', 'Source': '/etc/localtime', 'Type': 'bind',       
'ReadOnly': True}, {'Target': '/opt/my-resources', 'Source':        
'/root/.exegol/my-resources', 'Type': 'bind', 'ReadOnly': False},   
{'Target': '/opt/resources', 'Source':                              
'/opt/Exegol/exegol-resources', 'Type': 'bind', 'ReadOnly': False}, 
{'Target': '/workspace', 'Source':                                  
'/root/.exegol/workspaces/newContainer', 'Type': 'bind', 'ReadOnly':
False}]                                                             
Devices (0): []                                                     
VPN: N/A                                                            
[D] Entrypoint: ['/bin/bash', '/.exegol/entrypoint.sh']             
[D] Cmd: ['load_setups', 'endless']                                 
[+] Exegol container successfully created !                         
[D] Loading container: exegol-newContainer                          
[D] └── Parsing envs : DISPLAY=:0                                   
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                           
[D] └── Parsing envs : EXEGOL_RANDOMIZE_SERVICE_PORTS=true          
[D] └── Parsing envs :                                              
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin   
[D] └── Parsing label : org.exegol.app                              
[D] └── Parsing label : org.exegol.build_date                       
[D] └── Parsing label : org.exegol.metadata.creation_date           
[D] └── Parsing label : org.exegol.metadata.passwd                  
[D] └── Parsing label : org.exegol.src_repository                   
[D] └── Parsing label : org.exegol.tag                              
[D] └── Parsing label : org.exegol.version                          
[D] └── Capabilities : []                                           
[D] └── Load devices : []                                           
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/workspaces/newContainer', 'Destination':             
'/workspace', 'Mode': '', 'RW': True, 'Propagation': 'rprivate'}    
[D] └── Loading workspace volume source :                           
/root/.exegol/workspaces/newContainer                               
[D] └── Private workspace detected                                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Destination':         
'/.exegol/spawn.sh', 'Mode': '', 'RW': False, 'Propagation':        
'rprivate'}                                                         
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/tmp/.X11-unix',
'Destination': '/tmp/.X11-unix', 'Mode': '', 'RW': True,            
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/localtime',
'Destination': '/etc/localtime', 'Mode': '', 'RW': False,           
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/my-resources', 'Destination': '/opt/my-resources',   
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol-resources', 'Destination': '/opt/resources',    
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] Adding xhost ACL to local:exegol-newContainer                   
Authorization required, but no authorization protocol specified
xhost:  unable to open display ":0"
[D] Entrypoint script path:                                         
/opt/Exegol/exegol/utils/imgsync/entrypoint.sh                      
[V] Starting exegol                                                 
[V] Installing my-resources custom setup ...                        
[V] Compressing my-resources logs                                   
[V] My-resources loaded                                             
[D] Updating the root password inside the container                 
[*] Location of the exegol workspace on the host :                  
/root/.exegol/workspaces/newContainer                               
[+] Opening shell in Exegol 'newContainer'                          
[D] Opening shell with: docker exec -e EXEGOL_START_SHELL=zsh -ti   
94e9a1a61ffe5dae62706a12a50bf9dc20bb4ce99b329d4edb1b13366d3ce5d56a12a5x329d4edb1bv13366d3ce5d5    
/.exegol/spawn.sh                                                   
[Apr 22, 2024 - 19:39:18 (CEST)] exegol-newContainer /workspace #

@Dramelac
Copy link
Member

Ok i think i know. Because you use sudo to run exegol, wayland env var are missing.
Try to create a new container with sudo -E exegol start newcontainer light and wayland should work.

@WBP20
Copy link
Author

WBP20 commented Apr 23, 2024

Hi @Dramelac, I still have the error message, even through wayland env variables seem be forwared.

[?] Select an image by its name (light): light
[V] Config: Enabling display sharing                                
[V] Config: Enabling host timezones                                 
[V] File /etc/timezone is missing on host, cannot create volume for 
this.                                                               
[V] Volume was successfully added for /etc/localtime                
[V] Config: Enabling my-resources volume                            
[V] Updating the permissions of /root/.exegol/my-resources (and     
sub-folders) to allow file sharing between the container and the    
host user                                                           
[D] Adding setgid permission recursively on directories from        
/root/.exegol/my-resources                                          
[D] Git submodule repository detected                               
[D] Loading git at /opt/Exegol/exegol-resources                     
[D] Repo path: /opt/Exegol/.git/modules/exegol-resources            
[D] Git repository successfully loaded                              
[V] Config: Enabling exegol resources volume                        

⭐ Container summary                                                
┌──────────────────┬───────────────────────────────────────────────┐
│             Name │ newcontainer                                  │
│            Image │ light - v.3.1.3 (Up to date) (arm64)          │
├──────────────────┼───────────────────────────────────────────────┤
│      Credentials │ root : sdsdsdsdsddsdsddssdssdsdsdddsdds        │
│   Remote Desktop │ Off 🪓                                        │
│      Console GUI │ On ✔ (X11 + Wayland)                          │
│          Network │ host                                          │
│         Timezone │ On ✔                                          │
│ Exegol resources │ On ✔ (/opt/resources)                         │
│     My resources │ On ✔ (/opt/my-resources)                      │
│    Shell logging │ Off 🪓                                        │
│       Privileged │ Off ✔                                         │
│        Workspace │ Dedicated (/workspace)                        │
│             Envs │ DISPLAY=:0                                    │
│                  │ XDG_SESSION_TYPE=wayland                      │
│                  │ XDG_RUNTIME_DIR=/tmp                          │
│                  │ WAYLAND_DISPLAY=wayland-1                     │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                 │
│                  │ QT_X11_NO_MITSHM=1                            │
│          Volumes │ (RO)                                          │
│                  │ /opt/Exegol/exegol/utils/imgsync/spawn.sh ➡   │
│                  │ /.exegol/spawn.sh                             │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix          │
│                  │ (RW) /run/user/1000/wayland-1 ➡               │
│                  │ /tmp/wayland-1                                │
│                  │ (RO) /etc/localtime ➡ /etc/localtime          │
│                  │ (RW) /root/.exegol/my-resources ➡             │
│                  │ /opt/my-resources                             │
│                  │ (RW) /opt/Exegol/exegol-resources ➡           │
│                  │ /opt/resources                                │
└──────────────────┴───────────────────────────────────────────────┘

[*] Creating new exegol container                                   
[V] Updating the permissions of                                     
/root/.exegol/workspaces/newcontainer (and sub-folders) to allow    
file sharing between the container and the host user                
[D] Adding setgid permission recursively on directories from        
/root/.exegol/workspaces/newcontainer                               
[D] newcontainer - light                                            
Privileged: False                                                   
Capabilities: []                                                    
Sysctls: {}                                                         
X: True                                                             
TTY: True                                                           
Network host: host                                                  
Ports: {}                                                           
Share timezone: True                                                
Common resources: True                                              
Envs (6): {'DISPLAY': ':0', 'XDG_SESSION_TYPE': 'wayland',          
'XDG_RUNTIME_DIR': '/tmp', 'WAYLAND_DISPLAY': 'wayland-1',          
'_JAVA_AWT_WM_NONREPARENTING': '1', 'QT_X11_NO_MITSHM': '1'}        
Labels (0): {}                                                      
Shares (7): [{'Target': '/.exegol/spawn.sh', 'Source':              
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Type': 'bind',        
'ReadOnly': True}, {'Target': '/tmp/.X11-unix', 'Source':           
'/tmp/.X11-unix', 'Type': 'bind', 'ReadOnly': False}, {'Target':    
'/tmp/wayland-1', 'Source': '/run/user/1000/wayland-1', 'Type':     
'bind', 'ReadOnly': False}, {'Target': '/etc/localtime', 'Source':  
'/etc/localtime', 'Type': 'bind', 'ReadOnly': True}, {'Target':     
'/opt/my-resources', 'Source': '/root/.exegol/my-resources', 'Type':
'bind', 'ReadOnly': False}, {'Target': '/opt/resources', 'Source':  
'/opt/Exegol/exegol-resources', 'Type': 'bind', 'ReadOnly': False}, 
{'Target': '/workspace', 'Source':                                  
'/root/.exegol/workspaces/newcontainer', 'Type': 'bind', 'ReadOnly':
False}]                                                             
Devices (0): []                                                     
VPN: N/A                                                            
[D] Entrypoint: ['/bin/bash', '/.exegol/entrypoint.sh']             
[D] Cmd: ['load_setups', 'endless']                                 
[+] Exegol container successfully created !                         
[D] Loading container: exegol-newcontainer                          
[D] └── Parsing envs : DISPLAY=:0                                   
[D] └── Parsing envs : XDG_SESSION_TYPE=wayland                     
[D] └── Parsing envs : XDG_RUNTIME_DIR=/tmp                         
[D] └── Parsing envs : WAYLAND_DISPLAY=wayland-1                    
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                           
[D] └── Parsing envs : EXEGOL_RANDOMIZE_SERVICE_PORTS=true          
[D] └── Parsing envs :                                              
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin   
[D] └── Parsing label : org.exegol.app                              
[D] └── Parsing label : org.exegol.build_date                       
[D] └── Parsing label : org.exegol.metadata.creation_date           
[D] └── Parsing label : org.exegol.metadata.passwd                  
[D] └── Parsing label : org.exegol.src_repository                   
[D] └── Parsing label : org.exegol.tag                              
[D] └── Parsing label : org.exegol.version                          
[D] └── Capabilities : []                                           
[D] └── Load devices : []                                           
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/tmp/.X11-unix',
'Destination': '/tmp/.X11-unix', 'Mode': '', 'RW': True,            
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/run/user/1000/wayland-1', 'Destination': '/tmp/wayland-1', 'Mode':
'', 'RW': True, 'Propagation': 'rprivate'}                          
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/localtime',
'Destination': '/etc/localtime', 'Mode': '', 'RW': False,           
'Propagation': 'rprivate'}                                          
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/my-resources', 'Destination': '/opt/my-resources',   
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol-resources', 'Destination': '/opt/resources',    
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/root/.exegol/workspaces/newcontainer', 'Destination':             
'/workspace', 'Mode': '', 'RW': True, 'Propagation': 'rprivate'}    
[D] └── Loading workspace volume source :                           
/root/.exegol/workspaces/newcontainer                               
[D] └── Private workspace detected                                  
[D] └── Parsing mount : {'Type': 'bind', 'Source':                  
'/opt/Exegol/exegol/utils/imgsync/spawn.sh', 'Destination':         
'/.exegol/spawn.sh', 'Mode': '', 'RW': False, 'Propagation':        
'rprivate'}                                                         
[D] Adding xhost ACL to local:exegol-newcontainer                   
Authorization required, but no authorization protocol specified
xhost:  unable to open display ":0"
[D] Entrypoint script path:                                         
/opt/Exegol/exegol/utils/imgsync/entrypoint.sh                      
[V] Starting exegol                                                 
[V] Installing my-resources custom setup ...                        
[V] Compressing my-resources logs                                   
[V] My-resources loaded                                             
[D] Updating the root password inside the container                 
[*] Location of the exegol workspace on the host :                  
/root/.exegol/workspaces/newcontainer                               
[+] Opening shell in Exegol 'newcontainer'                          
[D] Opening shell with: docker exec -e EXEGOL_START_SHELL=zsh -ti   
1266b4538f6f8b304fd40ec36be28efd3b4a6b7fbfdc82b4b806da83a2e68876    
/.exegol/spawn.sh

Following #126 I can manage to open firefox, but through x11 and with error message

[Apr 23, 2024 - 19:31:50 (CEST)] exegol-newcontainer /workspace # firefox                                                        
Authorization required, but no authorization protocol specified

Error: cannot open display: :0

[Apr 23, 2024 - 19:32:30 (CEST)] exegol-newcontainer /workspace # useradd -o -m -u 1000 john
[Apr 23, 2024 - 19:35:02 (CEST)] exegol-newcontainer /workspace # su john     
$ firefox
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: MESA-LOADER: failed to open asahi: /usr/lib/dri/asahi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: asahi
$ exit

@WBP20
Copy link
Author

WBP20 commented May 1, 2024

The issue has been solved after allowing docker/exegol to be executed with user (without sudo).

@WBP20 WBP20 closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants