Open Any file with specific Program?Any way to (easily) upgrade Python in Ubuntu?install python2.7.3 + numpy...

What historical events would have to change in order to make 19th century "steampunk" technology possible?

How dangerous is XSS

Processor speed limited at 0.4 Ghz

Is it a bad idea to plug the other end of ESD strap to wall ground?

Do creatures with a listed speed of "0 ft., fly 30 ft. (hover)" ever touch the ground?

What is a Samsaran Word™?

ssTTsSTtRrriinInnnnNNNIiinngg

How obscure is the use of 令 in 令和?

How does a dynamic QR code work?

Different meanings of こわい

Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?

How to find if SQL server backup is encrypted with TDE without restoring the backup

What is required to make GPS signals available indoors?

Why is the sentence "Das ist eine Nase" correct?

What do you call someone who asks many questions?

Am I breaking OOP practice with this architecture?

Does int main() need a declaration on C++?

What is the fastest integer factorization to break RSA?

files created then deleted at every second in tmp directory

Could the museum Saturn V's be refitted for one more flight?

Does Dispel Magic work on Tiny Hut?

How can saying a song's name be a copyright violation?

Bullying boss launched a smear campaign and made me unemployable

Can I hook these wires up to find the connection to a dead outlet?



Open Any file with specific Program?


Any way to (easily) upgrade Python in Ubuntu?install python2.7.3 + numpy + scipy + matplotlib + scikits.statsmodels + pandas0.7.3 correctlyWhy is Upstart not starting uWSGI?Custom .desktop file not showing in Nautilus “Open With” menugcc --as-needed linker flag not workingDolphin/Konqueror wrong file type recognitionFirefox tries to open application/octet-stream with geditOpen a file with a bash script from gnomespecific program runs slowlyOpen with Idle not working on python program I have created













0















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".



Here other example who i want:



xdg-mime default "app-chooser.py" */*


or



xdg-mime default "app-chooser.py" all/all








share







New contributor




vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    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".



    Here other example who i want:



    xdg-mime default "app-chooser.py" */*


    or



    xdg-mime default "app-chooser.py" all/all








    share







    New contributor




    vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      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".



      Here other example who i want:



      xdg-mime default "app-chooser.py" */*


      or



      xdg-mime default "app-chooser.py" all/all








      share







      New contributor




      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      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".



      Here other example who i want:



      xdg-mime default "app-chooser.py" */*


      or



      xdg-mime default "app-chooser.py" all/all






      linux python gnome wildcards mime-types





      share







      New contributor




      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 8 mins ago









      vudaluzusavudaluzusa

      1




      1




      New contributor




      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      vudaluzusa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          vudaluzusa is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420717%2fopen-any-file-with-specific-program%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          vudaluzusa is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          vudaluzusa is a new contributor. Be nice, and check out our Code of Conduct.













          vudaluzusa is a new contributor. Be nice, and check out our Code of Conduct.












          vudaluzusa is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420717%2fopen-any-file-with-specific-program%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...