We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

DBUS Command for Ambient Change [answered]

asked 2016-10-09 06:18:38 +0300

Kromonos gravatar image

Is there any dbus command for changing the ambient?
I've searched at the web, but I couldn't find anything :(

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Kromonos
close date 2016-10-09 21:47:23.211792

1 Answer

Sort by » oldest newest most voted
4

answered 2016-10-09 12:22:53 +0300

Pasko gravatar image

Hi.

I've been tinkering for a while and found out a command that works, though I don't know if it will fit your needs.

Here you have a pair of examples for two different ambiences:


[nemo@Sailfish ~]$ dbus-send --session --dest=com.jolla.ambienced --type=method_call /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/salamander/salamander.ambience"


[nemo@Sailfish ~]$ dbus-send --session --dest=com.jolla.ambienced --type=method_call /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/intense/images/ambience_intense.jpg"


Regards.

edit flag offensive delete publish link more

Comments

Works a treat!, thanks! +1

Spam Hunter ( 2016-10-09 13:11:51 +0300 )edit

Thanks for the answer. Works great. I'm trying to change to a custom ambience, but I couldn't find the .ambience file. Any idea?

Kromonos ( 2016-10-09 16:54:31 +0300 )edit
1

@Kromonos - your custom ambience are here; (devel-su required)

# /home/nemo/.local/share/system/privileged/Ambienced/ambienced.sqlite

Spam Hunter ( 2016-10-09 20:54:41 +0300 )edit

ok, that's why I couldn't find the ambience files :D
How do I read out, which string was set? Maybe I can find a way, to set custom ambiences

Kromonos ( 2016-10-09 21:12:43 +0300 )edit
1

@KromonosEDIT - I saved the ambienced.sqlite file to my PC and dropped it into Notepad, now it is in human readable form! :)

I have no idea how to interpret the sqlite file, sorry. I gave up and concentrated on /usr/share/ambience, as per a conversation here; https://together.jolla.com/question/36946/how-to-list-custom-ambiences/

Spam Hunter ( 2016-10-09 21:23:23 +0300 )edit

Question tools

Follow
1 follower

Stats

Asked: 2016-10-09 06:18:38 +0300

Seen: 478 times

Last updated: Oct 09 '16