Score:1

Is there any way of setting a custom startup and shutdown sound?

ru flag

I'm on Ubuntu 20.04.3 LTS with GNOME Desktop. I was wondering if you can have a custom sound play (the default one is nice, but I'd rather have a custom one) when you log into Ubuntu, as well as when you log out.

I've gotten a nostalgia rush from when I used to use Windows XP in 2008-ish on a Dell Optiflex with the Royale Noir theme for log on and the Windows Vista Beta 2 for logout, and genuinely want to know if you can do this.

All related questions are mostly 8 years old and have Ubuntu 12.04/14.04.

raj avatar
cn flag
raj
Probably you have to create your own sound theme. This answer may be helpful: https://askubuntu.com/questions/1139850/custom-sound-theme-for-ubuntu-19-04 . I guess it is not necessary to create and install a package like described in that answer, it is enough just to create a folder `/usr/share/sounds/MyTheme` and put all the required files there. Then, in the GNOME Tweak tool, select "MyTheme" as your sound theme.
Score:2

There are several ways of doing that, depending on the moment you want the sound to play.

A possible command to play a sound is mplayer <file>.

You could setup a cron job that plays the sound upon boot, for instance, and that will work the same for all users.

$ sudo crontab -e

to edit the crontab file, and add a line with

@reboot mplayer <file>

For the complete set startup/shutdown/reboot:

  1. For pre-systemd, use this.
  2. For systemd, use this, this, and check other linked sources.

Related

  1. https://smallbusiness.chron.com/run-command-startup-linux-27796.html
Derech_Chaifa avatar
ru flag
Thank you for the help, but I genuinely need it simplified, as the Terminal is like a forest for me, If I get lost, I'm just gonna CTRL+D out of there as fast as possible until it closes or returns me to a familiar spot. If you just tell me, in the simplest form possible how to do it, I'd be happy.
sancho.s ReinstateMonicaCellio avatar
pl flag
@Derech_Chaifa - That is extremely simple. If terminal itches you, you could try a web search for "gui cron editor" or the like (and I guess you would be spending more time than with the terminal!).
Derech_Chaifa avatar
ru flag
Thank you, but I guess I'll just try and figure it out with a much more professional friend who also uses Linux exclusively. But unlike him, I'm actually waiting in another NVMe SSD for my computer to install Windows 10 onto (or Windows 11, because I'm ordering the SSD from China so long shipping time :P)
sancho.s ReinstateMonicaCellio avatar
@Derech_Chaifa - Having someone online to assist you is always much more convenient.
Score:1
in flag

I hope you're doing well.

I see in one of your comments that you're not too keen on using the terminal, but this here link has all the commands required to set a custom shutdown sound. Take a look at the highest upvoted answer, you can copy and paste this into your terminal.

Even though this comment is old, like you have mentioned in your question, it should work.

Bare in mind, as you may know, the usual copy/paste shortcut is CTRL+C & CTRL+V. This will not work in terminal; instead, use CTRL+SHIFT+C and CTRL+SHIFT+V for copy and paste respectively.

If you look at this part of the given link:

here's the content of the script:

## play shutdown sound
/usr/bin/mpg123 /path/to/your/shutdown.mp3

The /path/to/your/shutdown.mp3 is the pathname to wherever your custom sound file is stored. You can find this pathname through File Manager > Right Click on File > Properties.

If you have any trouble with this, I can link my Discord and help you set it up.

Yours, Bubbles.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.