Re: [systemd-devel] vncserver@.service

2013-01-29 Thread Reindl Harald


Am 26.01.2013 11:19, schrieb Mantas Mikulėnas:
 On Sat, Jan 26, 2013 at 7:05 AM, Ian Pilcher arequip...@gmail.com wrote:
 On 01/23/2013 08:59 AM, Reindl Harald wrote:
 and why do you not use the User= and Group= options?

 ISTR reading that runuser was added because User= and Group= don't
 actually log in, which is required by vncserver.
 
 What do you mean by log in here? systemd will open a PAM session if
 you set PAMName=.

the much bigger problem here is that with xvnc started with systemd
there is no environment like .bashrc and bash-completion loaded which
is frustrating my co-developer currently because he wants to use his
office-workstation remote via ssh-tunnel and vncserver like sitting
in front of



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] vncserver@.service

2013-01-26 Thread Mantas Mikulėnas
On Sat, Jan 26, 2013 at 7:05 AM, Ian Pilcher arequip...@gmail.com wrote:
 On 01/23/2013 08:59 AM, Reindl Harald wrote:
 and why do you not use the User= and Group= options?

 ISTR reading that runuser was added because User= and Group= don't
 actually log in, which is required by vncserver.

What do you mean by log in here? systemd will open a PAM session if
you set PAMName=.

--
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] vncserver@.service

2013-01-25 Thread Ian Pilcher
On 01/23/2013 08:59 AM, Reindl Harald wrote:
 and why do you not use the User= and Group= options?

ISTR reading that runuser was added because User= and Group= don't
actually log in, which is required by vncserver.

-- 

Ian Pilcher arequip...@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] vncserver@.service

2013-01-23 Thread Antonio
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Am 23.01.2013 16:29, schrieb Antonio:
 and why do you not use the User= and Group= options?
 
 Because they are not required by instructions.

 as also runuser, but one is native systemd the other not

runuser is already written in the file.

 However I have just tried but permission error remains.
 
 ... User=antonio Group=antonio ...
 
 what about NOT reply offlist and provide informations like the
 output of systemctl status as also the current content of the
 unit-file?

I'm replying even on systemd-devel list.
I'm working with unit-file on Fedora ARM on Raspberry but I'm also
replying you by Fedora on notebook.

However: http://www.fpaste.org/NA2M/






- -- 
Antonio Trande
Fedora Ambassador
Fedora italian translation group
Blogger

mail: mailto:sagit...@fedoraproject.org
Homepage: http://www.fedora-os.org
Sip Address : sip:sagitter AT ekiga.net
Jabber :sagitter AT jabber.org
GPG Key: D400D6C4
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRAAejAAoJED2vIvfUANbE22QP/RfFooZNmAQe3QAyha/WzB/e
KWyDJpkk46H9egBWm3Z+vQ9Nrxstn422+y3IKHzxfMIuEjQaUMG2ycypx55uM+fn
bd4H02KnrjaSkM37Ts2pE8TeARbN4rakZCIDHoTYgDCMLtF2Y6V3+J+5ZISqT1yX
G4wc5FwGHGzTnBtGGyeKMffWa+E1VetxQeC/H1+951lVxE8jzDMyCgN+ld09v4a3
Xftfib0KOiwhy8nQert2jW+jyd+H9WB++TiusqPFHJMi6ar6wE5q5DdXTCLJkIOx
NQ65rfSVUpEETXRUvxo2Y8yU7i1WQnDG11wenk1Z+RihAor+LuqN96gdn11XEYL2
qd6X/QIn3hftT8wyVNKz5qo9Jj/N5ou0dWqcrnzv9mCCYUH6EiT/784f+7d9VTCD
ylbJBsPYS4musaCT2lQG3aVPJN75nCUESRn6QFbjJ8YIWzzyauHL9ld0rXw5dRZ+
15Z7VkE+RrSfiR0aypoAy+oU3F4cWdwycZMkakRiljOkLHgTgLuEi42IPHf636DI
KbCE6Ll4SQR9ycPYVdJWLriJ8NyV6K0NgX3arKAZRyD/SVn7n2/GVHprFy0vETmt
OD2lW5TAPDjv/A0LRSBPeRHJ7E5tC55DIoi+XMRl0n/elvifPdVAVCsvBQvLVIit
XlLNmhluxhrP1LuiNqhF
=X+ZY
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] vncserver@.service

