wine - how to setup Total Commander to launch correct (default) application for selected file

HANAX
  13 years ago
  5

Despite the efforts of many Linux developers I didn't find any good replacement for my favorite file manager - Total Commander. It's very personal opinion, but if you feel the same you may also have same problem using TC on Linux - running associated app after hitting ENTER (double click)

I tried several approaches. First - associations in registry. But it was virtually impossible to associate every single file extension with correct application. So I used some tool called wine wrapper - it takes file with extensions in categories and associated application and creates reg file. But the problem remains - every new extension must be registered.

Then I find very easy way. With help of xdg-open utility you can inherit associations from Linux. So instead of annoying registry editing, you have to do two things:

  1. Create script run_prog in C:\ with this content:
       #!/bin/sh 
    /usr/bin/xdg-open "`wine winepath -u "$1"`"
    
    Make that script executable (open terminal in drive C):
       hanax@Wadjet ~/.wine/drive_c $ chmod +x ./run_prog
    
  2. In Total Commander
    1. Menu item Files -> Internal Associations
    2. Click Add, then in File Type line enter *.*, click OK
    3. in Actions Open box enter C:\run_prog "%1"
    4. Click OK, OK
  3. Try it, it should work :)
Comments
guindous 11 years ago

Just my 2 cents: I have to rename the script "run_prog" to "run_prog.exe" because Total Commander doesn't detected the script as a valid executable program.

Anyway the best file association alternative so far!!