[PATCH] weston-launch: be more descriptive with output messages

Kristian Høgsberg krh at bitplanet.net
Tue Apr 17 11:12:45 PDT 2012


On Tue, Apr 17, 2012 at 1:57 PM, Benjamin Franzke
<benjaminfranzke at googlemail.com> wrote:
> 2012/4/17 Tiago Vignatti <tiago.vignatti at intel.com>:
>> Specially the "either" word there is essential, so users don't confuse
>> thinking that both steps are needed.
>>
>> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
>> ---
>> I started to implement udev based session support for weston-launcher, after
>> added myself to 'weston-launch' group and mistakenly forgot to re-ran bash.
>> Yes, really!
>>
>> There's also the fact that if I'm using the non-systemd method, then I'd
>> explicit have to set input fd permissions. I've had to reboot my system twice,
>
> The input device should be opened by weston-launch with both methods,
> i dont get your problem.
>> thinking that Weston screwed it, while actually it was successfully up, with
>> the desktop shell background showing up, and I couldn't VT switch away or do
>> anything because I didn't have input devices around. Should we clarify it
>> somewhere as well?
>>
>>  src/weston-launch.c |    8 ++++----
>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/weston-launch.c b/src/weston-launch.c
>> index 1f1298e..a1adec9 100644
>> --- a/src/weston-launch.c
>> +++ b/src/weston-launch.c
>> @@ -451,7 +451,7 @@ setup_tty(struct weston_launch *wl, const char *tty)
>>                char filename[16];
>>
>>                if (tty0 < 0)
>> -                       error(1, errno, "count not open tty0");
>> +                       error(1, errno, "could not open tty0");
>>
>>                if (ioctl(tty0, VT_OPENQRY, &wl->ttynr) < 0 || wl->ttynr == -1)
>>                        error(1, errno, "failed to find non-opened console");
>> @@ -482,7 +482,7 @@ help(const char *name)
>>  {
>>        fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
>>        fprintf(stderr, "  -u, --user      Start session as specified username\n");
>> -       fprintf(stderr, "  -t, --tty       Start session on alternative tty device\n");
>> +       fprintf(stderr, "  -t, --tty       Start session using alternative tty file descriptor name\n");
>
> I see that "tty device" may not be perfect, but tty file descriptor is
> misleading.
> I would think that represents an open file descriptor passed through exec.
> Maybe just: "Start session on specified terminal file name"?
>
>>        fprintf(stderr, "  -v, --verbose   Be verbose\n");
>>        fprintf(stderr, "  -s, --sleep     Sleep specified amount of time before exec\n");
>>        fprintf(stderr, "  -h, --help      Display this help message\n");
>> @@ -544,13 +544,13 @@ main(int argc, char *argv[])
>>                error(1, errno, "failed to get username");
>>
>>        if (!weston_launch_allowed(&wl))
>> -               error(1, 0, "Permission denied. You should..\n"
>> +               error(1, 0, "Permission denied. You should either:\n"
>>  #ifdef HAVE_SYSTEMD_LOGIN
>>                      " - run from an active and local (systemd) session.\n"
>>  #else
>>                      " - enable systemd session support for weston-launch.\n"
>>  #endif
>> -                     " - add yourself to the 'weston-launch' group.");
>> +                     " - or add yourself to the 'weston-launch' group.");
>
> Yup, thats much better.

Yeah, a good improvement, but I think the --tty option description was
ok.  If fact I think it was a little too long, "something something on
tty" is pretty idiomatic, so I went with that.

Kristian


More information about the wayland-devel mailing list