Hi,

On Fri, Dec 5, 2014 at 8:01 AM, Zhang, Zhengguang <
[email protected]> wrote:

>  Hi, All
>
> I have a question about tizen IVI boot user name, in current IVI image,
> when system boots up, the default login user should be “app”, but when I
> try to get the user name by the following code:
>
>          Struct utmpx *utmp;
>
> setutxent();
>
>          utmp = getutxent();
>
>          printf(“user name: %s”, utmp->ut_user);
>
>          endutxent();
>
> I get the user name “reboot” instead of “app”, can anybody help me to
> clarify what’s wrong with the code above or how to get the user name “app”?
> Who is the “reboot” user?
>

Please explain the context you're in.

But I can tell that code won't work:

- it just reads the top entry of the utmp file
- as far as I can see systemd does not write utmp entries for logged users

-- Mikko
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to