Added script to run .desktop files from the command line
This commit is contained in:
		
							parent
							
								
									9dbea6d960
								
							
						
					
					
						commit
						d2909453a8
					
				
							
								
								
									
										12
									
								
								run-desktop.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								run-desktop.py
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,12 @@ | ||||
| #!/usr/bin/python | ||||
| # | ||||
| # http://askubuntu.com/questions/5172/running-a-desktop-file-in-the-terminal#5174 | ||||
| from gi.repository import Gio | ||||
| import sys  | ||||
| 
 | ||||
| def main(myname, desktop, *uris): | ||||
| 	launcher = Gio.DesktopAppInfo.new_from_filename(desktop) | ||||
| 	launcher.launch_uris(uris, None) | ||||
| 
 | ||||
| if __name__ == "__main__": | ||||
| 	main(*sys.argv) | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user