From a7eb097d501ee7fa7415f43f2abec58812f7e604 Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Sat, 7 Aug 2021 01:56:11 +0500 Subject: [PATCH] Update README.md --- README.md | 72 ++++++++++++++++++++++--------------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 3f87ae2..07f2e1f 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,34 @@ ## Conty -This is an easy to use unprivileged Linux container compressed into squashfs and packed -into a single executable that works on most Linux distros. It's designed to be as simple and user-friendly as possible. +This is an easy to use unprivileged compressed Linux container packed into a single executable that works on most Linux distros. It's designed to be as simple and user-friendly as possible. You can use it to run any applications, including games (Vulkan and OpenGL). -You can use it to run any applications, including games (Vulkan and OpenGL). - -Besides, due to bubblewrap, Conty also supports true filesystem sandboxing, so you can even use it to isolate applications. - -It uses two technologies: -* SquashFS (using [squashfuse](https://github.com/vasi/squashfuse)) -* Linux namespaces (using [bubblewrap](https://github.com/containers/bubblewrap)) +Besides, Conty supports true filesystem sandboxing, so you can even use it to isolate applications. ## Features -* Single executable - download (or create) and run, nothing else is required. +* A single executable - download (or create) and run, nothing else is required. * Root rights are **not required**. -* Compressed into squashfs, so it takes much less disk space than -uncompressed containers. -* Contains many libraries and packages so it can run almost everything. And you don't -need to install anything on your main (host) system. **You can even run 32-bit applications -on pure 64-bit systems**. -* Based on Arch Linux, so it contains latest software, including latest -videodrivers. -* Almost completely seamless experience. All applications that you run -with Conty read and store their configs in your HOME directory as if you weren't -using the container at all. +* Compressed (with squashfs or dwarfs), so it takes much less disk space than uncompressed containers and provides faster file system access. +* Contains many libraries and packages so it can run almost everything. And you don't need to install anything on your main (host) system. **You can even run 32-bit applications on pure 64-bit systems**. +* Based on Arch Linux, contains latest software (including latest videodrivers). +* Almost completely seamless experience. All applications that you run with Conty read and store their configs in your HOME directory as if you weren't using the container at all. * No performance overhead. Since it's just a container, there is almost no overhead, thus all applications will run at full speed. * Supports Xorg, Wayland and XWayland. * Supports filesystem sandboxing (thanks to bubblewrap). ## Requirements -The only requirements are **bash**, **fuse2** (or **fuse3**), **tar** and **coreutils**. And your /tmp directory +The only requirements are **bash**, **fuse2** (or **fuse3**), **tar**, **gzip** and **coreutils**. And your /tmp directory should allow files execution (which it does by default on most distros). -Besides, your Linux kernel should be at least version 4.4 and should support unprivileged user namespaces. On some +Your Linux kernel must be at least version 4.4 and should support unprivileged user namespaces. On some Linux distros this feature is disabled by default and can be enabled with sysfs: ``` sysctl kernel.unprivileged_userns_clone=1 ``` -or -``` -echo 1 > /proc/sys/kernel/unprivileged_userns_clone -``` -Even if unprivileged user namespaces are not supported in your kernel, you can still use Conty if you have bwrap with SUID bit in your system, in this case just tell Conty to use system-wide bwrap and squashfuse instead of the builtin ones. +Even if unprivileged user namespaces are not supported by your kernel, you can still use Conty if you have bwrap with SUID bit installed on your system, in this case just tell Conty to use system-wide bwrap and squashfuse instead of the builtin ones. ``` export USE_SYS_UTILS=1 @@ -54,7 +37,7 @@ export USE_SYS_UTILS=1 ## Usage -Either download ready-to-use executable from the [**releases**](https://github.com/Kron4ek/Conty/releases) page or create your +Either download a ready-to-use release from the [**releases**](https://github.com/Kron4ek/Conty/releases) page or create your own (the instructions are below). Make it executable before run. ``` @@ -62,13 +45,7 @@ chmod +x conty.sh ./conty.sh command command_arguments ``` -For example, if you want to run an application from somewhere on your storage run something like: - -``` -./conty.sh /path/to/a/binary -``` - -Conty also contains Steam, Lutris, PlayOnLinux, Wine-Staging-TkG and many more. +Conty contains Steam, Lutris, PlayOnLinux, Wine-Staging-TkG and many more. ``` ./conty.sh steam @@ -107,7 +84,11 @@ There are many more integrated programs. You can list all of them with: ./conty.sh ls /usr/bin ``` -Let me know if you want something else to be included in the container. +It is possible to run arbitary binaries from your storage. For example, if you want to run an application that resides on your HOME run something like: + +``` +./conty.sh /home/username/SomeApplication/binaryfile +``` There are some other features, see the internal help for more information. @@ -117,7 +98,6 @@ There are some other features, see the internal help for more information. ## Sandbox - Conty uses bubblewrap and thus supports filesystem sandboxing. By default it's disabled and almost all directories on your system are available for the container. @@ -151,7 +131,7 @@ Nvidia users will experience graphics acceleration problems if their Nvidia kern For example, if the version of your Nvidia kernel module is 460.56 and the libraries inside the container are from 460.67 version, then graphics acceleration will not work. -There is an experimental solution for this problem that can be enabled with the **NVIDIA_FIX** variable. If you encounter this problem, please let me know if this feature does or doesn't fix it for you. +There is an experimental solution for this problem that can be enabled with the **NVIDIA_FIX** variable. I don't have a Nvidia GPU to test this function properly, so it might or might not work. ``` export NVIDIA_FIX=1 @@ -160,10 +140,10 @@ export NVIDIA_FIX=1 ## How to update -There are three ways to update Conty and get the latest packages, use whichever is more convenient for you. +There are three main ways to update Conty and get the latest packages, use whichever works best for you. * First of all, you can simply download latest release from the [releases page](https://github.com/Kron4ek/Conty/releases), i usually upload a new release every two weeks. -* You can use the self-update feature (`./conty.sh -u`) integrated into Conty, it will update all integrated packages and will rebuild the squashfs image. Read the internal help for more information about it. +* You can use the self-update feature (`./conty.sh -u`) integrated into Conty, it will update all integrated packages and will rebuild the squashfs/dwarfs image. Read the internal help for more information about it. * You can manually create a Conty executable with latest packages inside, read the "**How to create your own Conty executables**" section below. ## How to create your own Conty executables @@ -175,12 +155,18 @@ If you want to create Arch-based container, use the **create-arch-bootstrap.sh** You can edit the script if you want to include different set of packages inside the container. -When distro is obtained, use the **create-conty.sh** script to create a squashfs image and pack everything needed into a single executable. +When distro is obtained, use the **create-conty.sh** script to create a squashfs (or dwarfs) image and pack everything needed into a single executable. ``` ./create-conty.sh ``` -By default it uses the lz4 algorithm for squashfs compression, but you can edit it and set zstd algo to get better compression ratio (keep in mind though that your squashfs-tools should support zstd for that to work). +By default it uses the lz4 algorithm for the squashfs compression, but you can edit it and choose zstd to get better compression ratio (keep in mind though that your squashfs-tools should support zstd for that to work). Done! -For the sake of convenience, there are compiled binaries (**utils.tar**) of bwrap and squashfuse and their dependencies uploaded in this repo, **create-conty.sh** uses them by default. However, you can easily compile your own binaries by using the **create-utils.sh**, it will compile bwrap and squashfuse and will create utils.tar. If you are going to use your own utils.tar, make sure to set the correct size for it in the **conty-start.sh**. +For the sake of convenience, there are compiled binaries (**utils.tar.gz**) of bwrap, squashfuse and dwarfs and their dependencies uploaded in this repo, **create-conty.sh** uses them by default. However, you can easily compile your own binaries by using the **create-utils.sh**, it will compile bwrap, squashfuse and dwarfs and will create utils.tar.gz. If you are going to use your own utils.tar.gz, make sure to set the correct size for it in the **conty-start.sh**. + +## Main used projects + +* [bubblewrap](https://github.com/containers/bubblewrap) +* [squashfuse](https://github.com/vasi/squashfuse) +* [dwarfs](https://github.com/mhx/dwarfs)