Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

First of all I'm working on a keyboard using a QWERTY layout.

Now once in a while I need to get the Euro (€) symbol in my terminal (typically in a xterm).

If I cut'n'paste the Euro symbol, it shows up fine in my xterms, which have their locale set like this:

$ echo $XTERM_LOCALE 
en_US.UTF-8

How can I configure my Linux (Debian / X) so that I can easily (and fastly) output an Euro symbol, without messing my setup? (for example, I'm not switching to a non-QWERTY layout).

I don't care if it only works in X / xterm, that would be good enough for me.

Ideally I'd need a way to configure a shortcut that I can change to my will, to be sure it wouldn't interfere with my usual shortcuts.

Say, if I want to have ctrl+alt+e to output:€ in my xterm, how would I go about it?

share|improve this question
add comment

3 Answers

The easiest way would be to use a compose key.

Ubuntu has a community page that describes this feature very well, but I'm not sure about its accuracy when not using Ubuntu. The page says that Shift+RightAlt is the default key but it was not for me on Debian (although I do not use the normal US English layout).

Personally I set my compose key to the Menu key because I didn't find the default behavior of it useful.

After you have a working compose key configured, typing a Euro symbol with it can be done using at least 8 different combinations. Press and release (do not hold it and type the next character, it is not a modifier key) the compose key, followed by e, then =.

You can use either e or c, and E or C work as well. Additionally the order of the two characters does not matter for this composition so you can enter the = first.

share|improve this answer
add comment

If you setup a ComposeKey then you can enter the Euro with the sequence compose-E-=, and get lots of other special characters in a similar way.

https://help.ubuntu.com/community/GtkComposeTable has some relevant information (not all of it specific to Gtk or Ubuntu; compose key works even if you have no gtk or Gnome) See also How do I put a hat on 'e' (ê)? and Remapping caps-lock to escape, and menu to compose, on the linux console

share|improve this answer
add comment

May be this could help:

If the euro character is not represented in your X terminal emulator, you can change the default font by changing either the users' configuration files (.Xdefaults or .Xresources) or the system-wide configuration at /etc/X11/app-defaults/XTerm:

 *font:     -misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-15
 *VT100*font2:           -misc-fixed-medium-r-normal-*-*-70-*-*-c-*-iso8859-15
 *VT100*font3:           -misc-fixed-medium-r-normal-*-*-100-*-*-c-*-iso8859-15
 *VT100*font4:           -misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-15
 *VT100*font5:           -misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-15
 *VT100*font6:           -misc-fixed-medium-r-normal-*-*-200-*-*-c-*-iso8859-15

In /etc/X11/app-defaults/XTerm, make sure you replace old lines with these options.

After editing a .Xdefaults file, reload it with xrdb -merge ~/.Xdefaults. (Similarly for .Xresources.)

Note that the derivative programs also use the font resource to set the default font, so the procedure is analogous.

FROM: http://www.debian.org/doc/manuals/debian-euro-support/ch-applications.en.html

share|improve this answer
    
this is not at all related to my question. I clearly specified that the Euro symbol was appearing fine in my xterm. –  SyntaxT3rr0r Mar 16 '11 at 18:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.