SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞

Overview

SerenityOS

Graphical Unix-like operating system for x86 computers.

Build status Fuzzing Status

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.

I (Andreas) regularly post raw hacking sessions and demos on my YouTube channel.

Sometimes I write about the system on my github.io blog.

I'm also on Patreon and GitHub Sponsors if you would like to show some support that way.

Screenshot

Screenshot as of 0f85753.png

Kernel features

  • x86 (32-bit) kernel with pre-emptive multi-threading
  • Hardware protections (SMEP, SMAP, UMIP, NX, WP, TSD, ...)
  • IPv4 stack with ARP, TCP, UDP and ICMP protocols
  • ext2 filesystem
  • POSIX signals
  • Purgeable memory
  • /proc filesystem
  • Pseudoterminals (with /dev/pts filesystem)
  • Filesystem notifications
  • CPU and memory profiling
  • SoundBlaster 16 driver
  • VMWare/QEMU mouse integration

System services

  • Launch/session daemon (SystemServer)
  • Compositing window server (WindowServer)
  • Text console manager (TTYServer)
  • DNS client (LookupServer)
  • Network protocols server (ProtocolServer)
  • Software-mixing sound daemon (AudioServer)
  • Desktop notifications (NotificationServer)
  • HTTP server (WebServer)
  • Telnet server (TelnetServer)
  • DHCP client (DHCPClient)

Libraries

  • C++ templates and containers (AK)
  • Event loop and utilities (LibCore)
  • 2D graphics library (LibGfx)
  • GUI toolkit (LibGUI)
  • Cross-process communication library (LibIPC)
  • HTML/CSS engine (LibWeb)
  • JavaScript engine (LibJS)
  • Markdown (LibMarkdown)
  • Audio (LibAudio)
  • PCI database (LibPCIDB)
  • Terminal emulation (LibVT)
  • Out-of-process network protocol I/O (LibProtocol)
  • Mathematical functions (LibM)
  • ELF file handling (LibELF)
  • POSIX threading (LibPthread)
  • Higher-level threading (LibThread)
  • Transport Layer Security (LibTLS)
  • HTTP and HTTPS (LibHTTP)

Userland features

  • Unix-like libc and userland
  • Shell with pipes and I/O redirection
  • On-line help system (both terminal and GUI variants)
  • Web browser (Browser)
  • C++ IDE (HackStudio)
  • IRC client
  • Desktop synthesizer (Piano)
  • Various desktop apps & games
  • Color themes

How do I read the documentation?

Man pages are browsable outside of SerenityOS under Base/usr/share/man.

When running SerenityOS you can use man for the terminal interface, or help for the GUI interface.

How do I build and run this?

See the SerenityOS build instructions

Before opening an issue

Please see the issue policy.

Get in touch

IRC: #serenityos on the Freenode IRC network.

Discord: SerenityOS Discord

Author

Contributors

(And many more!) The people listed above have landed more than 100 commits in the project. :^)

License

SerenityOS is licensed under a 2-clause BSD license.

Issues
  • Shell: Better parser/AST; misc additions

    Shell: Better parser/AST; misc additions

    Let's do one of those checklist things

    • [x] decent (:tm:) parser
    • [x] decent (:tm:) AST for the parser
    • [x] Some way to express $(foo | bar)
    • [x] highlighting the AST
    • [x] would you like some completely event-based shells in your OS?
      • [x] I totally would!
    • [x] evaluating the AST
      • [x] evaluating commands until getting an argv and a list of redirections
      • [x] get/set variables
      • [x] actually running commands
      • [x] redirections
      • [x] in-shell persistent redirections with empty commands
        • [x] giving some means to clean that mess up (fd>&-?)
      • [x] pipes
      • [x] comprehensive test of all the weird stuff/features
    • [x] completions
    • [x] builtin_alias because you people can't decide whether cat should be a fun cat or an officer cat.
    • [x] ...also ~/shell-init.sh
    • [x] ...and also a few setopt things (completely unrelated to sh's setopt)
    opened by alimpfard 75
  • Kernel: SMP: Initial changes to make kernel more processor-aware

    Kernel: SMP: Initial changes to make kernel more processor-aware

    This is still work in progress:

    • [x] Add SpinLock class
    • [x] Serialize debug output with new SpinLock class
    • [x] Add Processor structure and assign it to each CPU using the fs segment register
    • [x] Get Scheduler to work on the BSP using software context switching
    • [x] Add some locks to MM, Process, and other places
    • [x] Boot each AP all the way into the Scheduler::idle_loop
    • [x] Expose all processors in /proc/cpuinfo
    • [x] Add CPU graphs and current processor information to SystemMonitor
    opened by tomuta 64
  • Kernel: Add driver for RTL8168 & RTL8111 NICs

    Kernel: Add driver for RTL8168 & RTL8111 NICs

    These are pretty common on older LGA1366 & LGA1150 motherboards. I havent had the chance to test the driver with the real NIC, waiting for the PSU for this motherboard to arrive in the mail :) If anyone has a motherboard with a RTL8168/RTL8111 variant and wants to test it while im waiting, it would be greatly appreciated!

    opened by IdanHo 53
  • Userland: Add a 'test' utility

    Userland: Add a 'test' utility

    @bugaevc

    This adds an incomplete implementation of the test util, missing some user/group checks, and -l STRING. created because me want shell tests, and we had no way to compare things.

    "minor" issue, if I name it "test", cmake complains that there's already a test target. if I try to manually rename the target (I tried set_target_properties(Test PROPERTIES RUNTIME_OUTPUT_NAME test)), ninja complains that there are multiple rules that generate Userland/test, which I assume is the test target binary. not sure how to fix that.

    opened by alimpfard 37
  • Follow-up to 8455

    Follow-up to 8455

    This is a follow-up to https://github.com/SerenityOS/serenity/pull/8455

    • Fix a few things
    • Let's try not setting owner for non-recursive mutexes, perhaps it's faster. (Although gettid() should be fast anyway.)
    • Port LWSP semaphore tests

    Now, about those tests. LWSP uses 100 threads (NPTL is very scalable — 100 threads is nothing). I turned that down to 10 threads for us (dunno how scalable our threading is, but 10 sounds reasonable); the downside is there's obviously less contention, so less chances to reproduce the potentially problematic patterns.

    But even with that, the test sometimes passes, and sometimes hangs (on test_semaphore_as_lock(), even). Which is, uh, unexpected, but also good, it means we caught a bug that we can fix and make things better. That being said, I don't know where the bug is; given that LWSP test works on Linux each time, could this bug a race in Kernel-side futex implementation?

    cc @tomuta, @supercomputer7, @gunnarbeutner

    opened by bugaevc 32
  • [WIP] LibGfx: Initial implementation of TrueType font rendering

    [WIP] LibGfx: Initial implementation of TrueType font rendering

    Fix #743 .

    This is currently incomplete. It does not support CFF fonts (that's probably best added in a later PR), and also does not support composite TTF outlines (will be adding that soon).

    I posted a screenshot on the linked issue of the demo application and TrueType Label widget I added, but I haven't included them here yet, since they require a TTF font to be present on the system. Repeating my question from the issue - would there be any licensing issues with including a font file within the project?

    Note to reviewers: I don't know if my use of ByteBuffer and different smart pointers (RefPtr, OwnPtr) is correct and/or idiomatic, so it'd be great if you could comment on that.

    Notes on the implementation I've tried to make this nearly zero-allocation and zero-copy beyond the buffer created to read the file, and the buffer allocated by Rasterizer. Structures from the font file aren't parsed on load. The Font object stores slices of the underlying buffer that correspond to the tables we are interested in. This means that startup should be fast, but rastering glyphs to bitmaps would be slightly slower. Which should be okay, since glyph bitmaps should be cached anyway.

    A Font cannot be used directly, it must be scaled to get a ScaledFont wrapper. The API requires users to first get a glyph_id for a codepoint, and then get a bitmap for the glyph_id. This is one step more than the current Font API, but I designed this keeping in mind a future HarfBuzz-like shaper, which returns a sequence of glyph IDs after shaping a run of text.

    opened by SrimantaBarua 32
  • Kernel: Add TTY features to `SerialDevice`

    Kernel: Add TTY features to `SerialDevice`

    This PR will allow us to use the newly implemented features in TTY to communicate with serial devices (like proper newline handling, control sequences, etc.).

    Currently, a very rudimentary IRQ handler is used for handling incoming data, and that should definitely be changed.

    Paging the hardware experts @IdanHo @supercomputer7

    Known problems: input is not available from non-emulated PCI serial devices, as we do not get interrupts from them.

    stale 
    opened by BertalanD 30
  • AK: Fix a race condition with WeakPtr<T>::strong_ref and destruction

    AK: Fix a race condition with WeakPtr::strong_ref and destruction

    Since RefPtr decrements the ref counter to 0 and after that starts destructing the object, there is a window where the ref count is 0 and the weak references have not been revoked.

    Also change WeakLink to be able to obtain a strong reference concurrently and block revoking instead, which should happen a lot less often.

    Fixes #4621

    @bcoles Does this solve this issue for you? I haven't tested it a whole lot, but I also haven't run into the crash you're seeing. @bugaevc Memory order review, please? ;-)

    opened by tomuta 30
  • Build: Switch to CMake :^)

    Build: Switch to CMake :^)

    This is my work on converting Serenity to be built with CMake, loosely based on @awesomekling's prior work.

    This is somewhat WIP, as I've broken some things that work with the old buildsystem.

    Everybody, please try to fix building on systems you're interested in :smile: (tagging a few people: @jarhill0 @Pagghiu @jcs @brynet @zaklaus @BobbyRaduloff)

    Oh, and the ports are most likely broken too. We're going to want to figure out how we would want them to work in the brave new out-of-tree builds world.

    opened by bugaevc 29
  • Libraries: LibCrypto + LibTLS

    Libraries: LibCrypto + LibTLS

    It is time. We must march forward towards TLS 1.2

    This PR adds:

    • Encryption / Decryption

      • AES_CBC
    • Cryptographic Hashing

      • SHA1
      • SHA256 / SHA512
      • MD5
    • Authentication / Message Digest

      • HMAC
    • Public-Key Cryptographic Systems

      • RSA
    • BigInteger support (courtesy of @itamar8910)

      • addition
      • subtraction
      • multiplication
      • divmod
    • Number theory "primitives" [Crypto::NumberTheory]

      • modular inverse
      • modular exponentiation
      • GCD / LCM
      • probable-prime-test (not rigorously tested yet)
    • LibTLS

      • Basic TLS stack
      • code that is a little obnoxious

    now can load https://jcs.org (thanks @jcs) in a record-breaking 40 seconds! (ouch)

    shot-2020-04-27_03-57-48

    opened by alimpfard 29
  • Base: Add icons to man pages for GUI applications

    Base: Add icons to man pages for GUI applications

    Differentiate terminal and GUI applications with icons next to the name of the application within the man pages of the Help application. I removed the short descriptions after the name of the application as they all seemed to be contained within the description and I feel it helps differentiate them better.

    As suggested when @jntrnr revisited Serenity: https://youtu.be/_QAsHkEKvN0?t=480

    Example of a GUI application: Screen Shot 2022-01-04 at 18 28 37

    Verses a terminal application: Screen Shot 2022-01-02 at 01 44 22

    opened by electrikmilk 28
  • Browser: Tab/BookmarkWidget button polishing

    Browser: Tab/BookmarkWidget button polishing

    • Browser: Use overflow-menu icon for hidden bookmarks the button

      97b381652a (from #14706) started using that icon for toolbars. Let’s also use it for here for the sweet system consistency!

    • Browser: Set margins for BookmarkBarWidget It’s just what GUI::Toolbar is using^1. Changed this to make the bookmark overflow button align with the bookmark button.

      old | new ---|--- |

    • Browser: Show bookmark and history page lists under the their buttons

      Previously menus were showing right under the cursor.

    • Browser: Make the bookmark button use an action

      This merges 2 duplicated definitions (one for button, second just for the keyboard shortcut) which also makes the button ‘react’ on that shortcut. :^)

    • Browser: Make Refresh action in tab context menu refresh the chosen tab

      It was sending refresh requests to the current tab instead.

    opened by krkk 0
  • LibWeb: Add NodeFilter to window object

    LibWeb: Add NodeFilter to window object

    noticed that on certain pages, Ladybird and Browser both throw the error:

    Unhandled JavaScript exception: [ReferenceError] 'NodeFilter' is not defined
    

    MDN: https://developer.mozilla.org/en-US/docs/Web/API/Document/createNodeIterator w3: https://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter

    Followed the AddNewIDL guide in the Serenity docs, to add the existing NodeFilter to the window object.

    opened by miller-time 0
  • Documentation: Add clang-format variant to EmacsConfiguration.md

    Documentation: Add clang-format variant to EmacsConfiguration.md

    Add a variant of auto formatting using clang-format that doesn't use additional packages. It works by adding a buffer-local hook to 'before-save for all C++ project files.

    opened by Riyyi 0
  • Base: Add HexEditor manual

    Base: Add HexEditor manual

    HexEditor manual with most information lifted from commit messages.

    It is worth noting that the entire help document was created, edited, tested, git committed and PR'ed from within SerenityOS.

    image

    opened by djwisdom 1
  • LibGUI+Taskbar: Change theme temporarily on hover

    LibGUI+Taskbar: Change theme temporarily on hover

    This patch makes it so that when you're hovering on a theme in the theme menu, it gets temporarily applied.

    This patch also introduces on_enter and on_leave callbacks to GUI::Action.

    opened by juniorrantila 3
Owner
SerenityOS
The Serenity Operating System
SerenityOS
A static C library to build applications for the Foenix retro computers, and, eventually, a single-tasking operating system and file browser that sits atop the Foenix MCP Kernel

@mainpage Foenix A2560 Foenix Retro OS: fr/OS A2560-FoenixRetroOS This project provides 2 things: A static C library/framework that anyone can use to

null 4 Jun 24, 2022
A simple Unix like operating system from scratch.

HOS-x86 an x86 operating system written from scratch How to Build? Currently you need NASM, GCC and QEMU to build the image file. Install the packages

Jayachandra Kasarla 15 Feb 7, 2021
🦠 µnix is a UNIX-like operating system for the raspberry pi pico.

The µnix Operating System "µnix", "munix" or, "micro unix" aims to be a micro kernel based operating system targeting the Raspberry Pi Pico. "µnix" is

Sleepy Monax 57 Jul 30, 2022
My Unix-like Operating System

Koerix What is Koerix? Koerix is a Unix-like hobby OS written in C++. I am mainly targeting the x86_64 (on PC) and the armv6a and AArch64 (on raspi/ra

Alexander Ulmer 3 Dec 15, 2021
Unox is an educational unix-like operating system. #JustForFun

Unox Unox is a x86_64 unix-like operating system written in c and assembly for learn about operating systems. Roadmap Write bootloader and linker Writ

Hasan Kashi 19 May 3, 2022
KePOS is a 64-bit operating system. Design and implement your own operating system

KePOS is a 64-bit operating system. The purpose of this system is to combine the theoretical knowledge and practice of the operating system, and to deepen the understanding of the operating system.

null 65 Jul 27, 2022
An experimental operating system for x86 and ARM

Odyssey - an experimental operating system for x86 and ARM

Anuradha Weeraman 34 Jul 5, 2022
A port of the Linux x86 IOLI crackme challenges to x86-64

This is a port of the original Linux x86 IOLI crackme binaries to x86-64. The original set of IOLI crackmes can be found here: https://github.com/Maij

Julian Daeumer 4 Mar 19, 2022
A unix operating system made from scratch using c++

pranaos A unix operating system made from scratch using c++ Dependencies g++ version should be more than 10.0.0 ninja gcc compiler needed prana os is

Krisna Pranav 17 Jul 11, 2022
🏢 An operating system that combine the desire of UNIX utopia from the 1970s with modern technology and engineering

Striking modernist shapes and bold use of modern C are the hallmarks of BRUTAL. BRUTAL combine the desire of UNIX utopia from the 1970s with modern te

Brutal 836 Jul 31, 2022
Retro Tiny Multitasking system for Z80 based computers

RTM-Z80 RTM/Z80 is a multitasking kernel, built for Z80 based computers, written in Z80 assembly language, providing its users with an Application Pro

ladislau szilagyi 99 Jul 20, 2022
Lock you keyboard and clean your screen. A simple, and easy way to clean your computers.

Pristine Cleaner A screen and keyboard cleaning application made to turn screen black, and lock keyboard for easy cleaning. With features such as star

Rhino Inani 2 Jan 16, 2022
Vectron VGA Plus generates a [email protected] VGA signal and has an interface that works with retro computers or microcontrollers.

Vectron VGA Plus Vectron VGA Plus generates a [email protected] VGA signal and has an interface that works with retro computers or microcontrollers. Screen

Nick Bild 31 Jul 27, 2022
You can get hwid serialnumbers of computers with this library!

HWID Grabber! You can get hwid serialnumbers of computers with this library! How it work? It works with Windows WMIC app. So, you can use all serialnu

Fahrettin Enes 3 Jan 17, 2022
Port of the uxn virtual machine to Atari computers (800/1200XL)

uxnatr Port of the uxn virtual machine to Atari computers (800/1200XL). This project's objective is to implement an interpreter (and possibly a compil

João Felipe Santos 6 Jan 20, 2022
BlaanSh is a Unix-like shell.

BlaanSh BlaanSh is a Unix-like shell written in C language by @os-moussao and @awbx, this shell was inspired by Bash. Content Features Brief Summary L

BlaanTeam 25 Jul 25, 2022
Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems.

Amirhossein Rajabpour 20 May 19, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 41 Jul 30, 2022
A graphical interface to set options on devices with coreboot firmware

Corevantage A graphical interface to set options on devices with coreboot firmware. Introduction This is a utility that allows users to view and modif

null 30 Jan 22, 2022