3

As the question itself says: I would like to know if there is a way to create a script or direct command line to run midnight commander mc and request the program to open an ftp connection on -let's say- the right panel?

Something like:

mc --open-ftp user@ftp.server.com:password --right-panel

Or something like that.

I have seen this tutorial and it works indeed: Save Connection Settings in Midnight Commander, but this allow me to have a bookmark list of my sites, which I must invoke just after running midnight commander.

Any ideas?

Geppettvs D'Constanzo
  • 19,364
  • 7
  • 51
  • 106
  • When I `cd` to a server from MC, it opens a ftp connection in the selected panel, for example `cd /ftp://ftp.midnight-commander.org`. However, I couldn't figure out how to make it start it on launch (adding the command to `~/.local/share/mc/bashrc` did not work, it was simply ignored). I think the best you'll be able to do is to make a user menu entry for it and then be 2 key-press from the ftp instead of 0. :( – Quasímodo Mar 20 '20 at 11:20

1 Answers1

2

You can:

mc leftpanel [ rightpanel ]

left panel:

xfce4-terminal -x mc   ftp://user:password@example.com

right panel:

xfce4-terminal -x mc . ftp://user:password@example.com
Pizza
  • 1,388
  • 3
  • 15
  • 27
  • Puff.... The real thing. Thank you very much. Tried this on Ubuntu 20.04 and works like a charm. Just need to make sure the username is the right one. Certain shared hosting service providers requires to use the user@domain.ext format for the username. I really appreciate a lot your time. – Geppettvs D'Constanzo Mar 11 '21 at 22:14