Re: Help needed with systemd script

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

 



Hi,

On Sat, Dec 14, 2013 at 12:44 PM, Mattia Verga <mattia.verga@xxxxxxxxxx> wrote:
> Hello,
> I'm trying to give a user access rights to X with xhost command.
> I've created a script named '/usr/bin/boincxhost' (chmod 555) like this:
>
> #!/bin/sh
> xhost +SI:localuser:boinc &> /dev/null
> exit 0

"exit 0" will hide a non-zero exit status of the previous command.

In this case I'm not sure what's happening, but if you're running the
command in background, and don't wait for it to complete, you may be
facing a race condition.

> If I run it from command line it works fine.
> But I want to run from a systemd unit at startup. So I added this line to
> the unit file:
>
> ExecStartPre=/usr/bin/boincxhost
>
> The service starts without errors, but I cannot find the user to have rights
> for accessing X. Maybe someone can tell me where I'm wrong in the procedure?
> Or is there any other way to give that user access to X? I already tried to
> add the user to the 'video' group, but Boinc refuse to see the GPU
> available.
> Thanks for any hint.
>
> Mattia
>
> --
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux