Re: Help needed with systemd script

2013-12-14 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Dec 14, 2013 at 04:13:21PM +0100, Alec Leamas wrote: > On 2013-12-14 15:31, Mattia Verga wrote: > >This is the log output: > >+ xhost +SI:localuser:boinc > >xhost: unable to open display "" > >+ sleep 1 > > > I. e., there's no DISPLAY defined when running the systemd script. > I'm not sure

Re: Help needed with systemd script

2013-12-14 Thread Alec Leamas
On 2013-12-14 15:31, Mattia Verga wrote: Il 14/12/2013 15:12, Alec Leamas ha scritto: I really wonder if $DISPLAY is defined within systemd's execution context. IMHO, it shouldn't E. g., try adding exec &> /tmp/boincxhost.log set -x at the top of your script. That should give debug o

Re: Help needed with systemd script

2013-12-14 Thread Mattia Verga
This is the log outpu: + xhost +SI:localuser:boinc xhost: unable to open display "" + sleep 1 Il 14/12/2013 15:12, Alec Leamas ha scritto: I really wonder if $DISPLAY is defined within systemd's execution context. IMHO, it shouldn't E. g., try adding exec &> /tmp/boincxhost.log set -

Re: Help needed with systemd script

2013-12-14 Thread Mattia Verga
I tried to run without the "sleep" command, it fails: # systemctl start boinc-client.service Job for boinc-client.service failed. See 'systemctl status boinc-client.service' and 'journalctl -xn' for details. [root@deneb marvin]# systemctl status boinc-client.service --full boinc-client.service -

Re: Help needed with systemd script

2013-12-14 Thread Dridi Boukelmoune
On Sat, Dec 14, 2013 at 3:00 PM, Mattia Verga wrote: > Il 14/12/2013 12:55, Dridi Boukelmoune ha scritto: > > Hi, > > On Sat, Dec 14, 2013 at 12:44 PM, Mattia Verga > wrote: > > Hello, > I'm trying to give a user access rights to X with xhost command. > I've created a script named '/usr/bin/boinc

Re: Help needed with systemd script

2013-12-14 Thread Alec Leamas
On 2013-12-14 15:00, Mattia Verga wrote: Il 14/12/2013 12:55, Dridi Boukelmoune ha scritto: Hi, On Sat, Dec 14, 2013 at 12:44 PM, Mattia Verga 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

Re: Help needed with systemd script

2013-12-14 Thread Mattia Verga
Il 14/12/2013 12:55, Dridi Boukelmoune ha scritto: Hi, On Sat, Dec 14, 2013 at 12:44 PM, Mattia Verga 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 &>

Re: Help needed with systemd script

2013-12-14 Thread Dridi Boukelmoune
Hi, On Sat, Dec 14, 2013 at 12:44 PM, Mattia Verga 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 no

Help needed with systemd script

2013-12-14 Thread Mattia Verga
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/ If I run it from command line it works fine. But I want to run from a systemd unit at