Electron packager tutorial

Example electron app

This guy made a nice tutorial on electron with the code here, a perfect starting point if you’ve just arrived at electron

https://github.com/bradtraversy/electronshoppinglist

Install the dependencies to your system and app:

Adding the scripts to your package.json

And run

 

To create a package for debain, aka .deb

This guys has written a nice blog post on it:

https://www.christianengvall.se/electron-installer-debian-package/

 

Ubuntu/Linux Mint Open Office

I grew up with Windows and thus MS Office… As MS introduced the Ribbon feature, IMO things went downhill. The program got overly complex and a drain on resources, as such I came upon OpenOffice… great! An open source alternative to MS Office and it worked nicely.

Then a some years back, I started messing around with Dual Booting my machine, Windows on one side and Ubuntu on the other. But with Ubuntu came LibreOffice, which to this day just does not work cleanly and smoothly as OpenOffice does.

These days, triggered by the ultimate in shady operating systems, Windows 10, I no longer dual boot and instead only use Linux. As a developer I rarely need to use Office, so up until now I have put up with inadequacies of LibreOffice… but today when I actually had to write a document from scratch, enough was enough.

Installing OpenOffice on Linux:

  1. Remove LibreOffice:
  2. Clean up:
  3. Download the latest DEB from https://www.openoffice.org/download/
  4. Untar the compressed file either via cli or right cliking on the tar and selecting ‘Extract here’
  5. Open a command line in the extracted folder
  6. Change dir to DEBS
  7. Install all the program files:
  8. Install all the desktop icons for OpenOffice:
  9. Done.

 

Apache files as not www-data

There used to be a pretty cool mod for apache that allowed it to run certain vhosts as someone other than www-data.

Unfortunately this mod has not been kept up to date and doesn’t work reliably on newer versions of Apache2. As such you are left with a dilema, either act as apache or add apache and yourself to a group who has rights to the files.

For a dev server the better option IMO is to allow devs to ssh in as apache and thus nothing else is required. Each dev can sync their files and everything just works nicely. The reason for this is the usual suspect, Windows. Although there is Cygwin which gives linux toolbox to Windows users, there is still no way around syncing between Linux and Windows and the permissions being correct. Windows and *nix file systems are just fundamentally different. Don’t believe me, try it out for yourself, either:

  1. Rsync a fileset from a linux server to a windows desktop. Now try work on them or sync them back or even try commit the changes to git.. no joy.
  2. Rsync a  fileset from a windows desktop to a linux server.. it is basically not possible yet to retain all the file permissions. Doesn’t matter which flags you add.

Back to the topic

NB: To see users and groups see this post: previous post

Create a new usergroup webdev and add the www-data user to it and then any other users you need in this group.

At this point you have a group apache and you can both write within it. Now in the folder with the files you want to work on and apache to server you need to apply a default group:

Next we can verify:

Output:

Last thing to do is to make sure, the group webdev has rwx rights on the files