Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap - Clocks not available in the top bar notifications window #5

Open
mihaicicioc opened this issue Jun 15, 2023 · 5 comments
Open
Assignees

Comments

@mihaicicioc
Copy link

I'm using Ubuntu 22.04.
I uninstalled the deb version (v 41.0) and I installed the snap version (v 44.0).
I open the gnome-clocks snap app, and i add a couple of clocks from different cities (aka timezones) around the world.
On the top bar, i click on the clock, the notifications window (which contains notifications, tasks, calendar, etc...) opens, but the clocks (which i added earlier) are not shown.
The question:

  • is this the expected behaviour for now? Meaning the deb version was "integrated" with the notifications window, the snap version is not.

Other details (in case they are relevant):

$ snap version
snap    2.59.4
snapd   2.59.4
series  16
ubuntu  22.04
kernel  5.19.0-43-generic

$ snap info gnome-clocks 
name:      gnome-clocks
summary:   Simple GNOME app with stopwatch, timer, and world clock support
publisher: Canonical✓
store-url: https://snapcraft.io/gnome-clocks
contact:   https://bugs.launchpad.net/ubuntu/+source/gnome-clocks/+bugs?field.tag=snap
license:   GPL-2.0+
description: |
  GNOME Clocks is a simple application to show the time and date in multiple
  locations and set alarms or timers. A stopwatch is also included.
commands:
  - gnome-clocks
snap-id:      8NtSF2nXW6krsxbXBYydy1j985k6ZsVK
tracking:     latest/stable
refresh-date: yesterday at 12:36 EEST
channels:
  latest/stable:    44.0 2023-06-13 (459) 7MB -
  latest/candidate: 44.0 2023-05-25 (459) 7MB -
  latest/beta:      ↑                         
  latest/edge:      ↑                         
installed:          44.0            (459) 7MB -
@mihaicicioc mihaicicioc changed the title Clocks not available in the top bar notifications window Snap - Clocks not available in the top bar notifications window Jun 15, 2023
@mihaicicioc
Copy link
Author

Closing this bug because i opened one in Launchpad - https://bugs.launchpad.net/ubuntu/+source/gnome-clocks/+bug/2023974

Sorry for the "noise".

@jbicha
Copy link
Contributor

jbicha commented Jun 15, 2023

I think it's appropriate to have the bug open here also so I'm reopening this issue.

Yes, the GNOME Shell integration into the top bar clock dropdown isn't working for either the GNOME Clocks or GNOME Weather snaps.

@jbicha jbicha reopened this Jun 15, 2023
@sergio-costas
Copy link
Contributor

I've been able to make gnome clocks work by doing some monkey-patching inside gnome shell. The problem is that the snapped gnome clocks registers it .desktop file as gnome-clocks_gnome-clocks.desktop, when gnome shell expects to be able to call org.gnome.clocks.desktop. Even changing in the snapcraft.yaml file the name of the .desktop file to org.gnome.clocks.desktop doesn't work, because, during snap installation, snapd renames it to gnome-clocks_org.gnome.clocks.desktop.

I'll investigate if there is a way of setting the .desktop name to the desired one.

@sergio-costas
Copy link
Contributor

Opening a "Looking Glass" terminal (Alt+F2, then type lg and Return) and executing:

Main.panel.statusArea['dateMenu']._clocksItem._sync = function() {this._clocksApp=this._appSystem.lookup_app('gnome-clocks_gnome-clocks.desktop'); this.visible=this._clocksApp!=null; global.log("Sincronizando");}.bind(Main.panel.statusArea['dateMenu']._clocksItem)

"fixes" the problem until the next reboot. That proves that the gnome-clocks problem is there.

@sergio-costas
Copy link
Contributor

sergio-costas commented Jun 23, 2023

A temporary fix consists on running this from a command line:

    ln -s /var/lib/snapd/desktop/applications/gnome-clocks_gnome-clocks.desktop ~/.local/share/applications/org.gnome.clocks.desktop

    ln -s /var/lib/snapd/desktop/applications/gnome-weather_gnome-weather.desktop ~/.local/share/applications/org.gnome.Weather.desktop

(fixes both gnome clocks and gnome weather)

@sergio-costas sergio-costas self-assigned this Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants