Re: No protocol specified error



Dear Emmanuele,

Sorry sir... NO NO NO. A Big NO.
I have already spent four years for developing the application I am
working. If I have to adopt that approach, I have to spend another one year
which I can't afford
Any ways, xhost +si:localuser:root solved my problem.



Thanks & Regards
--
Lokesh Chakka,
Mobile: 9731023458

On Sat, Nov 4, 2017 at 6:08 PM, Emmanuele Bassi <ebassi gmail com> wrote:

On 4 November 2017 at 06:08, Lokesh Chakka
<lvenkatakumarchakka gmail com> wrote:
Dear Felipe,

I have refereed the link. As the application I am writing needs root
privileges, I must use sudo ./a.out. No other option.

Of *course* there are other options for you: this is software
development, not surgery.

The appropriate course of action, as Felipe outlined, is:

 - split the business logic that requires administrator privileges of
your application from the GUI bits
 - move that business into a daemon listening on the system bus and
exposing a DBus interface
 - use polkit to deal with the privilege escalation, and write a small
policy file
 - have the GUI call into the DBus interface on the system bus

Alternatively:

 - do not write a GUI application
 - require running under X instead of Wayland, and assume
responsibility for the potential security side effects; not that
running applications under X as root is recommended, either

Running GUI applications as administrator means that your exposing
yours and your users' data to a massive, unaudited code base, that may
or may not open random shared modules — like input methods, image
loaders — and parse multiple files from random locations.

It's more secure to start from a completely sandboxed environment and
gradually opening it up on demand, than running a completely open
environment and then closing it down.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]