Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save roninhack/43575573588d4d850c9d6b75ef6558f6 to your computer and use it in GitHub Desktop.

Select an option

Save roninhack/43575573588d4d850c9d6b75ef6558f6 to your computer and use it in GitHub Desktop.
Running electron using xvfb

Running electron using xvfb

Install xvfb

apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

Some tips at: xvfb init script for Ubuntu

Install electron

sudo npm install electron-prebuilt -g
sudo apt-get install libasound2

On Ubuntu, I was running into some module errors. To correct the errors, I installed the following packages as mentioned at Build Instructions Linux:

sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
                       libnotify-dev libgnome-keyring-dev libgconf2-dev \
                       libasound2-dev libcap-dev libcups2-dev libxtst-dev \
                       libxss1 libnss3-dev gcc-multilib g++-multilib

Now, an app can be run using xvfb in a headless mode using xvfb-run electron . in the project directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment