Skip to content

session: Add sound events for login and logout#330

Merged
vkareh merged 1 commit intomasterfrom
canberra-sounds
Mar 18, 2026
Merged

session: Add sound events for login and logout#330
vkareh merged 1 commit intomasterfrom
canberra-sounds

Conversation

@vkareh
Copy link
Copy Markdown
Member

@vkareh vkareh commented Feb 4, 2026

Adds optional libcanberra support to play desktop-login and desktop-logout sound events during session start and end. Sound playback is controlled through the system sound theme configuration.

Fixes #328

@vkareh vkareh requested a review from a team February 4, 2026 20:53
@lukefromdc
Copy link
Copy Markdown
Member

lukefromdc commented Feb 6, 2026 via email

Adds optional libcanberra support to play desktop-login and
desktop-logout sound events during session start and end. Sound playback
is controlled through the system sound theme configuration.

Fixes #328
Copy link
Copy Markdown
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While system sounds do not work on my setup, I do have libcanberra installed and a build of this finished with no problems.
The config log showed
Libcanberra support: yes
So that part I know works. Hoping we can get another review but if it works for you I am OK with merging. The code change is simple enough.

@vkareh vkareh merged commit a5a8b10 into master Mar 18, 2026
5 checks passed
@vkareh vkareh deleted the canberra-sounds branch March 18, 2026 15:17
@AngryDavid808
Copy link
Copy Markdown

I thank you so much for the implemetation. I understand it was cosmetic mostly, but it was a change that's well-deserved for such an amazing DE. Keep up the great work ✨

Comment on lines +1555 to +1560
#ifdef HAVE_LIBCANBERRA
ca_context_play (ca_gtk_context_get (), 0,
CA_PROP_EVENT_ID, "desktop-logout",
CA_PROP_EVENT_DESCRIPTION, "Session logout",
NULL);
#endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that really the right place for this? I admittedly didn't test this, but it looks like it should rather be in GSM_MANAGER_PHASE_END_SESSION rather than GSM_MANAGER_PHASE_QUERY_END_SESSION, shouldn't it? Or is it too late then?
The thing I'm mostly "afraid" of is what happens if some apps inhibit session close?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh crap, you're right. Like if an unsaved document prevents the session from ending the sound would end up playing even if the user decides to cancel the logout at that point. I'll move that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you go: #333

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

Successfully merging this pull request may close these issues.

Add the ability for a custom shutdown sound

4 participants