<div dir="ltr"><div><div><div><div>Hi all,<br><br></div>Is there a way to either set, or escalate, a SailfishOS app's privileges, at first runtime or at installation?<br><br></div>Am looking to use 2 shell commands, <span style="font-family:courier new,monospace">iwlist</span> and <span style="font-family:courier new,monospace">iwpriv</span>, in my apps, but they require root (or similar) access-rights.<br>
</div><div>(cannot quite figure out why <span style="font-family:courier new,monospace">iwlist</span> should require root access ...)<br></div><div><br></div>Have googled around, looked at QML and QT5 documentation, and best results have been discussions about an absence of configurable permissions; there may be a way via QT, but my brief search didn't reveal anything.<br>
<br></div>I could write a quick root-password requester for my apps, asking for permission every time they need to run either command, but I think that is a pretty ugly and scary solution.<br><div><div><br></div><div>Am hoping to eventually introduce at least 1 app to Harbour, so I need to locate a solution that is in line with Jolla's intents.<br>
</div><div><br><br></div><div>The 2 apps:<br><br></div><div><i>LightFish - app to control LIFX bulbs</i>.<br></div><div>Needs to run "<span style="font-family:courier new,monospace">iwpriv wlan0 setMCBCFilter 1</span>" upon startup, to ensure it can catch broadcast messages from LIFX bulbs on the local network, and preferably "<span style="font-family:courier new,monospace">iwpriv wlan0 setMCBCFilter 3</span>" when closing down.<br>
</div><div>Have talked to LIFX about changing their network protocol, but this is (naturally) a non-trivial thing to do.<br></div><div>Having a pop-up requesting root-password (or similar) every time this apps runs would make it too annoying to use, just to set your lighting level; Even more so, if having a pop-up asking for permissions when just triggering a colour-change on a lightbulb to indicate an SMS have been received.<br>
</div><div><br></div><div><i>unnamed app - app to do basic wifi scans</i><br></div><div>Would run <span style="font-family:courier new,monospace">iwlist wlan0 scan </span>at regular intervals, present results in a table.<br>
</div><div>Is simply to help me review local networks, without using my computer.<br><br></div><div><br></div><div>Any-and-all help are welcome, as I'm at a bit of dead end here.<br></div><div><br>Regards,<br>Niels Chr. Ø.<br>
</div><div>Belgium<br></div></div></div>