Add linux to Terminal

This commit is contained in:
Dustin Brett
2024-03-10 13:02:06 -07:00
parent 2c18b3e555
commit fab5c1858c
4 changed files with 9 additions and 0 deletions

View File

@@ -48,3 +48,5 @@ export const PRIMARY_NAME_SERVER = [
"1.1.1.1",
];
export const BACKUP_NAME_SERVER = ["https://dns.google/resolve", "8.8.8.8"];
export const LINUX_IMAGE_PATH = "/System/linux.bin";

View File

@@ -68,6 +68,7 @@ export const commands: Record<string, string> = {
wapm: "Run universal Wasm binaries.",
weather: "Weather forecast service",
whoami: "Displays user information.",
wsl: "Launches the default Linux shell.",
xlsx: "Convert a spreadsheet file to another format.",
};
@@ -96,6 +97,7 @@ export const aliases: Record<string, string[]> = {
ver: ["version"],
wapm: ["wasmer", "wax"],
weather: ["wttr"],
wsl: ["linux"],
};
const directoryCommands = new Set([

View File

@@ -7,6 +7,7 @@ import { runJs } from "components/apps/Terminal/js";
import { colorAttributes, rgbAnsi } from "components/apps/Terminal/color";
import {
BACKUP_NAME_SERVER,
LINUX_IMAGE_PATH,
PI_ASCII,
PRIMARY_NAME_SERVER,
config,
@@ -1068,6 +1069,10 @@ const useCommandInterpreter = (
case "whoami":
printLn(`${window.location.hostname}\\public`);
break;
case "wsl":
case "linux":
open("V86", { url: LINUX_IMAGE_PATH });
break;
case "xlsx": {
const [file, format = "xlsx"] = commandArgs;

BIN
public/System/linux.bin Normal file

Binary file not shown.