OnBoard needed to unlock locked screen

Asked by Hieratical

I use a slate tablet and would like to lock the screen occasionally.

OnBoard does not appear when the password entry field appears.

How do I get OnBoard to appear so I can unlock the screen?

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
Roger E Critchlow Jr
Solved:
Last query:
Last reply:
Revision history for this message
Best Roger E Critchlow Jr (rec) said :
#1

The short answer is you can't, onboard doesn't do this right now in the version distributed with Jaunty, and the version under development doesn't seem to address the issue either.

The problem is that gnome-screensaver wants to embed the keyboard into itself which requires that onboard place it's toplevel Gdk window into a GtkPlug and print out the XID of the GtkPlug for gnome-screensaver. That may actually be the two lines of code that it sounds like, but I haven't hit the right two lines yet.

The work around that I'm using is to start:

   Applications > System Tools > Configuration Editor
   (it's package, gconf-editor, is installed by default but the menu entry is hidden,
    use System > Preferences > Main Menu to unhide it),
   navigate in the configuration editor to: apps > gnome-screensaver,
   check embedded_keyboard_enabled,
   specify "cellwriter --xid --keyboard-only" as the embedded_keyboard_command.

You may need to install cellwriter, but it's in the repos.

It would be really nice if onboard could be used in all three password entry situations. It would even be nicer if they all worked the same rather than being such hacks. The gksu window with the transparent background and window frame is pretty ugly.

-- rec --

Revision history for this message
Roger E Critchlow Jr (rec) said :
#2

I'm glad to see this now listed as an RFE. Here are the puzzling results of my experiments.

I duplicated the KbdWindow.py class into a KbdPlug.py class which only differ in inheriting from gtk.Window or gtk.Plug. I'm sure there must be a better solution with the same result, but I'm not a python hacker so I'll leave that for someone else. More specifically KbdPlug.py is identical to KbdWindow.py except that these lines:

class KbdPlug(gtk.Plug):
 def __init__(self,sok):#
  gtk.Plug.__init__(self,0)

replace these lines:

class KbdWindow(gtk.Window):
 def __init__(self,sok):#
  gtk.Window.__init__(self)

where I've omitted the doc string.

In OnboardGtk.py a new option:

        parser.add_option("-e", "--xid",action="store_true",default=False,dest="xid",
                          help="print XID to standard output for embedding")

I think I would make the options "-e","--embed", ..., dest="embed" instead.

Then substitute:

        if options.xid:
            self.window = KbdPlug(self)
        else:
            self.window = KbdWindow(self)

for the plain:

       self.window = KbdWindow(self)

And finally add:

        self.window.show_all()

+ if options.xid:
+ print ("%s" % (self.window.get_id()))

        # Watch settings for changes

This means that "onboard --xid" does not display a window but simply prints a window id to standard output.

Now, if you run "onboard --xid&" and supply the window id to the socket.py program linked at http://eccentric.cx/misc/pygtk/pygtkfaq.html#19.15, then the socket.py window embeds onboard, and onboard resizes as you resize the socket window.

But it doesn't work with gnome-screensaver. And it's more than two lines.

I hope this helps get the RFE completed.

-- rec --

Revision history for this message
Hieratical (trainerjonathan) said :
#3

Thanks Roger E Critchlow Jr, that solved my question.

Revision history for this message
Marius B. Kotsbak (mariusko) said :
#4

There is now an option in onboard for it to appear on screen unlock.

Revision history for this message
Paula Doird (paula-diord) said :
#5

> There is now an option in onboard for it to appear on screen unlock.

This option MUST be on by default:
When a user wants to login the first time on a touchscreen without a real keyboard -
he HAS to use the onboard virtual keyboard - there is ABSOLUTE no change to set a unlock option.
No keyboard - no login - no change of options.

Revision history for this message
Francesco Fumanti (frafu) said :
#6

The option Marius was talking about concerned locking an already running desktop session.

I don't know for the touchscreen that you are using, but on Ubuntu desktop, there is an icon in the top menu bar of the login screen to start Onboard.