Implement clipboard menu as GNOME Shell Extension

Bug #1738566 reported by Chelmite
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Diodon
Triaged
Wishlist
Unassigned

Bug Description

In classic GNOME application indicators are not shown per default so no Diodon icon appears.

For application indicator to be shown following extension needs to be installed:

https://extensions.gnome.org/extension/615/appindicator-support/

It would be better though that Diodon supports GNOME Shell extensions directly. Patches are welcome (they could simple access Diodon through libdiodon library).

A test version can be found at https://github.com/RedHatter/diodon-gnome-indicator

Revision history for this message
Oliver Sauder (sao) wrote :

Have you already tried running newest version 1.7.0 which I have just released?

It's available in the stable ppa https://launchpad.net/~diodon-team/+archive/ubuntu/stable

Potentially after installation a reboot resp. logout/login is needed for GNOME to recognize new indicator in top bar.

Let me know whether this works for you.

Revision history for this message
Chelmite (steve-kelem) wrote :

I tried it, but it makes no difference.

Revision history for this message
Oliver Sauder (sao) wrote :

I am not able to reproduce this on my 17.10 machine. The icon appears as normal running version 1.7.0.

Could you attach diodon_debug.txt and env.txt files running following commands:

killall diodon
env | grep XDG > env.txt
G_MESSAGES_DEBUG=all diodon > diodon_debug.txt

once Diodon is running in one terminal what happens when you start Diodon in a second terminal again. Does the menu pop up?

Revision history for this message
Chelmite (steve-kelem) wrote : Re: [Bug 1738566] Re: diodon icon missing from top menu bar after upgrading to Gnome
  • env.txt Edit (648 bytes, text/plain; charset="US-ASCII"; name="env.txt")

With Diodon running in one terminal, when I start another one in a 2nd
terminal, the diodon clipboard list pops up.
The menu bar shows 5 entries for Firefox, 2 entries for terminals, keyboard
language, clock & date, wifi, volume, and battery level.
There is nothing on the menu bar for Diodon.

I attached the env.txt file. diodon_debug.txt is empty. Diodon is still
running, so I kill -1'ed it...still empty.

Steve

On Sun, Dec 17, 2017 at 1:53 AM, Oliver Sauder <email address hidden> wrote:

> I am not able to reproduce this on my 17.10 machine. The icon appears as
> normal running version 1.7.0.
>
> Could you attach diodon_debug.txt and env.txt files running following
> commands:
>
> killall diodon
> env | grep XDG > env.txt
> G_MESSAGES_DEBUG=all diodon > diodon_debug.txt
>
> once Diodon is running in one terminal what happens when you start
> Diodon in a second terminal again. Does the menu pop up?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1738566
>
> Title:
> diodon icon missing from top menu bar after upgrading to Gnome
>
> Status in Diodon:
> New
>
> Bug description:
> When I upgraded to Ubuntu 17.10, which uses Gnome instead of Unity,
> the diodon icon no longer appears in the taskbar/top bar/menu bar
> (whatever it's called) at the top of the screen. "ps guax" shows that
> diodon is running:
>
> me 2374 0.0 0.0 1786732 27488 tty2 Sl+ Dec13 0:13 diodon
> me 2395 0.0 0.0 362384 14876 tty2 Sl+ Dec13 0:00 diodon
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/diodon/+bug/1738566/+subscriptions
>

Revision history for this message
Oliver Sauder (sao) wrote : Re: diodon icon missing from top menu bar after upgrading to Gnome

It seems that you use classic Gnome and not the Ubuntu Gnome.

Gnome dropped support for application indicator whereas Ubuntu GNOME still supports it.

So if you wanna see the application indicator in GNOME you need to install an extension:

https://extensions.gnome.org/extension/615/appindicator-support/

Hope this works.

Revision history for this message
Chelmite (steve-kelem) wrote :

Yeah! It works again!

Thanks!
Steve

Revision history for this message
Chelmite (steve-kelem) wrote :

Is there a way to detect this and warn the user?

Revision history for this message
Oliver Sauder (sao) wrote :

I do not think so. Even if there wouldn't be a good spot to put such a warning, as there is basically no indication that Diodon is running.

A solution is to actually implement a GNOME Shell Extension.

I changed the bug accordingly - as I am not an expert on this front patches are always welcome.

summary: - diodon icon missing from top menu bar after upgrading to Gnome
+ Implement clipboard menu as GNOME Shell Extension
description: updated
Changed in diodon:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Chelmite (steve-kelem) wrote :

Seems fixed to me. Maybe add a line to the -h help or the man page (or both).

 Thanks for you help!

Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

I made a GNOME Shell extension for Diodon a little while ago. Required a plugin to Diodon exposing the api as a DBus service.

https://github.com/RedHatter/diodon-gnome-indicator
https://github.com/RedHatter/diodon-plugins

Revision history for this message
Oliver Sauder (sao) wrote :

Great!

One question though do you think it is possible to access libdiodon.so library directly from the Gnome Indicator instead of a D-Bus?

I have actually implemented the Unity Diodon Scope [0] this way. What I had to do is to simply instantiate `ZeitgeistClipboardStorage` to work with the storage. Pasting can be done by executing the clipboard uri.

[0] https://git.launchpad.net/diodon/tree/unity-scope-diodon/unity-scope-diodon.vala

Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

I originally had trouble accessing libdidon from Gjs but I've got that worked out now. Still one issue though. How do I access the Controller instance from libdiodon without being a plugin?

I could still create a new ZeitgeistClipboardStorage (like you did with the scope) but that has its own set of issues.

Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

Never mind. Using ZeitgeistClipboardStorage should work. The issues where due to the poor reading of the source.

Revision history for this message
Oliver Sauder (sao) wrote :

As an explanation directly using ZeitgeistClipboardStorage works as it then connect to the D-Bus Service of Zeitgeist.

The only thing which I think will be missing for you is to show the preferences dialogue. This we could add as a command line property though directly into Diodon.

Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

Unfortunately, Gjs is having trouble interfacing with libdiodon.so. When initializing a new class constructors are never called.

I've created a bug report here https://gitlab.gnome.org/GNOME/gjs/issues/111

Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

I was able to find a workaround for that first issue (though look at the comments, maybe we should consider moving to construct blocks in libdiodon?) but have run into another issue that is causing much more difficulty.

Gjs doesn't have any mechanism for dealing with return types of void* which means all Vala generics. I'm still trying to come up with a workaround but basically, at this time, there is no way to access items from a Gee collections in Gjs.

Bug report here https://gitlab.gnome.org/GNOME/gjs/issues/112

Oliver Sauder (sao)
Changed in diodon:
milestone: none → 1.8.0
Revision history for this message
Timothy (redhatter271-deactivatedaccount) wrote :

New diodon-gnome-indicator version using libdidodon directly. Note: requires the latest code from diodon master.

https://github.com/RedHatter/diodon-gnome-indicator

Oliver Sauder (sao)
Changed in diodon:
milestone: 1.8.0 → 1.9.0
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

What is the latest status of getting a Diodon icon up in Gnome Shell on Ubuntu 18.04?

Revision history for this message
Oliver Sauder (sao) wrote :

As mentioned above you can check it out at https://github.com/RedHatter/diodon-gnome-indicator and give us feedback how it works for you.

description: updated
Oliver Sauder (sao)
Changed in diodon:
milestone: 1.9.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.