Simulate x-screen?

12,691

Xvfb is exactly what I was looking for: http://en.wikipedia.org/wiki/Xvfb

Excerp from wikipedia:

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol... From the point of view of the client, it acts exactly like any other X display server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to even have a screen or any input device.

This set of commands fixed my issue:

Xvfb :1 &
export DISPLAY=:1

then my command works:

$ lmms -v
Linux MultiMedia Studio 0.4.14-rc1

Copyright (c) 2004-2008 LMMS developers.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

Try "lmms --help" for more information.
Share:
12,691

Related videos on Youtube

DianeBeldame
Author by

DianeBeldame

Updated on September 18, 2022

Comments

  • DianeBeldame
    DianeBeldame over 1 year

    I'm working in a koding terminal running ubuntu 13.04, and I'm trying to run an application that requires an x-screen (even to run in terminal mode).

    I am unable to connect with x11 forwarding, and I'm wondering if there is a workaround that will allow me to run this application (lmms).

    $ lmms -v
    lmms: cannot connect to X server 
    $ uname -a
    Linux vm-2.masd.koding.kd.io 3.9.0-0-generic #4userns5 SMP Mon May 13 06:15:34 PDT 2013 x86_64 x86_64 x86_64 GNU/Linux
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 13.04
    Release:        13.04
    Codename:       raring
    

    Thanks in advance!

    • bahamat
      bahamat over 10 years
      What do you mean by "requires an x-screen (even to run in terminal mode)." Can you elaborate? What application are you trying to run? Do you get a specific error message?
    • peterph
      peterph over 10 years
      Do you have X11Forwarding yes on the remote machine? Are you usinh ssh -X or -Y? Is the DISPLAY environment variable set in the shell?
    • DianeBeldame
      DianeBeldame over 10 years
      @Bahamat I'm trying to run lmms, and the first command I show is an example of the error I get.
    • DianeBeldame
      DianeBeldame over 10 years
      @peterph I don't have control over the ssh mechanism, as it is a Web based terminal with proxied ssh access if needed.
  • peterph
    peterph over 10 years
    The example completely turns off access control - it should only be used as a temporary workaround!
  • DianeBeldame
    DianeBeldame over 10 years
    This didn't work for me because I don't have control over the ssh mechanism. Xvfb solved my issue. I think I will take a look at xhost for future applications though. Thanks!