I purchased a small touchscreen for my raspberry pi (running Raspbian), but I also require a login to the user pi (encrypted home directory).

How do I set up an onscreen keyboard so that I can log in to the Pi?

Ideally, it would also start automatically after login and be hidden until I need to type something (so I can use it for more than logging in), but just having an entry in the start menu would be okay.

I have done some research on this, but I have not found any that don't need a shortcut or command to start, and I have found nothing on the use of a onscreen keyboard to log in.

3 Answers 3


First, install an on-screen keyboard of your choice. florence will do just fine:

sudo apt-get install florence

Make sure it runs fine and configure it to your preference.

Then make sure lightdm-gtk-greeter is installed, and edit /etc/lightdm/lightdm-gtk-greeter.conf, adding the command to start the virtual keyboard during login:

keyboard=florence --focus &

You also need to enable the greeter in /etc/lightdm/lightdm.conf:


Upon a restart, you should see the login screen with a virtual keyboard on it.

  • That's quite helpful. I had never quite gotten it working, so I'll have to try this out. Unfortunately, I don't have my Pi available at the moment. I'll let you know how this turns out soon hopefully.
    – user50441
    Apr 21, 2020 at 21:12

Look for Matchbox. Its a set of tools for linux that supplies things like androi-like virtual keyboards


I had never work with, but florence, a virtual keyboard, seems quite common in the rpi community :


This page also list alternatives virtual keyboard programs : GOK, XVKBD and OnBoard, wich may, or not, run on Raspbian :)

  • This sounds promising, but is there any way to use it with the greeter (the login screen when the Pi boots)? I'd like to have home folder encryption, but I can't use that without a way to type the password.
    – user50441
    Jun 6, 2017 at 15:53
  • Look at : florence.sourceforge.net/english/how-to.html It's seems feasible, at least on some windows manager Jun 6, 2017 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.