I want to set default a specific program for open ANY files absolutely ANY(*.*), any extension, any mime type. ABSOLUTELY ALL
I build a python program to automated choose the program for any file. the app-chooser.py content:
#!/usr/bin/python
import sys, os, os.path
filename = sys.argv[1];
extension = os.path.splitext(filename)[1];
if extension == "txt":
os.system("gedit " + filename);
if extension == "mp4":
os.system("vlc " + filename);
if extension == "html":
os.system("opera " + filename);
if extension == ".py":
os.system("python " + filename);
if extension == ".sh":
os.system("bash " + filename);
if extension == ".exe":
os.system("wine " + filename);
exit()
The app-chooser.py are compiled in a standalone linux executable, located in "/usr/bin/app-chooser".