LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-07-2013, 08:13 AM   #1
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
keyboard doesn't work as expected


Hi
I am a experienced Linux user and I am trying to work with Solaris now. I found several problems in my usual routines which I used in Linux previously.
For example in vi editor I cannot use arrow keys to move forward and back, up and down. It prints some characters instead.
I used to scroll the shell when the output of a command is too long with SHIFT+UP SHIFT+DOWN or SHIFT+PAGEUP SHIFT+PAGEDOWN in Linux.
Should it work also in Solaris?
Maybe the problem is related to virtualbox since I am running this Solaris 10 as a virtual-machine.

Can this be solved somehow? Or are there some alternatives for these routines?
 
Old 05-07-2013, 08:18 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
yes, you can have macros in vi to simulate the events you need. the solution to scrolling depends on the desktop you use.
 
1 members found this post helpful.
Old 05-07-2013, 09:23 AM   #3
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
Actually I don't use desktop its (the Solaris) without GUI. Only shell.
Its a bit better when I connect to it by ssh but still some keys doesn't work. By desktop you mean the guest OS desktop OR the MAIN OS desktop (where virtualbox is installed) which is Win7?
 
Old 05-07-2013, 11:41 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,152

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Basic vi uses control keys for moving around: h, j, k, l. I think the arrow keys are a vim extension.
 
Old 05-07-2013, 12:44 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What Solaris release are you running ?
 
Old 05-08-2013, 12:21 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,954

Rep: Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329Reputation: 7329
Quote:
Originally Posted by hua View Post
Actually I don't use desktop its (the Solaris) without GUI. Only shell.
Its a bit better when I connect to it by ssh but still some keys doesn't work. By desktop you mean the guest OS desktop OR the MAIN OS desktop (where virtualbox is installed) which is Win7?
I mean the solaris desktop, CDE or something newer? But you told you use it without GUI. In this case I would like to know the terminal settings (you need to set it properly) echo $TERM
 
Old 05-08-2013, 01:05 AM   #7
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by smallpond View Post
Basic vi uses control keys for moving around: h, j, k, l. I think the arrow keys are a vim extension.
Sorry I didn't note that the arrow keys doesn't work in EDIT mode (INSERT,INPUT = SHIFT+I). It is very difficult to edit the files with vi without this functionality. For example I have a configuration file which I need to modify so I switch to INSERT mode and try to get to the position where the values should be changed. At the moment I hit the right arrow key the vi turns back to COMMAND mode (or puts some characters instead of movement). The only way to edit the file is to rewrite the complete line with the new value.

I use Solaris 10. I am starting to work in environment with lots of Solaris 10 machines so I need to get comfortable with the Solaris shell. But in my testing environment I have Solaris 11. It is better (it doesn't print characters instead of arrows) but still I cannot navigate in INSERT mode.

How it is supposed to edit an existing config file in Solaris when the arrow keys doesn't work. (I mean if this is a normal behavior of vi in Solaris) Rewriting always the complete line?

I am going to install it in physical hardware to check whether it is not an virtualbox bug with Solaris.
 
Old 05-08-2013, 01:08 AM   #8
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by pan64 View Post
I mean the solaris desktop, CDE or something newer? But you told you use it without GUI. In this case I would like to know the terminal settings (you need to set it properly) echo $TERM
Thanks. Its:
Quote:
echo $TERM
sun-color
 
Old 05-08-2013, 05:31 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
There is no way to move the cursor in insertion mode under the regular/standard vi, you need to switch to the command mode. What you are used to is a vim extension as smallpond already stated..

It seems you use the I to switch to insert mode.

You should instead just move the cursor using the letter commands (h j k l space backspace/^H) or the arrows while in command mode to the location where you want to insert or modify something and switch to insert mode using either i (insert), a (append), C (change until end of line) or cw (change word).
 
1 members found this post helpful.
Old 05-09-2013, 08:32 AM   #10
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by jlliagre View Post
You should instead just move the cursor using the letter commands (h j k l space backspace/^H) or the arrows while in command mode to the location where you want to insert or modify something and switch to insert mode using either i (insert), a (append), C (change until end of line) or cw (change word).
This works. It seems I get to used with the extended functionality of vim. I need to accept this different behavior of vi in Solaris.

Thanks
 
Old 05-16-2013, 09:24 AM   #11
kebabbert
Member
 
Registered: Jul 2005
Posts: 527

Rep: Reputation: 46
Quote:
Originally Posted by hua View Post
This works. It seems I get to used with the extended functionality of vim. I need to accept this different behavior of vi in Solaris.
Actually, it is not a "different" behaviour in Solaris, it is the correct original behavior. You are used to a different behavior, and need to adapt to the original behavior now. Anyway, it does not hurt to learn original VI.
 
Old 05-20-2013, 08:16 AM   #12
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by kebabbert View Post
Actually, it is not a "different" behaviour in Solaris, it is the correct original behavior. You are used to a different behavior, and need to adapt to the original behavior now. Anyway, it does not hurt to learn original VI.
Right, I can see it now
 
Old 06-03-2013, 05:35 AM   #13
OctavioPang
LQ Newbie
 
Registered: Jun 2013
Posts: 11

Rep: Reputation: Disabled
Yes the same problem occurs with me as well...in my case whenever i press backspace it starts showing # sign instead of deleting the characters. however the up and the down button are working perfectly fine.What is the solution.?..
 
Old 06-03-2013, 07:56 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Is "Control-H" deleting the previous character ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables doesn't work as expected rluo Red Hat 3 01-18-2013 12:34 AM
Subwoofer doesn't work as expected Kubuntu Linux - Hardware 0 06-20-2012 03:23 PM
Keyboard doesn't work right click on mouse doesn't work ramblinrick Linux Mint 2 10-15-2010 01:10 AM
Crond script doesn't work as expected Karimo Slackware 1 02-14-2010 06:32 PM
iptables rules doesn't work as expected.. Shioni Linux - Security 4 11-15-2006 01:37 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration