XiaoYu OS
XiaoYu OS is a brand new operating system built for the modern engineer’s daily workflow. Every application runs in secure, isolated environement with minimal privileges, requesting permissions only when needed. This also ensures a pristine system, even after years of use, free from accumulated clutter or hidden processes. XiaoYu OS empowers developers to directly maintain their applications, eliminating the need for dedicated package maintainers.
What makes XiaoYu OS unique?
The XiaoYu OS is the result of the author’s long-term thinking about operating system and human-computer interaction. It is a completely new design, from its visual appearance to its internal workings. The system includes many innovative features that make it unique.
-
Strict security
Except for a few programs such as the system initializer, graphic compositor and message bus, all applications run in their own containers. Applications are granted minimal permissions, so you can run any application without worrying about it modifying your system or accessing your private data and files.
-
Clean and tidy
Temporary data and files generated by applications are limited to their own containers. When an application is removed, all associated cache and temporary files are automatically removed, ensuring no garbage is left in the system.
-
High availability
The system avoids the use of global dynamic shared libraries. Instead, each application bundles its own required libraries and resources, ensuring uninterrupted operation even in the face of major system updates or modifications.
To minimize file redundancy, commonly used shared libraries are packaged into a component called “Core.” A system can simultaneously support multiple versions of “Core,” while each application can only depend on a specific version. This approach achieves a balance between reducing application size and avoiding shared libraries version compatibility and conflict issues.
-
High portability
Unlike traditional applications that require installation and often system modifications, XiaoYu OS applications are entirely portable. Simply copy the application to your system and run it immediately. Even the copying step can be bypassed; a URL representing the application suffices, and the system will automatically download and cache the necessary code and data from the internet. XiaoYu OS revolutionizes not only the user experience of obtaining applications but also the developer workflow for application distribution.
Even XiaoYu OS itself does not require installation. Booting XiaoYu OS is as simple as copying its image to a USB Flash Disk.
-
Brand new UI
XiaoYu OS has a brilliant, dynamic UI that prioritizes efficiency. The new UI steers clear of the shortcomings of traditional UIs, such as rigidity, monotony, and operational inconvenience. It offers a user-friendly and flexible experience that is visually appealing and consistently refreshing. (For details, please refer to the following chapters.)
-
New interaction mode
XiaoYu OS introduces a new approach to human-computer interaction called XiaoYu Terminal, which integrating CLI, GUI, dataset workbench and large language model (LLM) assistance. XiaoYu Terminal empowers advanced users and engineers with an exceptionally flexible and efficient work environment. (For details, please refer to the following chapters)
-
Seamless Linux application compatibility
XiaoYu OS provides a Linux compatibility layer, which allows traditional Linux applications (including CLI programs and GUI applications) to run seamlessly with near-zero performance loss. As a result, XiaoYu OS boasts a large number of high-quality, mature and professional application from the very outset.
An overview of the UI
Colorful by design
Applications can now ditch the standard “light” and “dark” themes and choose their own unique color schemes. You can even personalize your desktop further by assigning different colors to different apps, making your workspace truly your own.
Clean and uncluttered
Forget the space-wasting status bar and rarely used search bar. The XiaoYu OS desktop is all about minimalism, featuring only the essentials: a Launcher Button, Task Manager Bar, and Status Controller. This clutter-free environment keeps your desktop looking fresh and organized.
Efficiency at your fingertips
The Launcher is designed for simplicity and speed. All your applications are listed directly, eliminating the need to navigate through submenus. Frequently used apps can be added to the “Favorites” list for even faster access.
And for common tasks like document management, music playback, and photo viewing, the launcher provides built-in functionality, saving you the hassle of switching between multiple applications.
**Windows as tabs"
Any two or more windows can be merged into a single window and the original windows can be managed as tabs.
Smart status control
The status controller displays only the most essential information and controls, adapting to your current activity. For instance, playing music reveals additional “Now Playing” controls.
It also offers quick access to features like calendar, schedule, and message notifications through a convenient pop-up.
Dynamic task management
The XiaoYu OS taskbar is dynamic, displaying only currently running applications without any grouping or hiding. This ensures you can easily find the window you need with just a single click.
Familiar Look and Feel
XiaoYu OS’s UI uses window components that are similar to the web, making it easy for both developers and designers to design application interfaces.
Accessibility
TODO (‘zoom’, ‘command palette’, ‘middle button as drag scroll’ … are available on every application)
An overview of the XiaoYu Terminal
TODO, e.g. application as component (embeds another application as a component)
Q & A
Is XiaoYu OS a toy operating system?
No, XiaoYu OS is not designed for educational purposes or as a hobby project. It aims to be fully functional operating system for daily use.
Is XiaoYu OS a Linux distribution?
No, XiaoYu OS is not a Linux distribution in the traditional sense. While it is based on the Linux kernel for hardware compatibility, all user-space programs are developed from scratch using XiaoXuan Native, XiaoXuan Core, and Rust. This means that XiaoYu OS does not include common Linux software packages such as Glibc, Systemd, Coreutils, Binutils, and GCC, nor does it have package managers like APT, RPM, DNF, or Pacman. As a result, regular Linux programs cannot run directly on XiaoYu OS.
However, XiaoYu OS includes a built-in “Linux compatibility layer” that allows most Linux applications to run seamlessly. You can also create Arch, Ubuntu, and Fedora-like Linux environments within XiaoYu OS, allowing you to add or remove applications using familiar methods. This is similar to WSL in Windows and Linux in ChromeOS, but with significant improvements.
Why not make XiaoYu OS a Linux distribution?
There are already many excellent and mature Liunx distributions available, such as Arch, Ubuntu, Debian, and Fedora. I believe there is no need to create “yet another Linux distribution”. Additionaly, maintaining a distribution’s software repository requires a significant amount of effort, which is beyond my personal capabilities. I am more passionate about creating a new operating system that can attract both application developers and users while reducing the burden on system developers.
While the Linux world offers a vast collection of libraries and programs, it also carries a significant historical burden. These legacy issues can complicate simple tasks and discourage new developers and users. XiaoYu OS, drawing lessons from these challenges, aims to liberate system developers, application developers, and users from these burdens by providing a completely new environment.
How does XiaoYu OS differ from “Immutable Linux”
XiaoYu OS and “Immutable Linux” (e.g. NixOS, Fedora Silverblue) share a similar architecture, but XiaoYu OS provides a completely new runtime environment, including libraries, tools, and languages.
Which desktop environment does XiaoYu OS use?
XiaoYu OS uses a custom desktop environemnt developed by me. It has its own unique look and feel, following its own UI design guidelines, and offers a more intuitive user experience.
The desktop environment (graphic server) is based on the Wayland display server protocal, so traditional Linux GUI programs can still run on XiaoYu OS.
Can you briefly describe the system architecture of XiaoYu OS?
The system architecture of XiaoYu OS is very simple and straightforward. It consists of four layers:
- Base System
- Core/Runtime (providing common libraries, GUI libraries, etc.)
- Containers
- Applications
How do Linux applications run on XiaoYu OS?
XiaoYu OS has a lightweight “Linux Compatibility layer” that create a classic Linux file hierarchy structure, maps the user directory, and launches Linux applications through containers. From the perspective of the Linux application, it is running on a regular Linux system.
Can all Linux applications run normally on XiaoYu OS?
Almost all Linux applications can run on XiaoYu OS, except for those that modify the system or hardware. Some system programs may run but not produce correct results. For example, a program that displays network interface IP addresses will show a virtual IP address instead of the host’s real address.
Can XiaoYu OS native applications communicate with Linux applications?
Yes, they can. For example, you can use XiaoYu Terminal to edit a text file by calling Vim. You will need to “install” a pre-packaged version of Vim using XiaoYu OS’s application manager.
Can you show me the disk partition layout of XiaoYu OS?
Sure, here is a typical XiaoYu OS disk parition layout. Users can customize the layout according to their needs.
What is “Base System B”?
XiaoYu OS’s “Base System” is a tiny, immutable, atomically updated base system. It contains the Linux kernel, system initializer, message bus, and other basic programs. The base system is read-only. To update the base system, you can only update from “Base System A” to “Base System B” (or vice versa). When the update is complete, the system bootloader will choose the newer version from partitions A and B when the machine boots next. The A/B system ensures that the system can always boot correctly and will not be damaged due to a half-completed update.
What happens if I run the command sudo rm -rf /
?
On traditional Linux systems, running this command will delete all the files on the system, including the operating system and user data. This is a classic and dangerous command to misuse.
On immutable Linux systems, the base system is “read-only” and is therefore preserved. The machine can still be booted, but user-installed software, configurations, and data will still be lost, and the system will be restored to its inital state.
With XiaoYu OS, the situation is different. The rm
command is not granted permission to delete the base system or application software, nor is it granted permission to delete the entire user data directory. Therefore, running the command sudo rm -rf /
will do nothing by default. If it is run in Linux compatibility mode, the command can only delete virtual files in the container, and has no effect on other containers or the host system.
In short, in XiaoYu OS, even if you are not familiar with the system, no wrong operation will cause serious consequences.
It is worth mentioning that the
rm
command in XiaoYu OS has been rewritten. Delteted files will be put in the “Recycle Bin” instead of disappearing directly, so even if you delete the wrong file, you can still recover it.
Motivation
Linux is my primary desktop operaing system. The more I learn about it, the more I appreciate its power and greatness. I am also grateful to the hundreds of developers and maintainers who have contributed to this system. However, like many Linux fans, I have encountered countless confusing problems over the years, each of which has cost me several nights of sleep. I have also tried dozens of distributions and switched between GNOME and KDE countless times.
As as result, an immature idea gradually emerged: I want to create a different Linux distribution, an operating system that saves users trouble.
It didn’t take long for me to implement a system initializer, a container service, and other basic programs in the C language, completing a simple prototype. Later, after learning the Rust language, I rewrote these programs in Rust. Now that I have my own progamming language and compiler, I am ready to switch to the XiaoXuan Lang.
During this time, I began to have second thoughts about my original idea. I realized that it is not enough to just solve user-side problems. In the Linux environment, application (mainly desktop application) developers and system maintainers also encounter many frustrating problems, and creating a “special Linux distribution” or a “immutable Linux” will not change that.
Therefore, I believe that we should rethink the design of the entire system. The new system should absorb the advantages of other modern systems, provide new development tools (programming languages) and libraries, reduce the burden on developers, and reduce the problems encountered by users. At the same time, it should use certain mechanisms to allow traditional Linux applications to run normally. Just as Android and ChromeOS, which are also based on the Linux kernel, have been successful on mobile devices and netbooks, I believe that the new system has the potential to succeed on the desktop.
This is the origin of the XiaoYu OS project.
However, developing a new system is a huge undertaking. XiaoYu OS is just getting started, so there are no programs to download or experience yet. In the future, I will continue to add document to the project, complete the development of basic programs, and update information will be published in the blog section of this website.
If you think my project is meaningful, please consider sponsoring me. This is really important for a project that requires a long time commitment, thank you!
Related projects
- XiaoYu UEFI a bootloader for XiaoYu OS