2

I'm working with a bunch of Raspberry Pi 2s running Raspbian, building interactive puzzles for a performance installation. The puzzles are meant to be played on the command line. My background is in web development, so while I'm very comfortable on the Linux command line, I don't have a lot of experience tailoring a local terminal environment. I have a number of distinct requirements and I can never quite fulfill all of them at once. Namely:

  1. I would like the game to be loaded from the kernel console, without starting LXDE. This is mostly because in a terminal environment, I can catch any keystrokes that someone would use to try to exit the game, and put a password up to prevent it. Also, I have not yet determined whether I could start a terminal window in LXDE and hide all the windowing chrome to make the game appear to be CLI only.

  2. I need 256 color display.

  3. The game is played in English, but contains some Cyrillic characters, so I need unicode support. A sample of the characters used:

    • 0x1440
    • 0x1437
    • 0x143d

I can get the 256 color display in xterm using TERM=xterm-256color, but ONLY if I launch it in a window in LXDE. Same goes for Unicode support. When I try starting xterm from the kernel console, I can pass a number of options to customize the display of the terminal (-fg, -bg, -fa), but can't make it display 256 colors or unicode characters. I've tried using a .Xresource file and loading it with xrdb -merge ~/.Xresource, but it doesn't seem to have any effect at all. Currently, I have a .xinitrc file that contains

`which xterm` \
-fg white \
-bg black \
-fa *-fixed-*-*-*-18-*
-en en_US.UTF-8
-tn xterm-256color

and I launch xterm by simply running xinit. When I do so, xterm starts and respects the foreground, background, and font properties, but only displays 8 colors and won't display unicode characters. Can anyone offer any insight for how to meet all three of my requirements above? I would also accept an answer that shows how I can simply start the game from an LXDE window, but full-screen that window with absolutely no chrome, and prevent the user from being able to exit that environement (there will not be a mouse attached to the machine)

Thanks!

Ben
  • 571
  • 2
  • 4
  • 15

1 Answers1

0

It's a shame, someone posted an answer here and pointed out that I had a typo in the .xinitrc that I posted (missing \ characters after a couple of the lines). After going back and double checking, that did turn out to be part of the problem. He or she or someone else apparently took down the answer though, so I can't give credit.

The other part of the problem was that the unicode characters I'm trying to display are not Cyrillic, but are rather part of the Unified Canadian Aboriginal Syllabics block, which simply wasn't part of any of the terminal fonts I was using. After some digging, I found what appears to be the only monospaced font that contains these characters, Everson Mono. I installed that to /usr/local/share/fonts, and amended my .xinitrc file thusly:

`which xterm` \
-fg white \
-bg black \
-fa 'Everson Mono' \
-en en_US.UTF-8 \
-tn xterm-256color

...and now I can load xterm with xinit and run my app and all is right with the world.

Ben
  • 571
  • 2
  • 4
  • 15