Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8902 closed defect (wontfix)

Unable to browse router using Midnight Commander's 'shell link'

Reported by: miki@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:


How to reproduce:

  • Run Midnight Commander on a PC on network with a router running OpenWRT
  • In MC, open a 'shell link' to 'root@'

Expected behaviour:

  • Pane shows correct filenames
  • Be able to browse the filesystem

Observed behaviour:

  • Pane shows filenames with " appended (example: '/bin"')
  • Trying to change directory results in an error: "Cannot change directory".

Additional info:

  • Opening a Shell link to local PC works without problems.
  • From what I understand, Shell Link uses FISH protocol over SSH (which falls back to using plain shell commands when there's no FISH server available).

System info:

OpenWRT version: ATTITUDE ADJUSTMENT (bleeding edge, r25598)
Device: D-Link DIR-825
PC: running Ubuntu 10.10
Midnight Commander: Ubuntu package version 3:

Attachments (1)

badnames.png (248.2 KB) - added by miki@… 7 years ago.
Bad filenames in Midnight Commander Shell link to OpenWRT

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by miki@…

Bad filenames in Midnight Commander Shell link to OpenWRT

comment:1 Changed 7 years ago by jow

  • Resolution set to wontfix
  • Status changed from new to closed

The mc "fish" backend tries to parse remote directory listings which fails since the busybox ls output slightly differs compared to GNU ls. You can try to install coreutils-ls on the router and remove the /bin/ls symlink to busybox - I believe it will fix this issue. It is unlikely that we alter busybox to match the gnu ls format, however we're open to patch suggestions.

comment:2 Changed 7 years ago by miki@…

Thanks very much for the information.

I've tried installing coreutils-ls and removing the /bin/ls symlink to busybox and rebooted the router.
In a normal ssh session, 'ls -l' and '/usr/bin/ls -l' now give the same output, which differs visibly from 'busybox ls -l'. Sadly the problem with MC Shell link is still the same.

Could it be that 'busybox ls' is hardcoded somewhere?

comment:3 Changed 7 years ago by xeros@…

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I've got the same problem and it's not BusyBox fault.
The problem is with parsing 'ls -Qlan' output by Midnight Commander.
I've straced both Dropbear SSH server + BusyBox 1.18.4 on embedded machine and OpenSSH server + coreutils on PC.
The same behaviour on both systems when PERL is not available and MC fallbacks to 'ls -Qlan'.
The suffix appended to file/dir-names in MC listing is exactly '" ' (quotation mark + two spaces).
I've tested all the commands MC executes on remote host and all of them give proper output (without such strange names).

comment:4 Changed 7 years ago by xeros@…

By the way, outputs from 'LC_ALL=C ls -l /' and 'LC_ALL=C ls -Qlan /' on both systems are the same (excluding different files on both platforms).

comment:5 Changed 7 years ago by anonymous

Oh, really sorry... I was in hurry and haven't looked as it's OpenWRT, not Midnight Commander bug report page.

comment:6 Changed 7 years ago by nbd

  • Resolution set to wontfix
  • Status changed from reopened to closed

comment:7 Changed 7 years ago by xeros@…

I've tested that with MC everything works fine.

comment:8 Changed 4 years ago by lomsky

The solution is as follows. You need to change ~/.ssh/config. Add there lines like this:

Host openwrt (put here host name)
Port 22
User root
HostName (put here host ip)

next try mc->shell link->

should do the trick.

comment:9 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.