matchbox-keyboard icon indicating copy to clipboard operation
matchbox-keyboard copied to clipboard

Unable to locate variant

Open EpicLPer opened this issue 8 years ago • 5 comments

Well, not sure how I managed this but I simply cloned this repo, executed autogen.sh, did "sudo make", "sudo make install" and when trying to execute it just throws this:

matchbox-keyboard: *Warning* Unable to locate variant: �}�vH��~`X�v���v8?�v/home/pi/.matchbox/kb_config
                   falling back to /usr/local/share/matchbox-keyboard/keyboard.xml
matchbox-keyboard: Failed to load '/usr/share/matchbox-keyboard/key-backspace.png'
matchbox-keyboard:/usr/local/share/matchbox-keyboard/keyboard.xml:0: (null)
matchbox-keyboard: *Error*  Error parsing

A path seems to be broken but I have no idea how that got there. Completely fresh flash of the latest Raspbian (04/10).

EpicLPer avatar Apr 30 '17 22:04 EpicLPer

Hi! So sad that after 10 years there is no good alternative touch-screen keyboards on the market :)

Jokes aside, I guess there is 2 problems.

  1. keyboard layout specified wrongly, e.g. the binary must be called like
$ matchbox-keyboard keyboard

or you can also specify MB_KBD_VARIANT environment option.

  1. not all XML files copied into /usr/local/share/matchbox-keyboard and pictures into /usr/share/matchbox-keyboard, yes I know, the paths are different, the paths of images are absolute and hardcoded in XML.

But this is a pile of legacy, so once it works, you're good :)

xlab avatar Apr 30 '17 23:04 xlab

  • I also recommend to run in daemon mode with -d flag and use a script to toggle, see #7 just fyi

xlab avatar Apr 30 '17 23:04 xlab

Wanted to chime in and say that I had the same problem even after making sudo make install. Folder matchbox-keyboard is correctly created in /usr/local/share but must be copied manually to /usr/share/. Although OP may not even be referring to that. I made two installs at the same time, one on my Linux Mint system and the other on my Raspberry Pi 3. Running "matchbox-keyboard" with NO additional parameters always complains about: "matchbox-keyboard: Warning Unable to locate variant: �εS� " After "variant:" it's always different gibberish. Examples: matchbox-keyboard: Warning Unable to locate variant: 货�� matchbox-keyboard: Warning Unable to locate variant: �^� matchbox-keyboard: Warning Unable to locate variant: �$��0

The keyboard launches normally after that though. The installation on the raspberry pi works as expected

luis1761 avatar Oct 20 '17 14:10 luis1761

I have found that the "variant" is the file passed on command line as in: matchbox-keyboard [ options ] filename.xml If you don't specify it, it drops back to default after outputting that message with garbage. If you do specify it and the file is not keyboard.xml, it gives the same message but instead of garbage, you get the filename. If you specify the name "keyboard.xml" but use a directory other than ~.matchbox or /usr/local/share/matchbox-keyboard, you get an error

So you can't use other files or other directories. And with the latest(?) version (downloaded yesterday and README says 1.5), not all the options work.

Possibly someone can fix the issues. I can't. Twenty years since I touched C code and wasn't very good at it back then.

jpezz avatar May 28 '19 15:05 jpezz

I have the same problem, I cannot find a way to use another variant other than renaming the file.

I've tried all of the below:

/usr/local/bin/matchbox-keyboard -g 300 -d /usr/local/share/matchbox-keyboard/keyboard-finger.xml
/usr/local/bin/matchbox-keyboard -g 300 -d /usr/local/share/matchbox-keyboard/keyboard-full.xml

cd /usr/local/share/matchbox-keyboard
/usr/local/bin/matchbox-keyboard -g 300 -d keyboard-finger.xml 
/usr/local/bin/matchbox-keyboard -g 300 -d keyboard-finger

I'm getting this error (or similar):

matchbox-keyboard: *Warning* Unable to locate variant: keyboard-finger.xml
                   falling back to /usr/local/share/matchbox-keyboard/keyboard.xml
matchbox-keyboard: *Warning* Unable to locate variant: /usr/local/share/matchbox-keyboard/keyboard-finger.xml
                   falling back to /usr/local/share/matchbox-keyboard/keyboard.xml

Also tried the env var:

$ export MB_KBD_VARIANT=/usr/local/share/matchbox-keyboard/keyboard-finger.xml
$ /usr/local/bin/matchbox-keyboard -g 300 -d 
matchbox-keyboard: *Warning* Unable to locate variant: ?
                   falling back to /usr/local/share/matchbox-keyboard/keyboard.xml

The only solution right now is to rename the file to keyboard.xml !!!

This is still the best touchscreen keyboard, IMHO Sadly I know nothing about C wish I had time to learn!

Jaypers avatar May 08 '21 20:05 Jaypers