Re: start an application under X11



On Wed, 15 Mar 2006 17:57:00 +0100, Poiter Agus staggered into the Black
Sun and said:
Now I need to start from console, (gnome is not running) an X
application, let's say as example xclock.

This is usually more complicated and less rewarding than you want.

export DISPLAY = 127.0.0.1:0.0
xclock

But when i start it, X11 starts well but no Xclock is running, and it
says can't open 127.0.0.1 display.

If DISPLAY contains a hostname or IP address, then X clients will
attempt to communicate with the X server over TCP. This doesn't always
work, because in most modern distros, X is started with the "-nolisten
tcp" option. It's usually much easier to do this:

(as user who's logged in to X)
xhost +local:
(allows all locally logged-in users to access the X display)
(outside of X session)
export DISPLAY=:0
xclient &
(xclient starts on :0)

....no problem. You can also do things with xauth, but this way's easier
if a bit less secure.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL
.



Relevant Pages

  • RE: Non-root users cannot run Xwindow
    ... our xclock problem seems to be fixed; Xwindows are now ... > does not display anything. ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: Whats the difference between xclock and clock & ?
    ... desktop running Linux over ssh and try to execute xclock locally via ... Error: Can't open display: ... The shell has no part in displaying or not displaying xclock. ... Also, you mention a laptop, but you don't explain whether that's ...
    (comp.unix.programmer)
  • RE: Non-root users cannot run Xwindow
    ... We were able to get xclock to display one the local machine using VNC ... Viewer, after following your suggestions. ... Is it possible to get an xwindow to display directly to a windows XP ...
    (RedHat)
  • Re: Whats the difference between xclock and clock & ?
    ... desktop running Linux over ssh and try to execute xclock locally via ... Error: Can't open display: ... Also, you mention a laptop, but you don't explain whether that's ...
    (comp.unix.programmer)
  • RE: Non-root users cannot run Xwindow
    ... > Is it possible to get an xwindow to display directly to a windows XP ... > We were able to get xclock to display one the local machine using VNC ... >> I have a user trying to run windowed apps from command line, ...
    (RedHat)