Re: [systemd-devel] next available VT for a service

2014-06-20 Thread Lennart Poettering
On Mon, 16.06.14 17:20, Valentin Popa (valentin.p...@intel.com) wrote:

 Hi all,
 I want to start a service on the next available tty (let's call it
 %next_available_tty). In my case, this service handles
 weston-launch, but it could be any that requires a virtual terminal
 to run.
 Let's say some of the TTYs are already taken (by getty@tty1.service,
 etc) and I don't know which ; I would like to spawn a new user
 session that contains my new service on a spare tty. The service
 unit should look like this:
 
 [Service]
 ExecStart=/usr/bin/weston-launch -some_parameter
 StandardInput=tty
 StandardOutput=journal
 StandardError=journal
 TTYPath=/dev/%next_available_tty # this is hardcoded for the moment
 
 Weston must run from a virtual terminal.
 To launch the session, I use:
 https://github.com/sofar/user-session-units which checks for
 available seats, then creates a PAM session on tty1.
 
 Without   %next_available_tty  I cannot get rid of these
 hard-codings and I need to know which tty will be available before
 the system boots (reserve it).
 
 Does anyone know if such feature can be accepted in systemd. If
 not, maybe it can be done in another way. If yes, any pointers to
 start from?

Hmm, wouldn't it make more sense to buil this into weston-launch? I
mean, X11 has this logic, why wouldn't this be appropriate for Weston?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] next available VT for a service

2014-06-16 Thread Valentin Popa

Hi all,
I want to start a service on the next available tty (let's call it 
%next_available_tty). In my case, this service handles weston-launch, 
but it could be any that requires a virtual terminal to run.
Let's say some of the TTYs are already taken (by getty@tty1.service, 
etc) and I don't know which ; I would like to spawn a new user session 
that contains my new service on a spare tty. The service unit should 
look like this:


[Service]
ExecStart=/usr/bin/weston-launch -some_parameter
StandardInput=tty
StandardOutput=journal
StandardError=journal
TTYPath=/dev/%next_available_tty # this is hardcoded for the moment

Weston must run from a virtual terminal.
To launch the session, I use: 
https://github.com/sofar/user-session-units which checks for available 
seats, then creates a PAM session on tty1.


Without   %next_available_tty  I cannot get rid of these hard-codings 
and I need to know which tty will be available before the system boots 
(reserve it).


Does anyone know if such feature can be accepted in systemd. If not, 
maybe it can be done in another way. If yes, any pointers to start from?


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