0

I recently started using Midnight Commander on my Windows 10 system, but I can't seem to get it to handle images or pdf files properly. When I select the file and press Enter, nothing happens. I've tried altering the extension file to the following.

default/*
    Open=(%f)

After making that change, I get this error.

C:/Users/MyUser/AppData/Local/Temp/mc-MyUser/mcext2509Z1: line 13: C:/Test.txt: Permission denied

I am using the Powershell v7.3.2 in Windows Terminal v1.15.3465.0 on Windows 10 v.19044.2486

Olaf
  • 4,690
  • 2
  • 15
  • 23
tayopi
  • 295
  • 5
  • 15

1 Answers1

0

Try

default/*
    Open=start %f

Try start C:\Test.txt from the cmd command line to test.

See https://superuser.com/q/550138. Try

start "" %f

For Powershell try

Start-Process %f
phd
  • 82,685
  • 13
  • 120
  • 165
  • When trying either of those methods I get the following error: /bin/sh C:/Users/myUser/AppData/Local/Temp/mc-myUser/mcextI179Z1 C:/Users/myUser/AppData/Local/Temp/mc-myUser/mcextI179Z1: line 13: start: not found – tayopi Feb 06 '23 at 23:44
  • `/bin/sh`?!!! Is it WSL or git-bash? For WSL use `wslview`; see https://superuser.com/a/1600972 . Found in https://www.google.com/search?hl=en&pws=0&q=wsl+open+file+with+default+application – phd Feb 07 '23 at 00:07
  • And of course there is always `cmd /c "start %f"` or `cmd /k "start %f"` – phd Feb 07 '23 at 00:14
  • `cmd /c %f` did the trick. I think you're on to something with `/bin/sh`. It looks like when you launch `mc` in a Powershell window, it's running in a virtual console. – tayopi Feb 07 '23 at 05:07