Author Topic: LIghtweight file manager and text editor for remote server suggestions?[solved]  (Read 3812 times)

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
Re: LIghtweight file manager and text editor for remote server suggestions?
« Reply #15 on: March 20, 2011, 07:34:14 AM »
That only works for local files, not for files I am browsing using PCMan's built in GVFS.

It should work for files on servers that are mounted using gsshfs or gigolo.

Offline AndrzejL

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 12801
  • RLU #490933
    • Wordpress On The Wardrobe...
Re: LIghtweight file manager and text editor for remote server suggestions?
« Reply #16 on: March 20, 2011, 07:43:45 AM »
graemep

Either

Xfe

or

Midnight Commander  aka mc (ncurses based , has mcedit built in, does ftp and ssh connections) and combine it with screen (ask that other paranoid nut Andy about it....)

Jase

HAHAHAHA Jase You are killing me :D - indeedy! MC would be my choice. It looks like Norton Commander under the other OS. It has mcedit built in but it can work with external editors like nano or vi without a problem. It does ftp and ssh. It does file management including searching for files / content / copying / moving / deleting / renaming / creating directories / chowning and chmoding and LOADS of other things. It's easy to use. It's easy to learn. It can help You do complicated things in easy way.

Here is my little video tutorial about SSH with MC. I am sure I will make more videos like this one in the future explaining more features of MC.

Regards.

Andy
« Last Edit: March 28, 2013, 04:49:05 PM by AndrzejL »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LIghtweight file manager and text editor for remote server suggestions?
« Reply #17 on: March 20, 2011, 07:51:11 AM »
That only works for local files, not for files I am browsing using PCMan's built in GVFS.

It should work for files on servers that are mounted using gsshfs or gigolo.

In PCManFM, type the F4 to open the terminal. From the terminal, you can use vi or other editor.

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
Re: LIghtweight file manager and text editor for remote server suggestions?
« Reply #18 on: March 20, 2011, 10:24:10 AM »
Same problem Neal. If you are browsing a sftp:// location it just open the terminal in ~ If you open it with an application it opens as though the app did not get a file to open: so a text editor opens blank.

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
I marked the thread [solved] because there are solutions: multiple solutions! I am still trying to identify the best solution for  a text editor, but that is more a matter of getting the most productive config - which is well worth doing.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
You could try "le" editor, but I think we don't have it in the repos ? http://freshmeat.net/projects/leeditor

We don't have it in the repos. If you are interested, I just compiled it to give it a try, the latest : Fichier : - ftp://ftp.yars.free.net/pub/source/le/le-1.14.5.tar.bz2

It works fine. It's very much lighter than vim, that's an advantage. Then if you already use mc, it might be redundant, but I can't say really because I'm not used to le, and can't tell if it provides features that are not in mcedit. Maybe would you be willing to request a package for it ?


« Last Edit: March 20, 2011, 10:56:10 AM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LIghtweight file manager and text editor for remote server suggestions?
« Reply #21 on: March 20, 2011, 01:27:40 PM »
Same problem Neal. If you are browsing a sftp:// location it just open the terminal in ~ If you open it with an application it opens as though the app did not get a file to open: so a text editor opens blank.

Did you try the embedded editors, too? Vi? Less?

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
I am SO close to getting this does, but not quite.

vim (including gvim) will open a remote file if called with something like:

Code: [Select]
vim sftp://me@example.com/name.txt
PCMan sends some argument like this because if I right click a remote file and open in Firefox the location bar shows sftp://me@example.com/name.txt

but if I right click and open in gvim, it opens a new file.

If I try the custom command line:

Code: [Select]
gvim %u
or

Code: [Select]
vim %u
it opens a new file, even though that ought to execute:

Code: [Select]
gvim sftp://me@example.com/name.txt
which works fine in the console.

firefox %u makes firefox attempt to open the right URL (although it does not actually open it, the url appears in the location bar).

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
If you have the location open in PCManFM, you should be able to type the F4 key to open the terminal in that location. Once it is open, you should be able to open a file in that location with vim. Try:
Code: [Select]
vim /location/name.txt note: change "/location" to the actual address.
If that does not work, terminal should return output that will give a clue.

An alternative might be to discover what editor is installed at the remote location and see if you can call it via the terminal.

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
Neal, that still has the same problem: PCMan cannot open a terminal on a remote location.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
In PCManFM > Edit > Preferences > Advanced tab, what terminal do you have selected? Have you tried using a different terminal?

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
In PCManFM > Edit > Preferences > Advanced tab, what terminal do you have selected? Have you tried using a different terminal?


+1. If ever PCManFM happens to be able to do that, he must find a terminal that exists in the remote location. Otherwise you just need to open your local terminal out of PCManFM, connect to the remote location, and work on the remote location from within your local console (opened independantly of PCManFM).

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
In PCManFM > Edit > Preferences > Advanced tab, what terminal do you have selected? Have you tried using a different terminal?


+1. If ever PCManFM happens to be able to do that, he must find a terminal that exists in the remote location. Otherwise you just need to open your local terminal out of PCManFM, connect to the remote location, and work on the remote location from within your local console (opened independantly of PCManFM).

If he has PCManFM open in a remote location, opening a terminal in PCManFM should open the terminal in that location, shouldn't it?
However, this may depend on what is installed at the remote location, as you say.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
If he has PCManFM open in a remote location, opening a terminal in PCManFM should open the terminal in that location, shouldn't it?
However, this may depend on what is installed at the remote location, as you say.


I know that some programs allow getting control on a remote X session, but I have never done it, and I fancy he has a remote connection which may not be graphical on the remote site side. I may be mistaking, of course.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline graemep

  • Jr. Member
  • **
  • Posts: 42
    • Moneyterms
Success! I have got it working with an editor, although not exactly a lightweight one.

I have used remote X and X over ssh but on my LAN, but it will probably be sluggish to a server on the other side of the world. In any case I need to connect to multiple shared hosting web servers which do not have X installed.

I am pretty sure that PCMan does not issue a command for the remote server to open a terminal,it opens a terminal locally, possibly passing the path as an argument.

I think I have found why vim does not work. PCMan passes a url like this:

Code: [Select]
vim sftp://me@example.com/home/me/dir/test.txt
Which looks right to me, but vim wants:

Code: [Select]
vim sftp://me@example.com/dir/test.txt
I am going to try writing a wrapper script that sends what vim wants.

In the meantime this does mean it will work with Komodo Edit if supplied the right command line. I do need to re-enter my password, and Komodo is hardly light. On the other hand Komodo looks like a good editor (I am trying it out, and I will suggest the open source version in package suggest if it lives up to expectations).