1
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

This is the server version.

When I ssh into it, I encounter the following problems:

Problem 1

tab completion behaves weird to the point of being unusable:

> cd ~/<press TAB>
-sh: <( compgen -d -- '/home/dmitriid/' ): No such file or directory

> vi ~/.<press TAB>
<( compgen -d -- '/home/dmitriid/.' ): No such file or directory
-sh: <( eval compgen -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|
JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' -- 
$(quote_readline $cur) ): No such file or directory

> nano ~/.<press TAB>
./              .bash_logout    .mc/            .viminfo
../             .bashrc         .mysql_history  
.aptitude/      .erlang.cookie  .profile        
.bash_history   .gitconfig      .ssh/

Is there a way to fix that?

Problem 2

I use mc quite a lot. I often do a Ctrl+O to hide panels and work in the shell. In my case:

  1. Ctrl + O hides panels
  2. Any keypress brings the panels back

Is there a way to fix that as well?

Thank you!

Kevin Montrose
  • 22,191
  • 9
  • 88
  • 137
Mamut
  • 1,040
  • 2
  • 12
  • 23
  • This isn't really a question for stackoverflow. You should try the Ubuntu forum. –  Jul 29 '09 at 12:50
  • I did. It's silent :) StackOveflow is usually much more helpful than any other forum out there :) – Mamut Jul 29 '09 at 13:10
  • Unix shells are complements to text editors and together are the equivalent of an IDE. I don't see many objections to Visual Studio or Eclipse configuration questions. – guns Aug 01 '09 at 20:47

4 Answers4

4

Ok. It turns out the solution was dumb and simple. The key was — no interactive shell in mc.

The answer lies here: http://www.ibiblio.org/mc/FAQ

6.6 When I use Ctrl-O I don't get a subshell. How do I fix this?

Only bash, tcsh and zsh can be used as subshell. Use one of those shells as your default shell, and it will be used as subshell in GNU Midnight Commander.

So I decided to change the shell:

> which bash
/bin/bash
> sudo chsh -s /bin/bash my_user_name
> grep ^my_user_name /etc/password
my_user_name:x:1002:1002::/home/my_user_name:/bin/bash

Note /bin/bash at the end of the passwd file. It means the shell is now changed.

After i logged out and then logged back in — voila, everything works!

Mamut
  • 1,040
  • 2
  • 12
  • 23
1

I'd try to reinstall all bash packages, especially bash-completion: apt-get install --reinstall bash-completion, because it looks like some part of bash is screwed. Btw, I guess this should go to serverfault.com.

liori
  • 40,917
  • 13
  • 78
  • 105
1

When I typed the following to switch to root, then it seemed that the permissions problem was resolved. Looks like compgen isn't able to read the directories it needs to when I'm logged in as an regular user.

sudo su -
sth
  • 222,467
  • 53
  • 283
  • 367
0

"6.6 When I use Ctrl-O I don't get a subshell. How do I fix this?"

To use Ctr+o you should have SHELL=/bin/bash and not SHELL=/bin/sh Add to .bashrc export SHELL=/bin/bash

Attila
  • 1