Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2009 15:13:48 -0400
From:      Michael Powell <nightrecon@verizon.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: root user, graphical programs
Message-ID:  <gukeqe$g7f$1@ger.gmane.org>
References:  <alpine.BSF.2.00.0905150843110.83166@macos.cmi.ua.ac.be>

next in thread | previous in thread | raw e-mail | index | archive | help
Pieter Donche wrote:

> FreeBSD 7, KDE 3.5
> To install Matlab (in linux compat mode), one must execute the
> matlab install program as root. The installer is graphical.
> When from a KDE terminal window, I switch to root (# su -)
> and try a graphical program, e.g.  # xpdf, I get Can't open display.
> The FreeBSD handbook (10.5.1) says in that case type setenv HOME ~USER
> (USER the username where the su command was given). This doesn't help
> I still get Can't open display.
> 
> What's wrong and how to solve it?

Since you're using KDE there is an easy way. Type kdesu xpdf at the prompt
in a terminal (konsole for example) and it will pop up a box asking for the
root password. This is the canonical method of starting graphical programs
under KDE as root. It is the same mechanism as setting the property "Start 
as other user" to root when editing an icon's settings. The former is best
suited for ad hoc impromptu one off situations, while the latter would be
for making permanent changes to how clicking an icon behaves.

-Mike






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gukeqe$g7f$1>