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

Location of custom ambience from gallery ?

asked 2014-04-08 23:16:55 +0200

Schturman gravatar image

updated 2014-04-09 00:49:51 +0200

Kari gravatar image

Someone know where saved ambience that you applied from one of the pictures in gallery ? The default and installed ambiences located here: /usr/share/ambience

but one that you applied from gallery is not here and I can't find it....

edit retag flag offensive close delete

Comments

I am not sure, what you mean. The Ambience image is not moved/copied (according to my understanding of the Ambience mechanisms). The settings are stored in a database (file path/name has been mentioned somewhere here on Together).

Temporary files are noted in this answer: https://together.jolla.com/question/16673/howto-ambiences/?sort=oldest#17984 (you should also check all the other answers to that question).

Of help may also be: https://together.jolla.com/question/32468/wiki-location-of-configuration-etc-files-sailfish/

jgr ( 2014-04-09 00:22:20 +0200 )edit
1

@schturman perhaps it is this what you are looking for => https://together.jolla.com/question/36946/how-to-list-custom-ambiences/

Kari ( 2014-04-09 00:55:30 +0200 )edit

Thanks. What I want that apply my ambience via terminal command. I know how to do this with normal (original) ambiences when I need add this path to the command: /usr/share/ambience/NAME_OF_AMBIENCE_FOLDER/NAME_OF_AMBIENCE.ambience And I don't know how to do the same with custom ambience from gallery, because I don't know where the path to the: MY_CUSTOM_AMBIENCE.ambience saved.

Schturman ( 2014-04-09 00:59:03 +0200 )edit

Kari, thanks...Will try to search in ambienced.sqlite file.

P.S. How to open/read this files ?

Schturman ( 2014-04-09 01:02:07 +0200 )edit

@schturman: I suggest, running SQL commands against that file. However, this may not be possible from the Terminal directly.

Reading that file want solve your original problem: Activating a custom Ambience. I expect, you have to set the Ambience definitions at /desktop/jolla/theme/ using gconftool-2 (and hope that the new values are read automatically by Sailfish as soon as the UI draws some new elements on the screen; on gconftool-2 see for example http://ubuntu-tutorials.com/2008/01/10/gconftool-2-gconf-editor-from-the-shell/). Question remains, how you can work out the parameter/value combinations understood by Sailfish. Maybe thp can help you: He originally posted the gconftool-2 commands for color settings.

jgr ( 2014-04-09 01:08:54 +0200 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2014-04-09 11:40:02 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2014-04-09 11:40:02 +0200

Kaacz gravatar image

The current Ambience proposal is WRONG and must be improved. For example: in case favorite Ambience, this must be copied to user local store - benefit: possibilities to modify system Ambiences settings, user Ambiences are not lost after SD card remove. Scenarios are more complex... Current proposal is useless, Jolla improve it please. :)

edit flag offensive delete publish link more
1

answered 2014-04-09 14:38:34 +0200

matrixx gravatar image

updated 2014-04-09 14:43:02 +0200

FIRST: Note here that I do not recommend this yet since I have not investigated consequences of changing ambience this way.. it might screw up the whole ambience system..

Got it, find out the ambience file picture file name using the method I provided in the comments to your question. When you have the file name, you can do this:

dbus-send --session --print-reply --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file://home/nemo/.cache/ambienced/com/jolla/components/bgimages/92607cd6hp.jpg"

Where the name of the pic is obviously the one you queried from the ambienced database.

Apparently ambience daemon also allows changing ambience by ambience picture file name, and not only by .ambience file :)

edit flag offensive delete publish link more

Comments

Aha, changing ambience by that way, the ambience system does not recognize this as one of your custom ambiences and does not say the ambience name and ringerVolume on bottom of the homescreen, compared how it usually does if you change the ambience from the ambience UI. However, I noticed that when I used the original ambience image (and not the copy) instead, it showed the name and vol in bottom of homescreen when switching. I just don't know how to get the original path from ambienced.sqlite

matrixx ( 2014-04-09 14:52:22 +0200 )edit

Ok, got the chain figured out. After you've found out the fileId of your ambience, you can query some more: e.g. If you have fileId 55, you can ask:

SELECT fileName, directoryId FROM file WHERE id="55";

and you get filename and directory index, in my case they are: 11948906235_e3e7ed6cbc_o.jpg|15 Now you know directory id and can ask the path:

SELECT path FROM directory WHERE id="15";

and I got: /home/nemo/Downloads Just combine path and file name and you got your ambience path :)

matrixx ( 2014-04-09 15:02:06 +0200 )edit

And now just realized this wasn't even what you asked, the answer to your question was already there (custom ambiences in ambienced.sqlite). There some values like volume is rewritable, but e.g. color values are not. Also the db is accessible only with root privileges so it might be hard to run an app with user privileges and inspect / modify the db.

matrixx ( 2014-04-09 15:07:55 +0200 )edit

WOW! Thanks for your workaround ! It's too much complicated for me now, maybe later I will try to add it to https://openrepos.net/content/schturman/auto-ambience-changer And it's a really answer for my question :)

Schturman ( 2014-04-10 01:13:29 +0200 )edit

@schturman Well then, I'm glad I could help :)

Edit: You might want to also accept the answer, but I still keep you posted if I find some more simple way to do the same stuff.

matrixx ( 2014-04-10 10:50:44 +0200 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2014-04-08 23:16:55 +0200

Seen: 1,451 times

Last updated: Apr 09 '14