linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.5k stars 732 forks source link

Cinnamon calendar applet does not show any event #10497

Open kelebek333 opened 2 years ago

kelebek333 commented 2 years ago
 * Cinnamon 5.2.2+una
 * Distribution - (Linux Mint 20.3)
 * Nvidia
 * 64 bit

Issue

Cinnamon calendar applet does not show any events. I guess, the problem is related with cinnamon-calendar-server.py . I'm getting following error when I try to run manually.

Traceback (most recent call last):
  File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 17, in <module>
    gi.require_version('Cinnamon', '0.1')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Cinnamon not available
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_libexec_cinnamon_cinnamon-calendar-server.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 17, in <module>
    gi.require_version('Cinnamon', '0.1')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Cinnamon not available
mtwebster commented 2 years ago

It needs to run as /usr/bin/cinnamon-calendar-server (though it's normally activated automatically by the calendar applet).

Do you have accounts linked with gnome-online-accounts?

kelebek333 commented 2 years ago

I don't use online accounts. I use thunderbird and added that extension. https://github.com/balbusm/xul-ext-eds-calendar Also I added a lot of events on Evolution for testing.

I have tried /usr/bin/cinnamon-calendar-server command. But I was getting following error. Therefore, I tried to run cinnamon-calendar-server.py file and gave the above error.

(cinnamon-calendar-server.py:113268): dbind-WARNING **: 20:49:43.359: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

mtwebster commented 2 years ago

That warning is likely unrelated.

For now try testing with gnome-calendar (you don't need to link accounts, it should just use a local store). This is probably the simplest test to make sure cinnamon and its calendar server are interacting.

I'll check out that extension when I get a chance.

kelebek333 commented 2 years ago

I tried with Gnome Calender. I added a event for testing. But did not show that on calendar applet.

gnome-calendar-1

Then I activate online account and the and the event was immediately shown on applet.

gnome-calendar-2

Is the online accounts need to be activated to use calendar events on applet?

mtwebster commented 2 years ago

I think I know - I'm using the goa service to tell me if accounts are added or removed, since our calendar server usually only wakes up when the applet is opened. I'll have to re-think that.

To prove this, can you replace the contents of /usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js with this: https://gist.github.com/mtwebster/0bbcb81541666a556c11cece71363f58

This will make the applet assume there are accounts regardless of what GOA reports.

Thanks

kelebek333 commented 2 years ago

To prove this, can you replace the contents of /usr/share/cinnamon/applets/calendar@cinnamon.org/eventView.js with this: https://gist.github.com/mtwebster/0bbcb81541666a556c11cece71363f58

This solved issue for Gnome Calender without Online Accounts. But the issue continues for Evolution and Thunderbird. Meanwhile, I thank you very much for your interest.

mtwebster commented 2 years ago

Okay look into it, thanks.

btw, mint-themes has much better support for the calendar as of 1.9.1

mtwebster commented 2 years ago

The no-calendars issue should be addressed by this: 62276d6fde43b3ad2cc8f3f91

I checked out the "EDS Calendar Integration" add-on and it seemed to work fine, until I started messing with gnome-calendar. Gnome-calendar looks like it's controlling e-d-s directly when you enable/disable calendars there (including ones from thunderbird).

So, even if t-bird thinks a calendar is visible, if it's unchecked in gnome-calendar, it won't be visible to cinnamon either. I'm not sure if this is what's causing your remaining issue or not, but make sure any thunderbird calendars are also enabled in gnome-calendar.

We'll try and get an update tagged tomorrow that will include the above changes.

kelebek333 commented 2 years ago

@mtwebster Thanks a lot, EDS Calendar Integration for Thunderbird is working after latest commit.

SKEdmis commented 2 years ago

I'm not seeing events in the calendar applet. Installed the 20.3 beta a couple of hours ago. Installed Evolution and Evolution EWS to connect to outlook.com. Using goa to connect to MS Exchange. Gnome Calendar and Evolution both show my calendars but the applet does not. I'm really grateful to have this feature but I'm sure there's something I'm overlooking or don't understand.

mtwebster commented 2 years ago

Hi, can you try a couple of things for me:

open a terminal and run:

cinnamon-calendar-server hold

If it discovers any calendars, it will print their names - if it does this, they should display in the applet (unless you have it disabled in applet settings).

If nothing shows up, then cinnamon isn't finding any visible calendars. As I noted a couple of posts above, turning off calendars in gnome-calendar actually turns them off for any clients of evolution-data-server (including the applet). That may not be the case here, I'm just mentioning it to be thorough.

If you do get a list of calendars from that command, leave it running and open the applet, then check ~/.xsession-errors to see if there are any interesting messages from cinnamon.

Does the applet just show the calendar, or is it showing the event list as well?

SKEdmis commented 2 years ago

Thanks, Michael, for the quick reply. Both of my calendars are listed after running the command. Here's the output after opening the applet:

steve@LM8910:~$ cinnamon-calendar-server hold idle exit disabled... Discovered calendar: Calendar Discovered calendar: Moon/astro SET TIME: from 2021-11-28T00:00:00-06 to 2022-01-08T23:59:59-06 Traceback (most recent call last): File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 284, in view_objects_added self.handle_new_or_modified_objects(view, objects, calendar) File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 339, in handle_new_or_modified_objects ical_time_modified = mod_prop.get_lastmodified() AttributeError: 'NoneType' object has no attribute 'get_lastmodified' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook with os.fdopen(os.open(pr_filename, FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_libexec_cinnamon_cinnamon-calendar-server.py.1000.crash'

Original exception was: Traceback (most recent call last): File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 284, in view_objects_added self.handle_new_or_modified_objects(view, objects, calendar) File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 339, in handle_new_or_modified_objects ical_time_modified = mod_prop.get_lastmodified() AttributeError: 'NoneType' object has no attribute 'get_lastmodified' Traceback (most recent call last): File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 284, in view_objects_added self.handle_new_or_modified_objects(view, objects, calendar) File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 339, in handle_new_or_modified_objects ical_time_modified = mod_prop.get_lastmodified() AttributeError: 'NoneType' object has no attribute 'get_lastmodified' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook with os.fdopen(os.open(pr_filename, FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_libexec_cinnamon_cinnamon-calendar-server.py.1000.crash'

Original exception was: Traceback (most recent call last): File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 284, in view_objects_added self.handle_new_or_modified_objects(view, objects, calendar) File "/usr/libexec/cinnamon/cinnamon-calendar-server.py", line 339, in handle_new_or_modified_objects ical_time_modified = mod_prop.get_lastmodified() AttributeError: 'NoneType' object has no attribute 'get_lastmodified'

SKEdmis commented 2 years ago

Not sure what you mean with the question "Does the applet just show the calendar, or is it showing the event list as well?" The applet displays the date and "No events" even though there should be events. As mentioned, Gnome Calendar and Evolution both show events as expected. Here's the content of .xsession-errors:

dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus dbus-update-activation-environment: setting DISPLAY=:0 dbus-update-activation-environment: setting XAUTHORITY=/home/steve/.Xauthority dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge dbus-update-activation-environment: setting QT_ACCESSIBILITY=1 dbus-update-activation-environment: setting SHELL=/bin/bash dbus-update-activation-environment: setting QT_ACCESSIBILITY=1 dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 dbus-update-activation-environment: setting LANGUAGE=en_US dbus-update-activation-environment: setting DESKTOP_SESSION=cinnamon dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge dbus-update-activation-environment: setting PWD=/home/steve dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=cinnamon dbus-update-activation-environment: setting LOGNAME=steve dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11 dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 dbus-update-activation-environment: setting XAUTHORITY=/home/steve/.Xauthority dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/steve dbus-update-activation-environment: setting GDM_LANG=en_US dbus-update-activation-environment: setting HOME=/home/steve dbus-update-activation-environment: setting IM_CONFIG_PHASE=1 dbus-update-activation-environment: setting LANG=en_US.UTF-8 dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 dbus-update-activation-environment: setting XDG_SESSION_CLASS=user dbus-update-activation-environment: setting USER=steve dbus-update-activation-environment: setting DISPLAY=:0 dbus-update-activation-environment: setting SHLVL=1 dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000 dbus-update-activation-environment: setting GTK3_MODULES=xapp-gtk3-module dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/home/steve/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin dbus-update-activation-environment: setting GDMSESSION=cinnamon dbus-update-activation-environment: setting DBUS_SESSION_BUSADDRESS=unix:path=/run/user/1000/bus dbus-update-activation-environment: setting =/usr/bin/dbus-update-activation-environment Message: 03:09:58.453: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory Message: 03:09:58.453: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory Message: 03:09:58.455: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory [cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found [cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found Message: 03:09:59.724: Existing monitor config (/home/steve/.config/cinnamon-monitors.xml) not found at startup. Looking for legacy configuration (monitors.xml) Cjs-Message: 03:10:00.592: Profiler is disabled. Not setting up signals. Clutter-Message: 03:10:00.683: Sync method: PRESENTATION TIME

(nm-applet:1471): libnotify-WARNING **: 03:10:00.891: Failed to connect to proxy

(nm-applet:1471): nm-applet-WARNING **: 03:10:00.893: Failed to show notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files Cjs-Message: 03:10:00.946: JS LOG: About to start Cinnamon

(cinnamon:1423): Cjs-WARNING : 03:10:00.948: Some code accessed the property 'ScreenshotService' on the module 'screenshot'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway. Cjs-Message: 03:10:01.031: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 82 ms Cjs-Message: 03:10:01.036: JS LOG: [LookingGlass/info] loading user theme: /usr/share/themes/Mint-Y-Dark-Aqua/cinnamon/cinnamon.css Cjs-Message: 03:10:01.050: JS LOG: [LookingGlass/info] added icon directory: /usr/share/themes/Mint-Y-Dark-Aqua/cinnamon cinnamon-session[1073]: WARNING: t+2.71319s: Detected that screensaver has appeared on the bus Cjs-Message: 03:10:01.158: JS LOG: [LookingGlass/info] loaded at Sun Dec 12 2021 03:10:01 GMT-0600 (Central Standard Time) Cjs-Message: 03:10:01.158: JS LOG: Cinnamon started at Sun Dec 12 2021 03:10:01 GMT-0600 (Central Standard Time) Cjs-Message: 03:10:01.169: JS LOG: [LookingGlass/info] ExtensionSystem started in 1 ms Cjs-Message: 03:10:01.169: JS LOG: [LookingGlass/info] NaNms Cjs-Message: 03:10:01.170: JS LOG: [LookingGlass/info] SearchProviderManager started in 1 ms openGL version 4.6 detected (GL3 Cogl Driver) MetaSyncRing disabled: couldn't find required GL extensions, or the minimum safe openGL version was not met Cjs-Message: 03:10:01.223: JS LOG: [LookingGlass/info] Loaded applet show-desktop@cinnamon.org in 29 ms Cjs-Message: 03:10:01.226: JS LOG: [LookingGlass/info] Role locked: tray Cjs-Message: 03:10:01.228: JS LOG: [LookingGlass/info] Loaded applet systray@cinnamon.org in 5 ms St-Message: 03:10:01.230: cogl npot texture sizes SUPPORTED Cjs-Message: 03:10:01.236: JS LOG: [LookingGlass/info] Loaded applet removable-drives@cinnamon.org in 8 ms Message: 03:10:01.241: nemo-desktop: session is cinnamon, establishing proxy Cjs-Message: 03:10:01.241: JS LOG: [LookingGlass/info] Loaded applet favorites@cinnamon.org in 5 ms Cjs-Message: 03:10:01.251: JS LOG: [LookingGlass/info] Role locked: notifications Cjs-Message: 03:10:01.259: JS LOG: [LookingGlass/error] true Cjs-Message: 03:10:01.259: JS LOG: [LookingGlass/info] Loaded applet notifications@cinnamon.org in 18 ms Cjs-Message: 03:10:01.269: JS LOG: [LookingGlass/info] Loaded applet printers@cinnamon.org in 10 ms Cjs-Message: 03:10:01.298: JS LOG: [LookingGlass/info] Loaded applet calendar@cinnamon.org in 29 ms Cjs-Message: 03:10:01.314: JS LOG: [LookingGlass/info] Loaded applet keyboard@cinnamon.org in 16 ms Cjs-Message: 03:10:01.317: JS LOG: [LookingGlass/info] Loaded applet xapp-status@cinnamon.org in 3 ms Cjs-Message: 03:10:01.343: JS LOG: [LookingGlass/info] Loaded applet power@cinnamon.org in 26 ms Cjs-Message: 03:10:01.351: JS LOG: [LookingGlass/info] Role locked: panellauncher Cjs-Message: 03:10:01.364: JS LOG: [LookingGlass/info] Loaded applet grouped-window-list@cinnamon.org in 21 ms Cjs-Message: 03:10:01.370: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: nm-applet (:1.82/org/x/StatusIcon/Icon)

(csd-power:1258): CRITICAL : 03:10:01.398: abs_to_percentage: assertion 'max > min' failed Cjs-Message: 03:10:01.417: JS LOG: [LookingGlass/info] Loaded applet sound@cinnamon.org in 53 ms Cjs-Message: 03:10:01.453: JS LOG: [LookingGlass/info] Hiding XAppStatusIcon (we have an applet): nm-applet (:1.82/org/x/StatusIcon/Icon) Cjs-Message: 03:10:01.461: JS LOG: [LookingGlass/info] Loaded applet network@cinnamon.org in 44 ms Cjs-Message: 03:10:01.557: JS LOG: [LookingGlass/info] Loaded applet menu@cinnamon.org in 96 ms Cjs-Message: 03:10:01.558: JS LOG: [LookingGlass/info] AppletManager started in 400 ms Cjs-Message: 03:10:01.560: JS LOG: [LookingGlass/info] Cinnamon took 614 ms to start Cjs-Message: 03:10:01.579: JS LOG: Unknown network device type, is 14 cinnamon-session[1073]: WARNING: t+12.71403s: Detected that screensaver has left the bus Cjs-Message: 03:10:20.990: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: mintUpdate.py (:1.130/org/x/StatusIcon/Icon) Cjs-Message: 03:10:43.678: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: mintreport (:1.146/org/x/StatusIcon/Icon) Cjs-Message: 03:14:49.591: JS LOG: [LookingGlass/info] Reloading applet: calendar@cinnamon.org/13 Cjs-Message: 03:14:49.660: JS LOG: [LookingGlass/info] Loaded applet calendar@cinnamon.org in 45 ms Cjs-Message: 03:21:56.368: JS LOG: pushModal: invocation of begin_modal failed

SKEdmis commented 2 years ago

Just to be clear, here's screenshot of the open applet:

image

mtwebster commented 2 years ago

@SKEdmis can you try something for me:

Download https://github.com/linuxmint/cinnamon/raw/master/calendar-server/cinnamon-calendar-server.py and replace your system copy.

(skip to the bottom if this is trivial for you - sorry)

Copy it over the current system file:

sudo cp cinnamon-calendar-server.py /usr/libexec/cinnamon

It should remain executable, but check:

ls -la /usr/libexec/cinnamon

If it's not, then:

sudo chmod +x /usr/lib/cinnamon/cinnamon-calendar-server.py

Once that's done, try starting the server again, using the same steps as before, then open the applet.

Thanks

SKEdmis commented 2 years ago

Not trivial at all. I'm new at this but trying to learn. This is the first time I've attempted to help with a beta. Thank you for your gentle approach.

Replacing cinnamon-calendar-server.py worked! Is there something else you'd like me to do? If you've got the patience to work with my inexperience I'll be glad to help.

SKEdmis commented 2 years ago

Michael, I've noticed a possible issue now that the applet displays events for me. I have an event that's 7 days long and reoccurs every other week. It's a work schedule where I'm one week on and one week off. Gnome Calendar and Evolution display it correctly covering the 7 days but the applet only displays it on the first day it occurs.

FWIW the event is an all day event.

mtwebster commented 2 years ago

@SKEdmis, can I get your feedback on multi-day handling?

Similar to before... Download https://raw.githubusercontent.com/linuxmint/cinnamon/bb28789e6630195c6864c0a5e068526d81b5526c/files/usr/share/cinnamon/applets/calendar%40cinnamon.org/eventView.js

Copy it over the current system file:

sudo cp eventView.js /usr/share/cinnamon/applets/calendar@cinnamon.org

Then restart cinnamon - alt-F2 then r and enter.

I'm still working out how best to handle these, as we can't really mimic what 'full' calendar apps do to represent multi-day events.

Thanks

SKEdmis commented 2 years ago

Thanks again, Michael. Replacing eventView.js worked.

Steve

gbc921 commented 2 years ago

Hi! I have Arch Linux running Cinnamon and got no events as well. But I think I may be missing some dependencies.

Thanks

mtwebster commented 2 years ago

You need evolution-data-server, as that's what provides the service Cinnamon connects to. You don't need the evolution app itself.

For google, you'll have to log in to your account with Online Accounts and accept the permissions, etc.. this connects your account with e-d-s. Once this is done, events should start appearing in the Cinnamon calendar.

Diamondemon commented 2 years ago

Hello I have been having the same issue for a couple months.

I am on Manjaro 5.17 with Cinnamon 5.2.7 as a desktop environment. I have evolution-data-server installed. I use the "Online Accounts" app of Cinnamon to configure my google account. I use both gnome-calendar and the cinnamon-calendar applet, and none of them shows events to me.

Sometimes it takes up to 20 minutes for the events to show, sometimes it never does.

$ cinnamon-calendar-server hold shows that it sees all my calendars, which makes me wonder why it takes so much time downloading them.

Do you have any idea?