Results 1 to 8 of 8

Thread: Can't open FireFox via VNC

  1. #1
    Join Date
    Oct 2007
    Beans
    139

    Can't open FireFox via VNC

    Hi

    From time to time I like to VNC on to my Ubuntu Server (ubuntu-desktop installed) to do things remotely via a GUI.
    I need to open FireFox, but it doesn't launch.

    Can anybody help guide me through getting this working again, please?

    I've tried Chromium and that also doesn't launch.

  2. #2
    Join Date
    Mar 2011
    Beans
    1,994

    Re: Can't open FireFox via VNC

    Some additional information would be useful to make suggestions. Is X even running on the server (might be Wayland?) How do you invoke the vnc server? What do you see with the vnc viewer? If you launch Firefox from a terminal, do you get any error messages?

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Can't open FireFox via VNC

    Ubuntu Server by default has no graphical interface. On systems with GUIs, you can use the "ssh -X hostname" command to set up an encrypted tunnel using the X-Windows protocols. If you connect to a machine with X or one of its offspring installed, you can run a program from the command prompt, e.g. "firefox &", and it will display on the SSH client's desktop instead of the server's.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Mar 2011
    Beans
    1,994

    Re: Can't open FireFox via VNC

    Can you display any X program, like xclock? my vnc start command over ssh, mapping the remote port 5900 to the local port 5900 is:
    ssh -t -L 5900:localhost:5900 192.168.1.xxx "sudo x11vnc -localhost -create -auth /var/run/lightdm/root/:0 -display :0"
    which works whether or not there's a login active on the remote end. No auth needed if you already have an X display running there.
    I just use xtightvncviewer to start a window with the remote desktop, and allows the gui to start things like the browser, (but I don't have firefox on the remote system).
    xtightvncviewer -encodings copyrect -bgr233 localhost::5900

  5. #5
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Can't open FireFox via VNC

    Quote Originally Posted by ubfan1 View Post
    Can you display any X program, like xclock?
    I believe so, yes.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Mar 2011
    Beans
    1,994

    Re: Can't open FireFox via VNC

    @senijisensei I should have tagged the question for the OP -- trying to figure out if the problem is with any X program, or just browsers (ram issue?. If the whole desktop is not needed with vnc, the ssh -X is a better way for running just one program, if only for performance.

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't open FireFox via VNC

    Quote Originally Posted by ubfan1 View Post
    @senijisensei I should have tagged the question for the OP -- trying to figure out if the problem is with any X program, or just browsers (ram issue?. If the whole desktop is not needed with vnc, the ssh -X is a better way for running just one program, if only for performance.
    ssh -X is better for LAN connections, not WAN connections. GUI programs with a large number of XObjects, like a modern browser, will also be slower due to the way that X-events and X-messages are propagated.

    VNC+ssh/openvpn or using any of the NX solutions is usually much better than remote X over WAN connections, especially for home users with limited upstream bandwidth.

    IME.

  8. #8
    Join Date
    Oct 2007
    Beans
    139

    Re: Can't open FireFox via VNC

    Thanks for your replies all.

    So initially, after upgrading to 18.04, when I VNC'd on to the server, I was greeted with a grey background. Mouse courser was a black X, and the top panel had "Applications" and "Places".
    I've since installed lxde an
    I could open stuff like gedit, Files. I tried to install TeamViewer, which wouldn't open - and Chromium, which also wouldn't open.

    When I start tightvncserver, I do so via SSH with sudo.
    This is the error I get when I try to run Firefox via command:

    root: Running Firefox as root in a regular user's session is not supported.

    su myusername: Client is not authorised to connect to ServerUnable to init server: Could not connect: Connection refused. Error: Cannot open display: :3.0

    (vnc is currently connected on :3)

    I'm also having curl issues with RSS - but not sure if this is related to this issue?

Bookmarks

Posting Permissions

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