Giter VIP home page Giter VIP logo

linux.js's Introduction

linux.js

linux.js is a Nodejs library to make a debian based linux distro for your electron project.

Installation

First make sure you have these programs installed:

build-essential
wget
squashfs-tools
mkisofs

Then install the linux.js library and run npx reqs to get the required filesystem:

npm i @mainsilent/linux.js --save-dev
npx reqs

If you have problems with downloading the filesystem, you can download it from Releases then place the filesystem.squashfs in the root directory of your project and use the command below to extract the filesystem:

unsquashfs -d filesystem filesystem.squashfs

You can also delete the filesystem.squashfs after decompressing.

Usage

Specify the AppImage path in package.json, for example "AppImage": "dist/test.AppImage".

Then run the command below to make the ISO file (it will be located in filesystem directory):

npx linuxjs

You can edit the Makefile in filesystem directory to change the behaviour of npx linuxjs, for example put the ISO file in the root directory of your project.

Chroot

To install new programs for your linux distro, change the directory to filesystem and use chroot command to change the root directory:

sudo chroot ./chroot
apt install whatever
exit

linux.js's People

Contributors

mainsilent avatar

Stargazers

minlearnminlearn avatar Arnav avatar Muhammad Yusuf avatar Vladimir Vlaicu avatar  avatar Kacper Kostka avatar Daniel J. Szelogowski avatar Sefinek avatar Brian Wo avatar 5l1v3r1 avatar Angel Krejcu avatar  avatar Antônio Carlos avatar MortCodesWeb avatar

Watchers

 avatar Arnav avatar

linux.js's Issues

Cannot decompress filesystem.squashfs

Hi @MainSilent , really cool stuff here!

I was trying to follow instructions in README file, but I got stuck when decompressing filesystem.squashfs. It runs for a while (until 15125/46870 to be exact), but it then fails with following message:

FATAL ERROR:dir_scan: failed to make directory filesystem/chroot/usr/lib/x86_64-linux-gnu/perl/5.24.1/sys, because File exists

It happens in both cases: with npx reqs and by running unsquashfs -d filesystem filesystem.squashfs.

Maybe you have faced something similar? Also, it's worth noting that I got some errors before, but I saw in your video on YouTube, you have those as well, except that in my case its:

create_inode: failed to create character device filesystem/chroot/dev/zero, because Operation not supported

not because you're not superuser!. Probably I should also mention that I'm trying to run this thing under WSL2.
I'll be grateful for any help, thanks!

#ask

can we making our custom debian distribution with Graphical User Interface using this project?

npx electron-builder

when i type npx electron-builder in the terminal i get this error:Error: Cannot find module 'fs/promises'
Require stack:

  • /home/antos20dev/Documents/ANTOS2.0DEV/node_modules/builder-util/out/fs.js
  • /home/antos20dev/Documents/ANTOS2.0DEV/node_modules/builder-util/out/util.js
  • /home/antos20dev/Documents/ANTOS2.0DEV/node_modules/electron-builder/out/cli/cli.js
  • /home/antos20dev/Documents/ANTOS2.0DEV/node_modules/electron-builder/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/home/antos20dev/Documents/ANTOS2.0DEV/node_modules/builder-util/src/fs.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/home/antos20dev/Documents/ANTOS2.0DEV/node_modules/builder-util/src/util.ts:25:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)

pls help

Questions

Hey, sorry for posting this in issues but I'm not sure where to put this. I have a couple questions. 1. How does this work? 2. Is it free to use? Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.