LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2003, 11:22 AM   #1
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Rep: Reputation: 0
Character missing on Konsole


I can't type the ^ character on a Konsole or Xterm terminal, but in a a Gnome or RXvt terminal I can type the character. Why does Konsole and Xterm have problems with this character?
 
Old 09-21-2003, 11:26 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,348

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"Why does Konsole and Xterm have problems with this character?"

konsole and xterm run bash and bash uses ^ for a histchar. See:
man bash
 
Old 09-22-2003, 04:44 PM   #3
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
I couldn't find anything on the manual that could help me, I'm a newbie so it's like reading chinese... How can I tell bash to print the ^ character on screen?
 
Old 09-22-2003, 05:05 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,348

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"How can I tell bash to print the ^ character on screen?"

I do not understand what you are doing and if I did I might not know the answer. That said, here is what I think might be a reasonable answer to your question:

The ^ character is a command in bash. It means to make a substitution in one of the old commands in the history list kept by bash. You can change the ^ command to just a plain character by escaping it with a backslash, \

So:
^ is a bash command
\^ is a clarat character

Last edited by jailbait; 09-22-2003 at 05:07 PM.
 
Old 09-23-2003, 11:43 AM   #5
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
That's not the answer I'm looking but thanks anyway, basically my problem is that while using Konsole or Xterm I can't use the ^ character like this:

grep ^X file1

When I press the ^ character on the keyboard, the ^ character is not displayed on screen. Every time I have to make a search I have to copy-paste the ^ character from somewhere else.
 
Old 09-23-2003, 07:58 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,348

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"When I press the ^ character on the keyboard, the ^ character is not displayed on screen."

I tried your command, grep ^X file1, on my konsole using one of my filenames. The command line displayed the ^ but did not do anything useful.

I tried:
grep [^X] file1
and it worked fine, displaying a lot of text.

Do you have this problem other than at the command line? Can you type ^ as data into a text editor?
 
Old 09-26-2003, 12:08 AM   #7
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Do you have this problem other than at the command line? Can you type ^ as data into a text editor?
I only have this problem with Xterm and Konsole, when I use programs like Mozilla, Kwrite or Rxvt all is well. It's like Konsole is using a different keyboard layout, a key layout that doesn't recognize the ^ character. Weird, isn't?
 
Old 09-26-2003, 03:44 PM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,348

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"Weird, isn't?"

Yes. That scratches the possibility of a bad keyboard mapping. Other possiblities are:

I am using bash 2.05b. ^ works OK on my bash so maybe you have hit a bug in bash. You could try to solve the problem by upgrading to a later version of bash.

Or

Both bash and grep use ^ as a command or command parameter. So do a lot of other commands. It is possible to have ambiguous syntax where bash interprets command parameters as belonging to bash and executing them. You get around these problems by escaping the command parameters with a backslash. You could try substituting \^ for ^ and see what happens.
 
Old 09-27-2003, 12:24 AM   #9
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
I am using bash 2.05b. ^ works OK on my bash so maybe you have hit a bug in bash
My bash is also 2.05b and I think the bug has something to do with my keyboard being made by Micro$oft
Quote:
You could try substituting \^ for ^ and see what happens
I tried that but I still can't see the ^ character....

Right now my only hope is that there's a configuration file for bash, that would allow me to map a key combination to the ^character, do you know of the existence of this file?
 
Old 09-27-2003, 02:24 AM   #10
WebmastaX
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake 9.1
Posts: 17

Original Poster
Rep: Reputation: 0
Nevermind, I fixed the problem, this is what I did:

1. First I checked the current keyboard layout with this command:

"xmodmap -pke | less"

2. I looked up the keycode responsible of printing the ^ character on screen

In my case it was 48.
"keycode 48=braceleft bracketright dead_circumflex"

3. Aparently bash does not recognize the dead_circumflex character, only asciicircum(even though they are the same), so I changed to keymap with this command:

xmodmap -e 'keycode 48=braceleft bracketright asciicircum'

Now everything is great! Woohoo!

One more thing, to make the keymap change default I had to edit the /etc/X11/xkb/symbols/ file that had my current keyboard layout.
 
  


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
Missing tilda character on keyboard farpoint Debian 8 07-11-2005 05:50 PM
Font missing in Konsole!!!!! kholdstare Linux - Software 5 05-01-2005 02:54 AM
Missing Konsole fixed fonts GATTACA Slackware 2 12-13-2004 11:11 PM
International Character sets in Pine / Konsole LauraK6 Linux - Software 0 10-28-2004 10:56 AM
Missing character J_Szucs Linux - Newbie 3 03-15-2003 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:47 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