Operating System Demo [Early Access]

Operating System Demo

The current demo can be found here: Operating System Demo (Early Access) - Roblox

What is this?

This demo allows users to create, maintain, and produce their own operating system. This comes bundled with the default operating system, Sword, with the Desktop Environment by the same name (SDE), as well as the default Desktop Environment which allows users to directly interface with the Operating System simulator through the command line.

Operating systems are placed on separate distinct and virtual “drives” which can be booted into via the “BIOS”.

What’s it for?

This project was revived at a time where I was exploring a vast amount of Linux distributions to use as my main distro, but with time it became obvious to me that quite a lot of people never had any experience with a terminal in their life. By instead jumping head-first into a barely guided terminal which had to be used to unlock the desktop environment, I hoped this would encourage many people to learn about how useful this skill really is.

Where’s the Github?

https://github.com/glorpglob/OS-Demo/
Please do note that this is updated slowly and may have compatibility issues.

Update log

Moved here

Guides

Swapping between the default desktop environment and the Sword desktop environment in Sword
$ sudo `setdeskenv Sword`
$ sudo `restart`

Alternatively users can run:

$ sudo `run_os setdeskenvSword`
Changing the actual default desktop environment in Sword
$ sudo `savestorage deskenv 'CHANGE'`

Alternatively, you could write your preferred desktop environment in tedit, and then save with the command s 'deskenv'

tedit commands
  1. x - clears the text editor
  2. sx - saves and clears the text editor. Accepts one argument within the syntax 'arg', it reflects the storage location
  3. s - saves the text editor. Accepts one argument within the syntax 'arg', it reflects the storage location
Scripts

Users can execute longer sequences of commands automatically. These can be made via the upcoming text editor and are executed using the following syntax:

$ run [scriptname]

If the script is included in Sword, it can be executed like so:

$ sudo `run_os [id]`

You can make these in tedit. They follow the default syntax, but commands are separated with ;. For example a script which sets the desktop environment to sword and then restarts:

sudo `setdeskenv Sword`;
sudo `restart`;

NB: in the future I may release a new format for scripts which can allow for features like conditional arguments, similar to bash. Older scripts using this format will not be effected. If a user wants to use the future format, they will have to prefix their script telling the interpreter to see that.
NB: keep in mind, the interpreter is written in lua and is therefore slow

System commands

Please note: executing any of these requires access to the terminal
They are executed with the syntax: system 'command'

  1. restart
    This allows you to completely restart your system if you experience a critical error you cannot recover from
Root user perms

Root is a user with special permissions. Root can be signed into with the username root and password admin123.
The root user can execute special commands in any command prompt which a normal administrator will not be able to execute.
You can run root commands under a normal administrator account with the syntax:

$ sudo `command`

however, you may only execute one command at a time otherwise it will error (unintended feature).

Importing an operating system

Note: This may not be possible anymore due to recent Roblox updates

$ sudo `add_os [MAINMODULEID]`

Note: Any server scripts will be automatically removed to prevent abuse

Saving and getting data from datastoreservice with your OS

You cannot use DataStoreService by itself as all server scripts are deleted by default.
You can make a request to game.ReplicatedStorage.data[name], for example:

  1. Getting data
game.ReplicatedStorage.data.get_data:InvokeServer(Player.UserId, "OSNAME")
  1. Saving data:
game.ReplicatedStorage.data.save_data:FireServer(Player.UserId, "data", "OSNAME")

Upcoming features

  • More advanced scripting language
  • Basic lua sandboxing
  • Port SaveDataAPI from BIOS demo.
2 Likes