Re: Installing "straight-live" of a theme package

2015-05-14 Thread humbert . olivier . 1
> I've been thinking at something like : su -c 
> $USERwhoLAUNCHEDtheINSTALLATIONofTHEpackage "gsettings ... .." ?

sorry, please read : su $USERwhoLAUNCHEDtheINSTALLATIONofTHEpackage -c 
"gsettings ... .."


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/29584918.1075053342.1431626336096.javamail.r...@zimbra61-e11.priv.proxad.net



Re: Installing "straight-live" of a theme package

2015-05-14 Thread humbert . olivier . 1
>> Olivier wrote:
>>
>> Hi, 
>> 
>> (Debian 8 updated here.) 
>> 
>> I've done a theme for Mate and I'm packaging it. 
>> 
>> So, I've done a package which first, installs all the files under 
>> /usr/share/theme/mytheme. 
>> This part is OK and I can choose my theme in mate. 
>> 
>> 
>> 
>> Now, I've been working (and reading a lot about) on how to install it: 
>> 1) as a default theme (then any new user will get it by default) 
>> 2) "straight-live" which mean that mate automagically will switch to it when 
>> installing the package 

> Cameron wrote:
>
> I am fairly sure you can use gschema override files for this. 

Cameron, with this, I've been able to look at an example in the desktop-base 
package and I found my way with a mix of it plus using update-alternative for 
the background image.
Now, if I'm creating a new user, the theme used (plus other few MATE GUI 
tweaks) are taken in account. The "1)" is done thanks to you, thanks for this !

The last thing I'm working on is the "straight-live" install. As said in my 
previous email, I've got some command line which are working in a terminal 
launched as a user such as :
   gsettings set org.mate.Marco.general theme 'mytheme'
   gsettings set org.mate.background picture-filename 
'/usr/share/backgrounds/mytheme/mybackgroundpicture.png'
   gsettings set org.mate.interface gtk-theme 'mytheme'
   ...
but those doesn't work when launched in a root environnement.

So I've been thinking at something : is there any way to launched a command 
line in a postinst script which could get the name of the user who asked for 
the package installation (before he/she got root) ?
I've been thinking at something like : su -c 
$USERwhoLAUNCHEDtheINSTALLATIONofTHEpackage "gsettings ... .." ?

Regards,
Olivier


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1440449038.1075044946.1431626098441.javamail.r...@zimbra61-e11.priv.proxad.net



Installing "straight-live" of a theme package

2015-05-13 Thread Cameron Norman
On May 13, 2015 6:19 AM,  wrote:
>
> Hi,
>
> (Debian 8 updated here.)
>
> I've done a theme for Mate and I'm packaging it.
>
> So, I've done a package which first, installs all the files under
/usr/share/theme/mytheme.
> This part is OK and I can choose my theme in mate.
>
>
>
> Now, I've been working (and reading a lot about) on how to install it:
> 1) as a default theme (then any new user will get it by default)
> 2) "straight-live" which mean that mate automagically will switch to it
when installing the package
>

I am fairly sure you can use gschema override files for this.

--
Cameron Norman


Installing "straight-live" of a theme package

2015-05-13 Thread humbert . olivier . 1
Hi,

(Debian 8 updated here.)

I've done a theme for Mate and I'm packaging it.

So, I've done a package which first, installs all the files under 
/usr/share/theme/mytheme.
This part is OK and I can choose my theme in mate.



Now, I've been working (and reading a lot about) on how to install it:
1) as a default theme (then any new user will get it by default)
2) "straight-live" which mean that mate automagically will switch to it when 
installing the package



For 1), I added a debian/mythemepackage.gconf-defaults in order to make it used 
by dh_gconf, with those lines (amongst some others for additionnal little 
tweakings) :
   /org/mate/Marco/general/theme 'mytheme'
   /org/mate/background/picture-filename 
'/usr/share/backgrounds/mytheme/mybackgroundpicture.png'
   /org/mate/interface/gtk-theme 'mytheme'
The package installation puts a file under 
/usr/share/gconf/defaults/10_mypackagetheme , but it doesn't work as I 
expected. I still have to manually change the theme for it to take effect even 
after a reboot or/and after creating a new user.



For 2), I've been trying in a mate-terminal (while mate is running) with those 
command lines :
   gsettings set org.mate.Marco.general theme 'mytheme'
   gsettings set org.mate.background picture-filename 
'/usr/share/backgrounds/mytheme/mybackgroundpicture.png'
   gsettings set org.mate.interface gtk-theme 'mytheme'
and it does work this way.

Then I did put those lines into a postinst script in my package, and I was 
disapointed because it doesn't work. I've been wondering why for 3 days till I 
did the test to run those command as root (since the postinst script is ran 
under root) and did find that those command lines does not work when ran as 
root as confirmed by this error message : "(process:3192): dconf-WARNING **: 
failed to commit changes to dconf: The connection is closed".


I'm a bit lost and feeling like a fish in front of a trampoline. I've been 
trying things I knew, I've been reading quite a lot about gconf/gsettings, I've 
trying to look at the debian mate theme packages sources (in the hope to find a 
solution). Any help and/or direction would be appreciated.

Thanks for reading,
Olivier


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1300822898.1070681136.1431523131223.javamail.r...@zimbra61-e11.priv.proxad.net