Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, on my home computer i have Debian 6.x and i can use SSH -X to connect my remote linux server on which is CentOS (Redhat). I have fluxbox desktop ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    334

    SSH -X to run Firefox on remote machine


    Hello,

    on my home computer i have Debian 6.x

    and i can use SSH -X to connect my remote linux server on which is CentOS (Redhat).

    I have fluxbox desktop interface there.

    I want to ask how i can run somehow Firefox on that remote server and work in that Firefox on my local home linux PC..

    Do i need to install Huge X-Window system (yum groupinstall 'X Window System') on remote computer or can i use fluxbox or any other more lightweight?

    I want skip VNC and use ssh -X command..

    When not having X-window system installed:

    im getting errors like:
    Error: no display specified
    # export DISPLAY=localhost:0.0
    # firefox &
    [1] 5832
    # Error: cannot open display: localhost:0.0

    AFTER installing X-Window system using yum command above, im getting same errors:
    [root@vps ~]#
    [root@vps ~]# firefox
    Error: cannot open display:
    [root@vps ~]# export DISPLAY=
    [root@vps ~]# firefox
    Error: cannot open display:
    [root@vps ~]# export DISPLAY=localhost:0.0
    [root@vps ~]# firefox
    Error: cannot open display: localhost:0.0
    [root@vps ~]# firefox &
    [1] 6426

    any ideas please?
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    661
    You need the X libraries and client installed on the server. You do not need them running on the server. Also, all software that you plan to run on the remote server needs to be installed on the server. What is done is the display is being sent to your X-server from the application being run on the remote machine (the server in your case). This has been part of Unix Since at least 1984 (was monochrome back then and when to 255-color in 1985). The X-server is the part that talks with the keyboard, mouse, display, etc and the X-client is used by the application that is running.

  3. #3
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,462
    Login to the server. Run:
    Code:
    echo $DISPLAY
    It will output something like:
    localhost:10.0
    then:
    Code:
    DISPLAY=:10.0 firefox&
    Note the :10.0 must match the numeric portion of the output of "echo $DISPLAY"

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    661
    This is not needed when using "ssh -X username@hostnameoripaddress". The DISPLAY variable is set as proved by the "echo". However, if the server does not have have X library installed nothing will be using the value of the DISPLAY environment variable.

  6. #5
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    334
    the "echo $DISPLAY" command returns blank line.. when done in "ssh -X myremoteserverip" (loged in by that command to my remote server)

    Remote server is on Redhat CentOS 5.10 32bit, when list installed x11 packages (yum list *x11*), these are returned: libX11.i386 1.0.3-11.el5_7.1 installed - Pastebin.com

    Please advice me on how to install, how to do?
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  7. #6
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    661
    I generally have "xorg-x11" installed on my servers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •