Rhyous

October 13, 2010

Configuring sudo on FreeBSD 8.1 and allowing sudo to open GUI applications

Filed under: FreeBSD — J. Abram barneck @ 7:00 pm

The goal is to install sudo and configure it in a way that allows GUI apps to run.

Without proper configuration the following error occurs when trying to run GUI apps:

No protocol specified
No protocol specified
Error: cannot open display: :0.0

To cofigure sudo, follow these steps below.

  1. Install sudo.
    cd /usr/ports/security/sudo
    make install
  2. Configure sudo be editing the /usr/local/etc/sudoers file.
    ee /usr/local/etc/sudoers
  3. Make the following configuration changes.  The first ones make sudo work with GUI apps.
    Defaults env_keep += “HOME”
    Defaults env_keep += “XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH”
    Defaults env_keep += “QTDIR KDEDIR”
    Defaults env_keep += “XDG_SESSION_COOKIE”
    root ALL=(ALL) ALL
    %wheel ALL=(ALL) ALL
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: