Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

GrabFocus For Xfce4 Verve Applets In Python Using Dbus.

DZone's Guide to

GrabFocus For Xfce4 Verve Applets In Python Using Dbus.

· ·
Free Resource
// This little code allow to grab focus of the Verve applet(command line interface with auto-completion and command history) using python and dbus system. 



#!/usr/bin/env python

import dbus


try:
	bus = dbus.SessionBus()
except:
	print 'errore nella sessione dbus'
try:
	obj = bus.get_object("org.xfce.RunDialog", "/org/xfce/RunDialog")
	verve = dbus.Interface(obj, "org.xfce.Verve")
except:
	print 'errore....'

verve.GrabFocus()
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}