I guess this is a related question to Can I use GNOME applets in Unity? (moved by suggestion of @Jorge Castro)
I'd like to use stickynotes_applet
in Unity.. Now in Gnome, this applet gets added to a bar, then I have to click it to create a new note, and I can call preferences to have the notes stick on the desktop - which is all I need.
Obviously, as mentioned here, it will not be possible to use this applet directly in Unity; but basically, all I'd need to do is to raise the Preferences window (so as to make the notes stick), and to somehow issue a command for a new note (which would otherwise be performed by a click on the applet icon in the Gnome bar).
I have tried running '/usr/lib/gnome-applets/stickynotes_applet
' and seemingly it runs, although no applet icon is shown (which is expected), and no any other windows either (which I otherwise hoped will show :) ).
So I was wandering - given that this applet doesn't (seem to) have anything special related to desktop - is there a command line way to basically run this applet, issue a 'Show Preferences' command to it, and issue a new note command to it within a Unity environment (currently I can call tomboy
from command line and it works - but its windows are too clunky for my taste)?
(and bonus question - how would you start an applet related window only from the command line in classic Gnome?)
Desktop integration doesn't matter all that much to me - I'd run this manually from the command line gladly, as long as I get small compact notes that stay on the desktop (as long as the process is active)..
Thanks for any comments,
Cheers!
You could have a small gnome-panel running your applet only. See How do I use the GNOME Panel in Unity?
I came back to this problem again (still on Natty); so I thought I'd post my results.
First, I started looking up if you can run Gnome applets from the command line, and in a separate window - turns out, this was a technique for debugging Python applets;
invest-applet
(which is in Python) so it again works on Natty; patch can be found in Bug #775387 “Invest-applet fails to start after upgrade to Natty...” : Bugs : “gnome-applets” package : Ubuntuinvest-applet
object when called from the command line, and puts it in its own window - and this happens to work in Unity:This is the script:
... and the extended script (with debug output, and a ton of messy comments) is in gtk_bonobo_applet_widget.py.
This is exactly what I wanted, and at first, I thought that it would be applicable to all applets - at least in Natty (and among them
stickynotes
); but alas, no:Now, Natty is a bit specific, because it is the last Gnome 2 Ubuntu - however, it also features (the first) Unity. As such:
bonobo
/CORBA
interface (in Python, viagnomeapplet
); those, likeinvest-applet
orbrightness-applet
, can use the above technique to be raised in their own window - and can be queried throughlibbonobo2-bin
tools (likeactivation-client
)stickynotes
, have migrated toward GSettings/DBUS base (interface)In fact,
stickynotes
migrated frombonobo
todbus
shortly before Natty came out (in the revision Port to new libpanel-applet API); which is obvious by the replacement of thePANEL_APPLET_BONOBO_FACTORY
macro withPANEL_APPLET_OUT_PROCESS_FACTORY
. Arguably, if one checks out the last revision ofstickynotes
based onbonobo
and builds it - one should also be able to use the above technique to instantiate the applet in a separate window, and run it from there, even withoutgnome-panel
.I would have otherwise believed, that all applets (or rather, applet developing frameworks) should have the capability to run in a separate window like that - if not for any other reason, then to facilitate debugging of applets during development. And given that some applets have command line switches for running in a separate window (both the "beginner's guide" above, and also
invest-applet
, feature such switches) - I hoped maybestickynotes
features such command line arguments too; however, I did grep through its source files - and alas, I cannot find any mention of command line options.But then, I wondered - why this migration? Well, it is because
bonobo
is (or rather, has been) deprecated for a while now:AppletsDbusMigration - GNOME Live!: (2009)
gnome-devel-list mailing list - What will replace bonobo? (2009)
gnome-components mailing list 'Re: What will replace bonobo?' (2005)
Well, shucks - I myself think, the "embedding one application in another" was very useful in this case - to run (at least some) applets in Unity, with support for them removed
:)
Of course, it was a more-less a "lucky" arrangement of desktop packages in Natty that allowed for that (given that it is still Gnome 2 and still has thebonobo
libraries) - obviously, later versions that are Gnome 3 based havebonobo
removed completely - and the above Python-script-instantiation-in-a-window technique will most definitely not work there:/
The final question is - could we similarly use a Python script, but with bindings for
dbus
, to achieve something similar to the abovebonobo
based script?Closest I got to that, is with the script gtk_dbus_applet_widget.py, however, that script doesn't raise an applet in a window - and cannot even add an applet to the bar! The only thing it can do, is talk to the applet "factory" via
dbus
, and instruct it to create an applet; but this applet remains simply as data somewhere on the filesystem (and it persists across reboots!), and never becomes instantiated as a Gnome widget... And given the comments above, I doubt something like that is currently (well, on Natty at least) possible withdbus
.In conclusion - I guess this, along with the
gnome-panel
technique, exhausts the possibilities of frivolously running applets under Unity in Natty.Rhinote has keyboard shortcuts
For those who are still looking for something similar, handy and supporting Note Category feature, there is Indicator Sticky notes.
Installation:
Hope it'll help... Enjoy!