LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2018, 05:57 PM   #1
weephatz
LQ Newbie
 
Registered: Aug 2018
Posts: 8

Rep: Reputation: Disabled
ubuntu gnome terminal is behaving like Vim


Hi,

I've been googling and cannot find a solution to this:

At the moment my terminal in Ubuntu 18.04 is behaving like Vim. What I mean by that is:

periodically the terminal stops accepting input from the keyboard (issuing a system bell instead) - I can fix this by pressing 'i' as in insert mode.

keybind shortcuts like CTRL+L do not clear the terminal, instead it just outputs ^L to the screen - I have to type: ESC then CTRL+L

This seems to have started shortly after I installed and ran tmux for the first time

Admittedly it is not the gravest problem in the world, but can anyone suggest where I can start in getting the Terminal behaviour back to normal?
 
Old 09-17-2018, 06:15 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,222

Rep: Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701
Are you perhaps actually in vim/vi? It's my understanding that one can access the command line from within vim, although I don't know how to do that.

What happens if you type
Code:
[esc]:q
(Where [esc] is the escape key)
 
1 members found this post helpful.
Old 09-17-2018, 06:22 PM   #3
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 257

Rep: Reputation: 91
When you "switch" to vi mode, what says :
Code:
echo $SHELLOPTS
And is everything back to normal if you do :
Code:
set -o emacs
Maybe there is a keybinding :
Code:
bind -P | grep edit
In my urxvt terminal, I have :
Code:
$ echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
$ bind -P | grep edit
edit-and-execute-command can be found on "\C-x\C-e".
emacs-editing-mode is not bound to any keys
vi-editing-mode is not bound to any keys
 
1 members found this post helpful.
Old 09-17-2018, 06:28 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,834

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
tmux does have a vi like command mode and I would assume that it is still running. If you rebooted the server then I would guess it is being automatically started by systemd or via bash configuration scripts.

The command kill-server will kill the tmux server and clients and destroy all sessions.
 
1 members found this post helpful.
Old 09-17-2018, 06:31 PM   #5
weephatz
LQ Newbie
 
Registered: Aug 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Are you perhaps actually in vim/vi? It's my understanding that one can access the command line from within vim, although I don't know how to do that.

What happens if you type
Code:
[esc]:q
(Where [esc] is the escape key)
I know you can drop into a shell from VM using:
[CODE]:!/bin/bash{/CODE]

I'm not in Vi/Vim though, this is the default behaviour when I launch Terminal from the application menu

If I try -
Code:
 [esc]:q
I just get system bells when hitting ':' and 'q'
if I enter insert mode (by pressing 'i' and type ':q' I get the expected command not found
 
Old 09-17-2018, 06:36 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,834

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
As an update do you see a green band across the bottom of the terminal windows? If so what happens if you type exit (and press return)?
 
Old 09-17-2018, 06:40 PM   #7
weephatz
LQ Newbie
 
Registered: Aug 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
As an update do you see a green band across the bottom of the terminal windows? If so what happens if you type exit (and press return)?
Hi Michael,

There is no green band along the bottom of the terminal
ps aux shows tmux is not running and the issue persists after reboot

is ~/.bashrc the config file I should be looking at?

What lougavulin suggested:
Code:
 set -o emacs
seems to temporarily fix the behaviour, but it returns when I open a new terminal, so I assume I need to amend a conf somewhere
 
Old 09-17-2018, 06:51 PM   #8
weephatz
LQ Newbie
 
Registered: Aug 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
Think I found solution

I have now edited ~/.bashrc to include set -o emacs

After that the behaviour is back to normal and persistent

Thanks all for your help in pushing me towards the solution
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Terminal on Linux Mint 17.1 version behaving like glass mirror chanikya Linux - Newbie 16 03-17-2016 01:40 PM
[SOLVED] Ubuntu 12.04, Vim in terminal not using 256 colors szboardstretcher Linux - Newbie 2 09-14-2013 07:45 PM
[SOLVED] Installing vim-gnome or vim-gtk dependency issues with apt, aptitude, synaptic alagenchev Linux - Software 3 05-15-2012 11:33 AM
LXer: Disable annoying bell in Gnome Terminal, vim, xterm, etc... LXer Syndicated Linux News 0 02-21-2012 01:50 PM
Linux Terminal behaving abnormally ! ron2794 Linux - Software 5 06-28-2011 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration