You are not logged in.
Does increasing the sleep value help?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
No, it makes it worse. Not even a friction of sec of sound plays. Maybe play would work without any sleep value anyway for logout?
Linux Mint Xfce 21.1
Offline
Yes, I tried, play does work for logout only, without any sleep value.
Linux Mint Xfce 21.1
Offline
No, it makes it worse. Not even a friction of sec of sound plays. Maybe play would work without any sleep value anyway for logout?
I see. With a longer shutdown sound, it cuts off for me as well.
Using nohup instead seems to work better for me:
nohup playsound /usr/share/sounds/Smooth/stereo/desktop-logout.oga
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Nohup doesnt do anything for me. Putting your command in terminal, I get 'no such file or directory'.
Linux Mint Xfce 21.1
Offline
Nohup doesnt do anything for me. Putting your command in terminal, I get 'no such file or directory'.
Do you have a playsound executable? If not, you can use another play command. Note: on Arch, playsound is part of the sdl_sound package.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Would it be 'splay'?
Linux Mint Xfce 21.1
Offline
Possibly. If you run the command in a terminal window, does it play the sound? Or you could use the play command from the "sox" package.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you both, ToZ and agashamu.
With your inputs, I've been able to finally get some sound on all 4 events, through Session and Startup > Application Autostart:
Login:
canberra-gtk-play -i desktop-login
Logout:
sh -c "sleep 2 & play ~/.local/share/sounds/Smooth/stereo/desktop-logout.oga"
(it also works with no sleep time, so I'm using this instead):
sh -c "play ~/.local/share/sounds/Smooth/stereo/desktop-logout.oga"
Shutdown and Restart:
nohup play ~/.local/share/sounds/Smooth/stereo/desktop-logout.oga
Last edited by PureBlood (2023-03-28 00:05:36)
Offline
nohup play /usr/share/sounds/desktop-logout.ogg
In terminal it gives me this:
nohup: ignoring input and appending output to 'nohup.out'
Linux Mint Xfce 21.1
Offline
nohup play /usr/share/sounds/desktop-logout.ogg
In terminal it gives me this:
nohup: ignoring input and appending output to 'nohup.out'
But does the sound play?
That is just a processing message that can be suppressed via:
nohup play /usr/share/sounds/desktop-logout.ogg > /dev/null 2>&1
...or if you want want to put in an Xfce command entry field:
sh -c "nohup play /usr/share/sounds/desktop-logout.ogg > /dev/null 2>&1"
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
My command did not play in terminal.
But yours do, both of them. But even those don't play any sound at shutdown.
Linux Mint Xfce 21.1
Offline
I think something is wrong with the path of the sound file:
/usr/share/sounds/desktop-logout.ogg
Does this file exist on your system (I got this path from your post #35 above). If the file doesn't exist, point it to a correct sound file.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Yes, the file is there. Even plays if I click on it.
And like I said, you used the same path in your command/path and it did play the sound.
That is just a processing message that can be suppressed via:
nohup play /usr/share/sounds/desktop-logout.ogg > /dev/null 2>&1
Last edited by agashamu (2023-03-28 03:33:37)
Linux Mint Xfce 21.1
Offline
Well, after some restart, it's getting better...
Now this:nohup play /usr/share/sounds/desktop-logout.ogg
plays at restart, but gets cut off. It's only a 2 sec or less long sound. Should I put in some time value somehow?
Linux Mint Xfce 21.1
Offline
Can you post back the contents of /etc/systemd/logind.conf? There is a "KillUserPorcesses" setting there. If set to no, it won't kill all your processes when you log out. Note: this assumes you are using systemd.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the logind.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#HandleRebootKey=reboot
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
It looks like set to no...
Linux Mint Xfce 21.1
Offline
Does it help if you:
loginctl enable-linger
...before you restart?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Does it help if you:
loginctl enable-linger
...before you restart?
Did you mean, run it in the terminal before restart? I did, no difference. It plays maybe 3/4 of the short sound, just like before.
Linux Mint Xfce 21.1
Offline
I fired up Mint Xfce 21.1 in a VM and I'm hearing the same as you. Let me dig around a bit to see if I can figure out why this doesn't work for Mint.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
As always, thank you Toz for your patient and incredible support! What would we do here without you???
Linux Mint Xfce 21.1
Offline
[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 652.53 KiB (Peak: 685.38 KiB) ]