• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Vi anoyance in Ubuntu 9.04

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
I just tried vi from the 9.04 live CD here locally. Everything worked like vi to me. I use x to delete, i to insert, a to append, I even tried dd and a few others. Everything worked.
 
Originally posted by: sourceninja
I just tried vi from the 9.04 live CD here locally. Everything worked like vi to me. I use x to delete, i to insert, a to append, I even tried dd and a few others. Everything worked.

Odd, Mine was totally unusable. Like, the arrow keys did not even work unless I got out of insert mode and when in insert mode, I could not use backspace, and when I typed, the cursor did not move so it just typed letters on top of each other, though at random it did move.
 
RedSquirrel isn't alone.

I've got a Debian 4.1.x machine which for the longest time gave me the exact same symptoms he's talking about. I'd log in as a user and try to 'sudo' a gui command (like gedit) and would get an error saying it couldn't attach to the display or find the display, or something quite close to that. I wish I had recorded what I finally did to fix it, but RedSquirrel definitely isn't crazy.

I've also got an Ubuntu machine of a friend that I log into (Ubuntu 4.3.2) that frustrates me because many things don't work right from the remote terminal.

Up arrow (to scroll commands) prints ' ^[[A' to the screen.

Up arrow (to scroll commands) prints ' ^[[B' to the screen.

Tabbing for completion just moves the cursor over like a tab would work in a word processor.

I've tried changing the terminal type to several different types, and nothing seems to make a difference.

VERY FRUSTRATING

Joe

 
Ubuntu doesn't have a 4.3.2 version 😉

Which shell is that machine using? Is the machine booting up in single user mode? What about the boot crashing and it dumping you to busybox (which has the same 'features' you describe).?
 
Ok, maybe it's the version of gcc?

$ less /proc/version
Linux version 2.6.27-11-server (buildd@rothera) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #1 SMP Thu Jan 29 20:19:41 UTC 2009

$ less /proc/version_signature
Ubuntu 2.6.27-11.27-server


This machine (the one I ssh into) doesn't have any GUI installed... all CLI, which sort of eliminates busybox being the problem.

Joe
 
Ok... just learned something.

From a command prompt, I started (what I thought) was another instance of bash. From that point on, I could use the arrow keys and tab completion as normal. I exited that bash session and typed 'echo $0' and instead of bash, I got '-sh'

I'm not entirely sure what shell that is. Bash will return 'bash', a Bourne Shell will return 'sh' (no hyphen)... this machine doesn't have ksh or zsh installed, so I can't test those, but I think I've figured out what my problem is! I wonder if RedSquirell's problem could somehow be a similar situation.

Hey RedSquirell... just for kicks, do a 'sudo bash' and then run vi from there and see if it makes any difference.

Joe
 
Linux version 2.6.27-11-server (buildd@rothera) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #1 SMP Thu Jan 29 20:19:41 UTC 2009

That 4.3.2 is just the compiler used to build the kernel, it has nothing to do with the distribution itself. Debian's got a file called /etc/debian_version with the distribution version in it, Ubuntu probably has something similar.

So I guess my friend is using the Bourne Shell.

Well he's probably using bash but invoked it as /bin/sh so it does a sort of compatibility mode with classic sh.
 
I just (after some googling around) did a

chsh -s /bin/bash

and changed my default shell to bash and now all is happy! 🙂

Joe
 
Back
Top