2013-01-23 Thread Colin Guthrie
'Twas brillig, and Antonio at 23/01/13 15:54 did gyre and gimble:
 
 
 Am 23.01.2013 16:29, schrieb Antonio:
 and why do you not use the User= and Group= options?

 Because they are not required by instructions.
 
 as also runuser, but one is native systemd the other not
 
 runuser is already written in the file.

Well, whereever that file came from, it's wrong. systemd has built in
tools to switch user and they should be used as things like runuser and
su have a tendency to create their own sessions which is often not what
you want.

 However I have just tried but permission error remains.

 ... User=antonio Group=antonio ...
 
 what about NOT reply offlist and provide informations like the
 output of systemctl status as also the current content of the
 unit-file?
 
 I'm replying even on systemd-devel list.
 I'm working with unit-file on Fedora ARM on Raspberry but I'm also
 replying you by Fedora on notebook.
 
 However: http://www.fpaste.org/NA2M/

That unit looks messy :s

Try this:

[Unit]
Description=Remote desktop service (VNC)
After=network.target

[Service]
Type=forking
User=antonio
Group=antonio
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i -geometry 1024x600 -depth 24 -fp
/usr/share/X11/fonts/misc
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target




Some notes:

1. syslog.target is old and not needed in recent systemd's

2. No need to shell out and ignore the return value of the Pre command.
Use the - after the equals to ignore the return value of the command.
It's output will be logged in the journal but that's fine IMO.

3. User=/Group= is a built in way to set the user and group. You should
drop runuser completely as it's totally unneeded - systemd has this
built in as documented in the manual.

4. I'm not sure of the %i usage above. You r spec mixed and matched a
hard-coded :1 and some use of %i. If your service is
vncserver@1.service, then you'll want to include the : in the commands,
but if you are e.g. using vncserver@5900.service then I guess it's just
an absolute number? (I forget the syntax of VNC server so forgive me if
this is wrong!)

5. If you ultimately try to run vncserver with a 1 argument (meaning
desktop :1 but actually translated directly as tcp port 1 then this may
account for a permission error (regular users cannot listen on TCP ports
 1024). Make sure you get your :1 vs. 1 correct.


HTHs




-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] vncserver@.service

2013-01-23 Thread Antonio
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

It is precisely that which Colin said me:
http://lists.freedesktop.org/archives/systemd-devel/2013-January/008349.html
:)

- --
Antonio Trande
Fedora Ambassador
Fedora italian translation group
Blogger

mail: mailto:sagit...@fedoraproject.org
Homepage: http://www.fedora-os.org
Sip Address : sip:sagitter AT ekiga.net
Jabber :sagitter AT jabber.org
GPG Key: D400D6C4
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRAE12AAoJED2vIvfUANbEYCMQAMFDhdisjaMYM66+mlIdsVUJ
J7QuNdq2vm4c9KZav0QCqiU/KDQ0kkj0LZA7a3nBaRtUC4yUNmFdDoqUGrMhp1EQ
090f9CqqBw+UbbbyFq2KDG9e4pU7Beort03xLFFeyvbpEHlquA8LEIACDjxnHmlx
cToxEe4g8pSZqVgGbaoUWFkJI1gQN98i7dllOIMJKUNzbAiSAp2Ba9K9nO0qUE96
f3hoftYCNOoEXzAHDBH4Hv6uLdIU+v4MniCYAvWZfqmxQ2RlvwPyZs0sNPu7/Bpr
01bx1wiBwy5kpVssDoRepvenQEZURl+Y5Wc1CPNo+CTLIdNVhO0OykOOr/ddJ3nn
BgMjL7qnbqmmRD3tMei+IW3P4GhJ0Dy+twh3Mi2ULLgGS1G7/UAqQALbBlDdqR7N
s0XJKQk2dENX0Vtj209VnZeGVpCvaBdLq1vhU6G/DizYlGyNzmY3aEmA6uD4yK9e
EHiKti8s+zFo6vwud6T26qxEVmaQIkzT10O46t9nP4Bzfjr9jD+zeTY7UpEEdsOF
vrOFyz8LiapMlg5DZnMExls4jF2WC+BTLj/TDrhg120eYTapPFFWVC8sFplsTGDZ
obF/IoSPh2pQLA7Gh5lJmaw9QianzJ6RJNNVCLzQR43x/r9vRGA5xbMP77sGGDWr
HZMUQw33v2gcU/EefHKv
=wYgo
-END PGP SIGNATURE-

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel