Skip to content

Instantly share code, notes, and snippets.

@jelizarovas
Created February 13, 2021 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelizarovas/d28a879ab4763eb01e9822b49255ac86 to your computer and use it in GitHub Desktop.
Save jelizarovas/d28a879ab4763eb01e9822b49255ac86 to your computer and use it in GitHub Desktop.
journey to install lite code editor
I want to develop on my pixelbook. Installing vscode on it runs like crap, with ms delay between typing. So i was looking for alternatives.
Tried `https://github.com/cdr/code-server` but could not live reload, because watching my repo and running it at the same time errored out.
Tried installingn bracket - which already did not look promising - ran into installation problems, scrap it.
But when my work got cancelled, and after going through my email medium weekletter i found this article `https://medium.com/swlh/i-switched-to-lite-after-using-vscode-for-3-years-16f2fffa6143`
It looks like low latency promising editor that should run on it.... the problem is with installing it. Can't figure it out.
```
Step 1 `Download the following repository into your computer`
Step 2 `sudo apt-get install libsdl2-dev`
Step 3 `bash build_release.sh`
Step ??? PROFIT
Once lite.zip is created, you can extract the files to a preferred directory. Finally, execute ./lite to launch the Lite code editor. You can copy plugin files to data/plugins to activate your favorite features.
```
the article makes it seem easy to install, but i failed....
searched through youtube - no luck
tried downloading all the releases - `https://github.com/rxi/lite/releases/tag/v1.11 `
```
lite.zip -1.02 MB
Source code -(zip)
Source code -(tar.gz)
```
in the pull requests i saw a 'lite-xl' mentioned there and they have a section whwere `https://github.com/franko/lite-xl`
```
# To install the required libraries:
sudo apt install libfreetype6-dev libsdl2-dev
# To install Meson:
sudo apt install meson
# or pip3 install --user meson
To build Lite XL with Meson use the commands:
meson setup build
meson compile -C build
meson install -C build
```
but what the hel is meson??? ughh... and in this artice `https://itsfoss.com/best-modern-open-source-code-editors-for-linux/`
it has a line
```
Unfortunately, as of now, there’s no easy way to install it, you have to build it from source on Linux.
```
trying to compile i get `-bash: gcc: command not` so now i have to get gcc,whichi i found here
`https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/`
```
Start by updating the packages list:
sudo apt update
Install the build-essential package by typing:
sudo apt install build-essential
The command installs a bunch of new packages including gcc, g++ and make.
You may also want to install the manual pages about using GNU/Linux for development:
sudo apt-get install manpages-dev
To validate that the GCC compiler is successfully installed, use the gcc --version command which prints the GCC version:
gcc --version
```
maybe now it will run??
@jelizarovas
Copy link
Author

well this is my first time making a gist, and apparently it's not a public readme - it's just for code, so my markdown formatting is useless there 👯

@jelizarovas
Copy link
Author

sudo bash build.sh
outputs

compiling (unix)...
linking...
cleaning up...
done

and then ./lite

./lite
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
lite: src/renderer.c:60: ren_init: Assertion `win' failed.
Aborted (core dumped)

@jelizarovas
Copy link
Author

ok, let's google how to linux compile and install source code

Download a tarball (tar.gz or tar.bz2 file), which is a release of a specific version of the source code
Extract the tarball with a command like tar zxvf myapp.tar.gz for a gzipped tarball or tar jxvf myapp.tar.bz2 for a bzipped tarball
cd into the directory created above
run ./configure && make && sudo make install

so i run root@penguin:/home/jelizarovas# tar zxvf lite-1.11.tar.gz & cd into dir

-bash: ./configure: No such file or directory```

so failed..

@jelizarovas
Copy link
Author

ok, but

root@penguin:/home/jelizarovas/lite-1.11# bash build.sh
compiling (unix)...
linking...
cleaning up...
done

and


root@penguin:/home/jelizarovas/lite-1.11# ls
build_release.sh  data      icon.inl  README.md  src
build.sh          icon.ico  LICENSE   res.rc     winlib

and after

root@penguin:/home/jelizarovas/lite-1.11# ls
build_release.sh  data      icon.inl  lite       res.rc  winlib
build.sh          icon.ico  LICENSE   README.md  src

so i have a new file 'lite', but when i try to run ./lite
i get

No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
lite: src/renderer.c:60: ren_init: Assertion `win' failed.
Aborted (core dumped)

@jelizarovas
Copy link
Author

and i've finally launched it!!!!

image

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