<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: gui commands doesnt works when running via sudo in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587501#M39818</link>
    <description>Maaz,&lt;BR /&gt;&lt;BR /&gt;Take a look at these links:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.linuxjournal.com/content/getting-vncserver-running-core-10-gdm" target="_blank"&gt;http://www.linuxjournal.com/content/getting-vncserver-running-core-10-gdm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.idevelopment.info/data/Unix/Linux/LINUX_ConfiguringXDMCPRedHatLinux.shtml" target="_blank"&gt;http://www.idevelopment.info/data/Unix/Linux/LINUX_ConfiguringXDMCPRedHatLinux.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your problem is caused by the GDM security that allows your user to open windows within their own session but it disallows another user, so when you su within a shell, GDM does not see it because it is still running as your user.</description>
    <pubDate>Sun, 21 Feb 2010 18:43:01 GMT</pubDate>
    <dc:creator>Andrew Cowan</dc:creator>
    <dc:date>2010-02-21T18:43:01Z</dc:date>
    <item>
      <title>gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587492#M39809</link>
      <description>jodt@tiger:~/Desktop&amp;gt; xhost +&lt;BR /&gt;access control disabled, clients can connect from any host&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; sudo firefox&lt;BR /&gt;Error: no display specified&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; sudo virt-manager&lt;BR /&gt;Unable to initialize GTK: could not open display&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; &lt;BR /&gt;&lt;BR /&gt;only "sudo /sbin/yast2" works, but in TUI(ncurses) mode&lt;BR /&gt;&lt;BR /&gt;all of the above commands works nicely when I did "su - root"&lt;BR /&gt;&lt;BR /&gt;what should I do, please help&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Maaz&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Feb 2010 12:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587492#M39809</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2010-02-20T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587493#M39810</link>
      <description>do as follows&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#xhost +&lt;BR /&gt;&lt;BR /&gt;than&lt;BR /&gt;&lt;BR /&gt;# DISPLAY=ip_address:0.0;export DISPLAY&lt;BR /&gt;&lt;BR /&gt;than try and also note ip_address should be of the same machine on which you want to diaplay your gui</description>
      <pubDate>Sat, 20 Feb 2010 12:21:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587493#M39810</guid>
      <dc:creator>Jupinder Bedi</dc:creator>
      <dc:date>2010-02-20T12:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587494#M39811</link>
      <description>Hi Thanks Jupinder Bedi for help&lt;BR /&gt;&lt;BR /&gt;I did followinf&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; xhost +&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; DISPLAY=127.0.0.1:0.0; export DISPLAY&lt;BR /&gt;&lt;BR /&gt;but no gain.. same errors.&lt;BR /&gt;&lt;BR /&gt;I am working on this box directly(no network ..ssh etc)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Maaz</description>
      <pubDate>Sat, 20 Feb 2010 19:09:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587494#M39811</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2010-02-20T19:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587495#M39812</link>
      <description>Need to set the display&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SAM has a restricted sam builder on 11.23 and lower so a non-root user can user their regular id to do system admin tasks in sam.&lt;BR /&gt;&lt;BR /&gt;In 11.31 the system management homepage can be configured to allow a non-root person to do different tasks with their regular userid.  This way sudo is not necessary.</description>
      <pubDate>Sun, 21 Feb 2010 00:33:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587495#M39812</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2010-02-21T00:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587496#M39813</link>
      <description>I think that the problem is that Linux is denying you local access to the desktop and not sudo.&lt;BR /&gt;&lt;BR /&gt;I can't find the exact manual page but you have to change one of the 'sysconfig' files to enable local access to the desktop. &lt;BR /&gt;&lt;BR /&gt;Some distributions such as Fedora, Mandriva, and Red Hat, use the prefdm script to decide on the XDMCP server to run. Linux runs the prefdm script that loads â  /etc/sysconfig/desktopâ   file. The DESKTOP line in â  /etc/sysconfig/desktopâ   file sets the default desktop environment, which sets the default XDMCP server.&lt;BR /&gt;&lt;BR /&gt;The â  /etc/X11/xdm/Xaccessâ   file is a configuration file of XDM. You can configure XDM server for remote access. The /etc/X11/xdm/Xaccess file controls access of XDM server. You can make use of an asterisk (*) to provide access of the system to anyone. The * CHOOSER BROADCAST line as displayed on the screen, tells XDM that anyone may request chooser that accepts XDMCP connections&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Feb 2010 10:37:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587496#M39813</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2010-02-21T10:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587497#M39814</link>
      <description>Hi thanks Emil Velez&lt;BR /&gt;there is no SAM here, I am using a Linux distro(SUSE 11)&lt;BR /&gt;&lt;BR /&gt;I think SAM is a YaST equivalent in HP-UX &lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sun, 21 Feb 2010 10:46:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587497#M39814</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2010-02-21T10:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587498#M39815</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Error: no display specified&lt;BR /&gt;&lt;BR /&gt;      echo $DISPLAY&lt;BR /&gt;&lt;BR /&gt;&amp;gt; all of the above commands works nicely when&lt;BR /&gt;&amp;gt; I did "su - root"&lt;BR /&gt;&lt;BR /&gt;      su - root&lt;BR /&gt;      echo $DISPLAY&lt;BR /&gt;&lt;BR /&gt;What's different?</description>
      <pubDate>Sun, 21 Feb 2010 14:32:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587498#M39815</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-21T14:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587499#M39816</link>
      <description>I would like to clear that, I am not accessing this box remotely, I am working on this directly, logs in via an ordinary account(jodt), then whenever I need to work as root, I try to sudo.&lt;BR /&gt;&lt;BR /&gt;Hi Steven Schweda Thanks for help&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; sudo firefox&lt;BR /&gt;Error: no display specified&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; echo $DISPLAY&lt;BR /&gt;:0.0&lt;BR /&gt;jodt@tiger:~/Desktop&amp;gt; su - root&lt;BR /&gt;Password: &lt;BR /&gt;tiger:~ # echo $DISPLAY&lt;BR /&gt;:0.0&lt;BR /&gt;tiger:~ # &lt;BR /&gt;&lt;BR /&gt;Hi Andrew Cowan thanks for help&lt;BR /&gt;/etc/sysconfig/console, /etc/sysconfig/displaymanager, and /etc/X11/xdm/Xaccess attached.&lt;BR /&gt;&lt;BR /&gt;tiger:~ # grep -v ^# /etc/X11/xdm/Xaccess &lt;BR /&gt;&lt;BR /&gt;* #any host can get a login window&lt;BR /&gt;&lt;BR /&gt;* CHOOSER BROADCAST #any indirect host can get a chooser&lt;BR /&gt;&lt;BR /&gt;tiger:~ # grep -v ^# /etc/sysconfig/displaymanager &lt;BR /&gt;&lt;BR /&gt;DISPLAYMANAGER="gdm"&lt;BR /&gt;DISPLAYMANAGER_REMOTE_ACCESS="no"&lt;BR /&gt;DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"&lt;BR /&gt;DISPLAYMANAGER_STARTS_XSERVER="yes"&lt;BR /&gt;DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="no"&lt;BR /&gt;DISPLAYMANAGER_AUTOLOGIN=""&lt;BR /&gt;DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"&lt;BR /&gt;DISPLAYMANAGER_AD_INTEGRATION="no"&lt;BR /&gt;DISPLAYMANAGER_SHUTDOWN="auto"&lt;BR /&gt;DISPLAYMANAGER_RANDR_MODE_VGA=""&lt;BR /&gt;DISPLAYMANAGER_RANDR_MODE_auto="1024x768_60 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync"&lt;BR /&gt;DISPLAYMANAGER_XSERVER="Xorg"&lt;BR /&gt;&lt;BR /&gt;tiger:~ # grep -v ^# /etc/sysconfig/console &lt;BR /&gt;&lt;BR /&gt;CONSOLE_FONT="lat9w-16.psfu"&lt;BR /&gt;CONSOLE_UNICODEMAP=""&lt;BR /&gt;CONSOLE_SCREENMAP="trivial"&lt;BR /&gt;CONSOLE_MAGIC="(K"&lt;BR /&gt;FB_MODULES=""&lt;BR /&gt;FBSET_PARAMS=""&lt;BR /&gt;CONSOLE_ENCODING="UTF-8"&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sun, 21 Feb 2010 17:24:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587499#M39816</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2010-02-21T17:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587500#M39817</link>
      <description>&lt;!--!*#--&gt;&amp;gt; jodt@tiger:~/Desktop&amp;gt; sudo firefox&lt;BR /&gt;&amp;gt; Error: no display specified&lt;BR /&gt;&amp;gt; jodt@tiger:~/Desktop&amp;gt; echo $DISPLAY&lt;BR /&gt;&amp;gt; :0.0&lt;BR /&gt;&lt;BR /&gt;That shows what DISPLAY is in your _normal_&lt;BR /&gt;environment, _after_ the "sudo xxx" command&lt;BR /&gt;has failed.  What I'd like to know is what&lt;BR /&gt;DISPLAY is _in_ the "sudo" environment.&lt;BR /&gt;&lt;BR /&gt;I don't use sudo, so I know nothing, but if&lt;BR /&gt;it doesn't pass through your DISPLAY setting,&lt;BR /&gt;then you might try writing a script which&lt;BR /&gt;sets DISPLAY and then runs your browser, and&lt;BR /&gt;then try running "sudo your_script".  Or, for&lt;BR /&gt;example, something like:&lt;BR /&gt;&lt;BR /&gt;      sudo DISPLAY=':0.0' firefox&lt;BR /&gt;or:&lt;BR /&gt;      sudo firefox --display ':0.0'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"man firefox" seems to do nothing good around&lt;BR /&gt;here, but there's some value in:&lt;BR /&gt;&lt;BR /&gt;      firefox --help&lt;BR /&gt;&lt;BR /&gt;Most X programs offer a "-display" (or,&lt;BR /&gt;apparently, a "--display") option.&lt;BR /&gt;&lt;BR /&gt;      man X</description>
      <pubDate>Sun, 21 Feb 2010 18:32:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587500#M39817</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-21T18:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587501#M39818</link>
      <description>Maaz,&lt;BR /&gt;&lt;BR /&gt;Take a look at these links:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.linuxjournal.com/content/getting-vncserver-running-core-10-gdm" target="_blank"&gt;http://www.linuxjournal.com/content/getting-vncserver-running-core-10-gdm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.idevelopment.info/data/Unix/Linux/LINUX_ConfiguringXDMCPRedHatLinux.shtml" target="_blank"&gt;http://www.idevelopment.info/data/Unix/Linux/LINUX_ConfiguringXDMCPRedHatLinux.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your problem is caused by the GDM security that allows your user to open windows within their own session but it disallows another user, so when you su within a shell, GDM does not see it because it is still running as your user.</description>
      <pubDate>Sun, 21 Feb 2010 18:43:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587501#M39818</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2010-02-21T18:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587502#M39819</link>
      <description>&lt;!--!*#--&gt;&amp;gt;  Your problem is caused by [...]&lt;BR /&gt;&lt;BR /&gt;Perhaps, but if so, then "no display&lt;BR /&gt;specified" would seem to be a singularly&lt;BR /&gt;inappropriate error message.</description>
      <pubDate>Sun, 21 Feb 2010 19:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587502#M39819</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-21T19:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587503#M39820</link>
      <description>&lt;!--!*#--&gt;&amp;gt;       man X&lt;BR /&gt;&lt;BR /&gt;That may work better on a real UNIX system&lt;BR /&gt;than on a GNU/Linux system.&lt;BR /&gt;&lt;BR /&gt;I still know nothing, but you might try&lt;BR /&gt;&lt;BR /&gt;      man sudo&lt;BR /&gt;&lt;BR /&gt;and look for "environment".  Apparently,&lt;BR /&gt;there are options which affect how&lt;BR /&gt;environment variable (like, say, DISPLAY) are&lt;BR /&gt;handled.  Similarly:&lt;BR /&gt;&lt;BR /&gt;      man sudoers</description>
      <pubDate>Sun, 21 Feb 2010 22:26:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587503#M39820</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-21T22:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: gui commands doesnt works when running via sudo</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587504#M39821</link>
      <description>How about using gksudo? It should be basically the same, but when dealing with X apps it could make a difference.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Feb 2010 09:12:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gui-commands-doesnt-works-when-running-via-sudo/m-p/4587504#M39821</guid>
      <dc:creator>J. Maestre</dc:creator>
      <dc:date>2010-02-22T09:12:08Z</dc:date>
    </item>
  </channel>
</rss>

