[gpm]Re: [links-list] using links with the framebuffer driver as a non-root
user with gpm
Mikulas Patocka
mikulas@artax.karlin.mff.cuni.cz
Thu, 13 Jun 2002 13:31:35 +0200 (CEST)
On Thu, 13 Jun 2002, Kerry Scott McLeod wrote:
> The Problem:
>
> When running links in the framebuffer, links must be run as root or
> setuid root - unless the user who is running links is also logged
> in on tty0. The following patches make it so that all users regardless
> of the virtual console they are logged into can make use of links
> with the framebuffer driver - without the need for superuser permissions.
>
> The solution:
> Apply my patches which fixes this bug.
>
>
> Patch for gpm:
> gpm-1.20.0-socket-vc.patch
>
> What it does:
> This patch fixes the behaviour of the Gpm_Open call to correctly
> handle the flag paramater (the number of the tty which links is currently
> running on.) I have submitted this patch to the gpm list tonight,and
> provided it to you here for your convenience.
>
> Patch for links:
> links-2.1pre1-fb-gpm-vc.patch
>
> What it does:
> This patch determines the tty links is running on and passes the last
> digits of the tty as the flag paramater to Gpm_Open.
>
> Pending the approval of the links maintainers, I would appreciate it if
> the patch to the framebuffer driver were commited to the official links
> source repository. If you chose to do so please let me know - it will
> make my life a lot simpler.
Quoting info gpm:
- Function: int Gpm_Open (Gpm_Connect *CONN, int FLAG);
Open a connection with the server. The CONN parameter points to the
connection information for the being-created connection, as
already described. It is passed to the server after filling the
`pid' and `vc' fields.
FLAG should be `0' for normal applications, those interested in
events related to their own console. The own console is considered
to be the one attached to `stdin', and it must match the string
`/dev/tty*'. A negative value for FLAG is used to make the
invoking application a default handler *Note Default Handlers::,
while a positive value is used to force connection to a particular
console, either for debugging issues or whenever `stdin' is not a
tty when `Gpm_Open' is invoked.
in current gpm-1.20.0 -- it is broken. (this also causes the bug that
applications on other console don't run when links is enabled). My old gpm
1.10 works fine. The bug should be fixed in gpm, not in links.
Mikulas