mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	add a display setting in the conf file
This commit is contained in:
		
							parent
							
								
									0af524e3e5
								
							
						
					
					
						commit
						194b303a54
					
				
					 1 changed files with 21 additions and 8 deletions
				
			
		
							
								
								
									
										29
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										29
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -1033,6 +1033,16 @@ function usage() { | |||
|   exit 1 | ||||
| } | ||||
| 
 | ||||
| function display_param_check() { | ||||
|   if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then | ||||
|     echo "ERROR! Requested output '${OUTPUT}' is not recognised." | ||||
|     exit 1 | ||||
|   elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then | ||||
|     echo "ERROR! Requested SPICE display, but 'spicy' is not installed." | ||||
|     exit 1 | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| # Lowercase variables are used in the VM config file only | ||||
| boot="efi" | ||||
| bridge="" | ||||
|  | @ -1056,7 +1066,7 @@ DELETE_DISK=0 | |||
| DELETE_VM=0 | ||||
| FULLSCREEN="" | ||||
| FULLSPICY="" | ||||
| OUTPUT="sdl" | ||||
| OUTPUT="" | ||||
| PUBLIC="" | ||||
| PUBLIC_PERMS="" | ||||
| PUBLIC_TAG="" | ||||
|  | @ -1121,13 +1131,7 @@ else | |||
|             shift;; | ||||
|           -display|--display) | ||||
|             OUTPUT="${2}" | ||||
|             if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then | ||||
|               echo "ERROR! Requested output '${OUTPUT}' is not recognised." | ||||
|               exit 1 | ||||
|             elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then | ||||
|               echo "ERROR! Requested SPICE display, but 'spicy' is not installed." | ||||
|               exit 1 | ||||
|             fi | ||||
|             display_param_check | ||||
|             shift | ||||
|             shift;; | ||||
|           -fullscreen|--fullscreen|-full-screen|--full-screen) | ||||
|  | @ -1199,6 +1203,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then | |||
|     disk_size="${disk}" | ||||
|   fi | ||||
| 
 | ||||
|   if [ -z "${OUTPUT}" ]; then | ||||
|     if [ -z "${display}" ]; then | ||||
|       OUTPUT="sdl" | ||||
|     else | ||||
|       OUTPUT="${display}" | ||||
|       display_param_check | ||||
|     fi | ||||
|   fi | ||||
| 
 | ||||
|   if [ "${tpm}" == "on" ]; then | ||||
|     SWTPM=$(command -v swtpm) | ||||
|     if [ ! -e "${SWTPM}" ]; then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue