Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 2003 21:07:37 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: PAM, X11, and su as a normal user?
Message-ID:  <20030905200737.GB45683@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <200309051918.h85JIe20059400@troutmask.apl.washington.edu>
References:  <200309051918.h85JIe20059400@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--QTprm0S8XgL7H0Dt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 05, 2003 at 12:18:40PM -0700, Steven G. Kargl wrote:
> After a few hours of frustation, it's time to ask a question.
>=20
> I have 2 accounts on my machine.  I use startx to start
> X11 as user kargl.  If I then su to user sgk, I cannot
> fire up X clients.  For example,
>=20
> troutmask:kargl[202] su sgk
> Password:
> troutmask:sgk[201] gnuplot
> Terminal type set to 'x11'
> gnuplot> plot sin(x)
> gnuplot>=20
> gnuplot: unable to open display 'troutmask.apl.washington.edu:0'
> gnuplot: X11 aborted.
>=20
> I've tried using "xhost sgk@", but this doesn't work.
> The only thing I can think of that may need to be
> configured is PAM, but the documentation is rather
> incomplete.  So, anyone know how to setup su to
> permit sgk to use X clients?

As user kargl:

    % xauth nextract /tmp/foo ${DISPLAY}

As user sgk:

    % xauth nmerge /tmp/foo

and remember to delete /tmp/foo as soon as possible.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--QTprm0S8XgL7H0Dt
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD4DBQE/WO0JdtESqEQa7a0RArQLAJ9E5VPS0FA7zYlKVpkgSs7i5+3kxQCYj83j
PfsodI/caOcjwAqLHXgmXA==
=kd9R
-----END PGP SIGNATURE-----

--QTprm0S8XgL7H0Dt--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030905200737.GB45683>