You are not logged in.
Pages: 1
Topic closed
Fellow MC Users (not sure how many of you are out there if any!),
When I launch a file to view within Midnight Commander, the panels are hidden and the terminal is hogged until I break the process with Ctrl-C or close the launched application. Is there a way to have MC release the launched app outside the terminal so that it stays useable while the file is being viewed? Hope this question is sensible.
I know you can launch any terminal command as a background process by appending &. Just wondering if there's a way to launch files like this by default in MC.
Thanks in advance for any help!
Last edited by aleksozolins (2018-10-29 04:15:04)
Offline
man page of mc has lots of info, the section "screen selector" may interest you.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Please read the relevant page on the wiki.
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Thanks for the help. I've made the script and exported and that seems to work with some file types, however I'm having some trouble with preferred apps now. For instance, if I select a PDF I'm presented with "/usr/lib/mc/ext.d/doc.sh: xpdf: line 106: xpdf: command not found".
xdg-open opens PDFs in evince just fine.
If I modift the doc.sh file and change the entry in line 107 from "acroread" to "evince", I'm still presented the same error.
Is there a way to just do away with MC_XDG_OPEN and just default to xdg-open?
Thanks again for the help.
Offline
Did you use the exact nohup-open script in the wiki? That still uses xdg open.
What happens if you run `nohup xdg-open /path/to/a_document.pdf &` on the command line?
Last edited by Trilby (2018-10-29 14:50:55)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Running that from the command line works perfectly.
Confused now. I don't believe I changed a thing except for quitting and restarting MC. MC is back to using XDG-Open properly, but the Terminal instance is being held again. I used the same exact script as in the wiki in my ~/bin directory. I ran the export command from the terminal. I'm sure I'm missing something obvious.
Offline
The xdg-open call in doc.sh (please do not edit the file, changes will be overridden) blocks (probably for a reason) and do_open_action is not called, because there's xdg-open.
You could probably export MC_XDG_OPEN to some wrapper script that calls
xdg-open "$@" &
to for it
Offline
add & to the end of a line starting with Open= for the type you need
the example below worked successfully for me when opening MS documents:
edit the file ~/.config/mc/mc.ext.ini
# Microsoft Word Document
[msdoc-by-shell]
Regex=\\.(do[ct]|wri|docx)$
RegexIgnoreCase=true
Open=/usr/lib/mc/ext.d/doc.sh open msdoc &
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc
ps: sorry for necrobumping
Offline
Closed to prevent further necro bumping.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Pages: 1
Topic closed