devcontainer: handle hosts without X11 (#29537)
	
		
	
				
					
				
			* Setup xauthority link on host in initializeCommand
* Create a dummy xauthority if it does no exist on host machine
* Remove xauthority line from ci test
old-commit-hash: 659795b1db
			
			
				beeps
			
			
		
							parent
							
								
									004a097c95
								
							
						
					
					
						commit
						3681c1d1b2
					
				
				 4 changed files with 20 additions and 4 deletions
			
			
		| @ -0,0 +1 @@ | ||||
| .Xauthority | ||||
| @ -0,0 +1,16 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # setup links to Xauthority | ||||
| XAUTHORITY_LINK=".devcontainer/.Xauthority" | ||||
| rm -f $XAUTHORITY_LINK | ||||
| if [[ -z $XAUTHORITY ]]; then | ||||
|     echo "XAUTHORITY not set. Fallback to ~/.Xauthority ..." | ||||
|     if ! [[ -f $HOME/.Xauthority ]]; then | ||||
|         echo "~/.XAuthority file does not exist. GUI tools may not work properly." | ||||
|         touch $XAUTHORITY_LINK # dummy file to satisfy container volume mount | ||||
|     else | ||||
|         ln -sf $HOME/.Xauthority $XAUTHORITY_LINK | ||||
|     fi | ||||
| else | ||||
|     ln -sf $XAUTHORITY $XAUTHORITY_LINK | ||||
| fi | ||||
					Loading…
					
					
				
		Reference in new issue