<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<blockquote
cite="mid:mailman.87846.1459851176.22121.plasma-devel@kde.org"
type="cite">
<pre wrap=""><div class="moz-txt-sig">Date: Tue, 5 Apr 2016 12:12:28 +0200
From: Aleix Pol <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:aleixpol@kde.org"><aleixpol@kde.org></a>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:plasma-devel@kde.org">"plasma-devel@kde.org"</a> <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:plasma-devel@kde.org"><plasma-devel@kde.org></a>
Subject: Re: Writing to plasma-desktop-appletsrc with init scripts.
Message-ID:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:CACcA1RpKPeeFMPoodn0ZX6POsPJbWsAxjAs1Z=H42TdSws_C5w@mail.gmail.com"><CACcA1RpKPeeFMPoodn0ZX6POsPJbWsAxjAs1Z=H42TdSws_C5w@mail.gmail.com></a>
Content-Type: text/plain; charset=UTF-8
On Thu, Mar 31, 2016 at 11:17 PM, Chris Topel <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ctopel@advocap.org"><ctopel@advocap.org></a> wrote:
</div></pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">> </span>Hey all,
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>I'm having a bit of an issue trying to make something work in my
<span class="moz-txt-citetags">> </span>environment.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>Basically, I want widgets to be disabled by default. But if a user chooses
<span class="moz-txt-citetags">> </span>to do so, they can unlock the widgets and make their changes. Then, on
<span class="moz-txt-citetags">> </span>logout, the widget will automatically be locked again for them so they don't
<span class="moz-txt-citetags">> </span>accidentally remove it the next day.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>So to do that I'd like to use init scripts
<span class="moz-txt-citetags">> </span>(/usr/share/kde4/apps/plasma-desktop/init/00-defaultLayout.js) to pass
<span class="moz-txt-citetags">> </span>something directly into plasma-desktop-appletsrc when a user first logs in.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>Specifically, I want to add this to the bottom of the file:
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>[General]
<span class="moz-txt-citetags">> </span>immutability[$i]=2
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>This will lock widgets by default but will allow the users to unlock it
<span class="moz-txt-citetags">> </span>(immutability=1) temporarily to add/move widgets. Then the next time they
<span class="moz-txt-citetags">> </span>log back in it will be locked (immutability=2) again for them.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>So, is there some way I can easily easily set immutability[$i]=2 under the
<span class="moz-txt-citetags">> </span>[General] section of plasma-desktop-appletsrc?
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>Thanks in advance!
</pre>
</blockquote>
<pre wrap="">Shouldn't it be the same making the containment itself immutable?
Aleix</pre>
</blockquote>
Aleix, <br>
<br>
I suppose I could achieve something similar by making the "General"
containment immutable. Example:<br>
<blockquote>[General][$i]<br>
immutability=2<br>
</blockquote>
However, the only thing I'm sure that I need to be immutable under
General is the "2" value for immutability. I'm not sure what else
gets written to that containment over time and I don't have an
urgent need to lock any of it down. <br>
<br>
Really all I'm trying to do is have widgets locked when a user logs
out. So far, setting immutability[$i]=2 is the easiest way I've
found to accomplish that. <br>
<br>
If someone has another idea, I'm open to suggestions. <br>
</body>
</html>