 dca5265958
			
		
	
	
		dca5265958
		
			
		
	
	
	
	
		
			
			xdg-open is more robust in choosing default application for particular file type: it supports fallback if the preferred application isn't working, and most importantly it support system-wide defaults (/usr/share/applications/defaults.list, /usr/share/applications/mimeapps.list), so no "random" application is chosen. By default xdg-open tries to use environment-specific tool, like gvfs-open - which isn't good for us, because many such tools do not wait for editor/viewer termination. That would mean that DisposableVM would be destroyed just after opening the file. To avoid such effect, we set DE=generic. Fixes QubesOS/qubes-issues#1621
		
			
				
	
	
		
			12 baris
		
	
	
		
			314 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			12 baris
		
	
	
		
			314 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| if [ -r /etc/profile.d/qubes-session.sh ]; then
 | |
|     . /etc/profile.d/qubes-session.sh
 | |
| fi
 | |
| 
 | |
| # gvfs-open, kde-open, and possibly others don't wait for editor to be
 | |
| # closed, which is critical behaviour for DisposableVM (which gets destroyed
 | |
| # after this process exits)
 | |
| export DE=generic
 | |
| exec xdg-open "$@"
 |