Kitematic: Managed to run on Fedora 25

Created on 18 Feb 2017  路  5Comments  路  Source: docker/kitematic

As Fedora uses Wayland, electron-prebuilt is not working. So electron has to be built.

I did not have any spare machine to install Fedora on, so used VirtualBox. And I did not take notes during this installation attempt, so there may be some errors.

installed these packages:
libcanberra-gtk3 libcanberra libcanberra-devel

"sudo dnf install libXScrnSaver" to install libXss.so.1

Had to change electron-prebuilt, electron-version values in package.json file to "electron
1.6.0" and in Gruntfile.js file to require ("electron").

In src directory several files needs to be edited to change these lines, for new electron version:
import shell from 'shell';
to
import {shell} from 'electron';

after these are done, make and grunt commands work and kitematic seems to run

I don't know if it's because it's running under VirtualBox or not, but there are some GUI glitches. Like,

top:50px; , otherwise log area is blocking the start/restart menu.

For grunt release command to work and yield a rpm, rpm-build needs to be installed:
sudo dnf install rpm-build

and the final rpm package have the lsb package dependency.

sudo dnf install lsb

Will try to test how it works and take notes as I use it.

linux

Most helpful comment

I've tried to retrace my steps and make it as easy as possible. But it needs to be checked. At least, the regex codes and the typo errors. Kitematic and electron version numbers need to be changed if necessary, too.

sudo dnf -y update

--Download kitematic tar.gz file
tar zxvf kitematic-0.13.1.tar.gz
cd kitematic-0.13.1

sed -ie 's/.*\("electron-version"\)\(.*\)\(".*"\).*$/\1: "1.6.0",/g' package.json
sed -ie 's/.*\("electron-prebuilt"\)\(.*\)\(".*"\).*$/"electron": "\^1.6.0",/g' package.json

sed -ie 's/.*\(var electron\)\(.*\);$/\1 = require(\x27electron\x27);/g' Gruntfile.js 


grep -Ril "import shell from 'shell'" ./src | xargs sed -ie 's/.*\(import shell from \x27shell\x27\)/import {shell} from \x27electron\x27;/g'

sudo dnf -y install libXScrnSaver
sudo dnf -y install libcanberra-gtk3 libcanberra libcanberra-devel
make
grunt

--At this point Kitematic is compiled and running

--If you want to create a rpm
sudo dnf -y install rpm-build
grunt release

cd dist
sudo rpm -Uvh Kitematic_0.13.1_x86_64.rpm

-- If shows dependency errors:
sudo dnf -y install lsb

NOTE:
to fix console log on top of menu, before running make and grunt, edit styles/container-home.less file. You need to add margin-top:50px; so it will be like this:

.details-panel.home {
  background-color: @color-background;
  overflow: hidden;
  margin-top:50px;
  .content {

All 5 comments

Thanks for the help in getting this to work on Fedora - Would be glad to see a proper list of what needs to be modified, in order to support more linux distributions.

I've tried to retrace my steps and make it as easy as possible. But it needs to be checked. At least, the regex codes and the typo errors. Kitematic and electron version numbers need to be changed if necessary, too.

sudo dnf -y update

--Download kitematic tar.gz file
tar zxvf kitematic-0.13.1.tar.gz
cd kitematic-0.13.1

sed -ie 's/.*\("electron-version"\)\(.*\)\(".*"\).*$/\1: "1.6.0",/g' package.json
sed -ie 's/.*\("electron-prebuilt"\)\(.*\)\(".*"\).*$/"electron": "\^1.6.0",/g' package.json

sed -ie 's/.*\(var electron\)\(.*\);$/\1 = require(\x27electron\x27);/g' Gruntfile.js 


grep -Ril "import shell from 'shell'" ./src | xargs sed -ie 's/.*\(import shell from \x27shell\x27\)/import {shell} from \x27electron\x27;/g'

sudo dnf -y install libXScrnSaver
sudo dnf -y install libcanberra-gtk3 libcanberra libcanberra-devel
make
grunt

--At this point Kitematic is compiled and running

--If you want to create a rpm
sudo dnf -y install rpm-build
grunt release

cd dist
sudo rpm -Uvh Kitematic_0.13.1_x86_64.rpm

-- If shows dependency errors:
sudo dnf -y install lsb

NOTE:
to fix console log on top of menu, before running make and grunt, edit styles/container-home.less file. You need to add margin-top:50px; so it will be like this:

.details-panel.home {
  background-color: @color-background;
  overflow: hidden;
  margin-top:50px;
  .content {

Does anyone know of a reason why this couldn't be incorporated into the main project so we get an .rpm release as well as a .deb?

Edit: you will also need sudo dnf -y install rpm-build

A solution to this is actually much simpler than first I thought. Download the zip/tar.gz of the release you want, extract it and run the following commands.

cd /path/to/kitematic
npm install
grunt release

This will create an RPM that you can install as you would normally.

You will need Grunt installed for this. I've done this using Grunt 0.4.5 and Grunt CLI 1.2.0.

@riggerthegeek that's correct - All of the builds are done on an OSX machine, which doesn't seem to have the proper electron-rpm packages needed for the RPM build.

Closing since you were able to build the RPM. Help to get it working on OSX would be great.

Was this page helpful?
0 / 5 - 0 ratings