How can I change startup sound in KDE through config file

Questions specific to the KDE DE go here
User avatar
longtomjr
Posts: 65
Joined: 14 Mar 2013 18:07

How can I change startup sound in KDE through config file

Postby longtomjr » 18 Apr 2013 18:33

The title pretty much tells the story... It is for a project I am currently trying to do...

Does anybody know... I looked into the .kde folder's config files but couldn't found it...

Kind Regards
Longtomjr
The SolydXK Community on Google plus

Me on Google plus

remember to mark your topics [SOLVED] after it HAS been solved

User avatar
Arjen Balfoort
Site Admin
Posts: 9380
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: How can I change startup sound in KDE through config fil

Postby Arjen Balfoort » 18 Apr 2013 20:33

Don't know about a config file, but you can always overwrite /usr/share/sounds/startup.wav


SolydXK needs you!
Development | Testing | Translations

User avatar
longtomjr
Posts: 65
Joined: 14 Mar 2013 18:07

Re: How can I change startup sound in KDE through config fil

Postby longtomjr » 19 Apr 2013 05:18

Schoelje wrote:Don't know about a config file, but you can always overwrite /usr/share/sounds/startup.wav
The problem with doing that is that root access is required to change your startup sound... But thanks for the Idea. :D

Longtomjr
The SolydXK Community on Google plus

Me on Google plus

remember to mark your topics [SOLVED] after it HAS been solved

User avatar
BostonPeng
Posts: 472
Joined: 28 Feb 2013 14:35
Location: Boston, MA
Contact:

Re: How can I change startup sound in KDE through config fil

Postby BostonPeng » 26 Apr 2013 18:44

You should be able to do it through the GUI. Go to System Settings > Application and System Notifications > Applications > Event Source: KDE Workspace. Scroll down to the Login event and you can select a new login sound there.
KDE change startup sound.png
Once you select a file you can click the Play button (to the left of the field for the filename) to play the file you've selected.
J.M. Hardin

System:
ASUS X555LA notebook

User avatar
longtomjr
Posts: 65
Joined: 14 Mar 2013 18:07

Re: How can I change startup sound in KDE through config fil

Postby longtomjr » 26 Apr 2013 20:12

BostonPeng wrote:You should be able to do it through the GUI. Go to System Settings > Application and System Notifications > Applications > Event Source: KDE Workspace. Scroll down to the Login event and you can select a new login sound there.
KDE change startup sound.png
Once you select a file you can click the Play button (to the left of the field for the filename) to play the file you've selected.
thanks for the reply... I want to have a python script that loops and play a different sound every day.... Thanks anyways :)
The SolydXK Community on Google plus

Me on Google plus

remember to mark your topics [SOLVED] after it HAS been solved

User avatar
Arjen Balfoort
Site Admin
Posts: 9380
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: How can I change startup sound in KDE through config fil

Postby Arjen Balfoort » 27 Apr 2013 03:21

But you might have noticed that a file is generated when you do what BostonPeng does:
~/.kde/share/config/kde.notifyrc
With this contents (you can leave out the empty parameters):

Code: Select all

[Event/startkde]
Sound=file:///usr/share/sounds/solydxk/stereo/desktop-login.ogg
So, now make your script: check if the file exists, if not create it, if it does you might want to use the attached config parser I created (used in DDM and other applications), or use regular expressions to change the value of "Sound".
Good luck!

Example config parser (haven't tried it, but just to get you started)

Code: Select all

from config import Config
cfg = Config('~/.kde/share/config/kde.notifyrc')
cfg.setValue('Event/startkde', 'Sound', 'path_to_new_sound_file')
Unfortunately, you'll need to logout and login again to hear the new login sound.
Attachments
config.py.txt
(2.52 KiB) Downloaded 70 times


SolydXK needs you!
Development | Testing | Translations

User avatar
longtomjr
Posts: 65
Joined: 14 Mar 2013 18:07

Re: How can I change startup sound in KDE through config fil

Postby longtomjr » 27 Apr 2013 04:30

thanks for the help... This is realy more than I expected... :D

Kind Regards
Longtomjr
The SolydXK Community on Google plus

Me on Google plus

remember to mark your topics [SOLVED] after it HAS been solved

User avatar
Arjen Balfoort
Site Admin
Posts: 9380
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: How can I change startup sound in KDE through config fil

Postby Arjen Balfoort » 27 Apr 2013 04:50

You're welcome.
I had to change the setValue line: that takes three parameters, not two.


SolydXK needs you!
Development | Testing | Translations


Return to “KDE specific (SolydK)”

Who is online

Users browsing this forum: No registered users and 0 guests