[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] gpsd always starting in foregound (a systemd solution)
From: |
Chris Kuethe |
Subject: |
Re: [gpsd-users] gpsd always starting in foregound (a systemd solution) |
Date: |
Thu, 12 May 2016 10:38:52 -0700 |
It appears you're running "service xyz" as non-root, and the system is
trying to be helpful. I think it's pol-kit that generates the actual
prompt, either in a gui or a terminal as appropriate. If you run "sudo
service xyz" you won't be prompted to authenticate because root is
authorized to do those things.
yeah. i hate systemd too.
On Thu, May 12, 2016 at 9:34 AM, Eric S. Raymond <address@hidden> wrote:
> Moe <address@hidden>:
>> As others have noted the -N flag accompanied all gpsd starts regardless of
>> the contents of /etc/default/gpsd file. This was tracked down to:
>>
>> # cat /lib/systemd/system/gpsd.service
>>
>> [Unit]
>> Description=GPS (Global Positioning System) Daemon
>> Requires=gpsd.socket
>> # Needed with chrony SOCK refclock
>> After=chronyd.service
>>
>> [Service]
>> EnvironmentFile=-/etc/default/gpsd
>> ExecStart=/usr/sbin/gpsd -N $GPSD_OPTIONS $DEVICES <-----right in there
>>
>> [Install]
>> WantedBy=multi-user.target
>> Also=gpsd.socket
>>
>> If the flag is removed, and I reloaded the things that make systemd work, I
>> could turn off the gpsd as before, but not restart it...if I rebooted, I get
>> nothing. Sure it said all was honky dory, or spit back a cryptic confession
>> something of which I had no clue.
>>
>> The 'net was of little help. The spotty trail of tears runs a few years
>> back, but with brief exchanges of bad advice and dead ends.
>>
>> So this is my brief exchange of bad advice.
>>
>> Add two lines
>>
>> Type=forking
>> PIDfile=/var/run/gpsd.pid
>>
>> so the file now looks like:
>>
>> [Unit]
>> Description=GPS (Global Positioning System) Daemon
>> Requires=gpsd.socket
>> # Needed with chrony SOCK refclock
>> After=chronyd.service
>>
>> [Service]
>> Type=forking
>> PIDfile=/var/run/gpsd.pid
>> EnvironmentFile=-/etc/default/gpsd
>> ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES
>>
>> [Install]
>> WantedBy=multi-user.target
>> Also=gpsd.socket
>>
>> ##
>> gpsd now is controlable via
>>
>> service gpsd stop
>> service gpsd start
>> service gpsd restart
>>
>> There are the irritating pop up authentications, but it works for me, and
>> the contents of /etc/default/gpsd are no longer glossed over.
>
> These changes look good (I'm just learning systemd now). Who is generating the
> popups, when and why?
> --
> <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
>
--
GDB has a 'break' feature; why doesn't it have 'fix' too?