Linux in your browser

Запустить Linux в браузере — поможет эмулятор jor1k (со встроенными Monkey Island, Doom и Frontier Elite II)

В материале говорим о возможностях этого открытого инструмента и его технических параметрах. Также расскажем об аналогичных проектах, разрабатываемых в этой сфере.

В предыдущих сериях:

  • «Смеха ради»: для чего могут понадобиться программные инструменты, у которых нет «боевого» применения
  • Разобраться в политиках конфиденциальности приложений и сервисов — помогут нейросети


Фото — Faris Mohammed — Unsplash

Что это за инструмент

Jor1k представляет собой эмулятор микропроцессора, построенного на базе микроархитектуры OpenRISC 1000. Это — 32 разрядный чип, который открытое сообщество разрабатывает под лицензией LGPL. Устройство использовали в НАСА для создания наноспутника TechEdSat.

Эмулятор написан на JavaScript и работает из браузера. Jor1k увидел свет в 2013 году и с тех пор поддерживается автором. Им выступил Себастьян Макке (Sebastian Macke). Ему помогали несколько коллег по цеху, среди которых значится Жерар Браад (Gerard Braad), ведущий инженер-программист из Red Hat. Авторы проекта говорят, что запустили его для демонстрации возможностей JavaScript.

Инструмент можно использовать как образовательную платформу в университетах. Он также подходит на роль бенчмарка для тестирования JS-движков и может стать альтернативным способом портировать старое ПО на современные системы. Есть мнение, что jor1k сможет выступить в роли узла для TAILS-системы, исключив необходимость выделять отдельную машину.

Что он умеет

В качестве демо есть несколько системных образов — их список представлен в подразделе Demos на GitHub. Большая часть построена на Linux 3.16, позволяет работать с графикой X.Org и Wayland/Weston плюс запускать различные приложения. Например, в jor1k есть два встроенных бенчмарка — nbench и coremark. Первый разработали в 90-х годах специалисты из ныне закрытого журнала о микрокомпьютерах BYTE. nbench позволяет оценить производительность памяти, а также CPU и FPU. Что касается coremark, то это свод бенчмарков для процессора во встраиваемых системах. Среди заданий для тестов есть: обработка связных списков и матриц плюс подсчет суммы CRC.

Также в jor1k можно воспроизвести несколько видеороликов и поиграть в компьютерные игры. Среди них есть Monkey Island, Doom и Frontier Elite II. В частности, Monkey Island запускается с помощью утилиты ScummVM, разработанной специально для загрузки игр студии LucasArts.

Хотя стоит отметить, что производительность игр оставляет желать лучшего — курсор реагирует на движения мыши достаточно медленно, плюс присутствует задержка после клика.

Картинка выводится при помощи эмулируемого фреймбуфера с разрешением 640×400 и поддержкой сенсорного экрана LPC32xx. Данные система хранит на виртуальном ATA-диске в 64 килобайта и обрабатывает их 32 мегабайтами оперативной памяти. Ввод организован с помощью драйвера виртуальной клавиатуры. В jor1k встроен ethernet-контроллер, позволяющий выходить в интернет из сэмулированной в браузере среды. Один из резидентов Hacker News в тематическом треде отмечает, что в этом случае разработчики перенаправляют все запросы через собственный сервер.

Эмулятор поддерживает многопоточную работу с двумя, четырьмя, восемью и шестнадцатью ядрами. Каждая версия эмулятора загружается по отдельной ссылке — их можно найти в подразделе Demos официального репозитория. Отметим, что при увеличении числа ядер система начинает работать нестабильно — в будущем разработчики планируют решить эту проблему. При этом пользователи с Hacker News отмечают, что эмулятор функционирует быстрее в Firefox, чем в других браузерах. Такое поведение системы связано с более качественной оптимизацией под его JIT-компилятор.

Читайте также:  Stereo tool для windows

Другие эмуляторы

В рамках проекта JSLinux также разработан эмулятор на JavaScript для 32-разрядного CPU (x86). Его автором выступил французский математик Фабрис Беллар (Fabrice Bellard), который написал библиотеку для декодирования аудио и видеофайлов libavcodec.

Эмулятор построен на основе динамического транслятора из проекта QEMU. Система также задействует типизированные JavaScript-массивы, увеличивающие производительность и уменьшающие потребление памяти при работе с данными фиксированного размера.


Фото — Ivy Barn — Unsplash

Над Linux-эмулятором на JavaScript трудились и инженеры из RISC-V Foundation. Их система называлась riscv-angel и позволяла запустить riscv-linux с набором утилит BusyBox.

Можно с уверенностью сказать, что если подобные решения продолжать совершенствоваться, они могут стать новым витком в развитии терминальных технологий и облачных решений. Особенно актуальными системы вроде jor1k будут для крупных компаний. Так, их сотрудники смогут получать доступ к удаленным рабочим столам с помощью обычного браузера.

Мы в 1cloud.ru предлагаем услуги по аренде виртуальной инфраструктуры. На сайте работает калькулятор, который поможет оценить ориентировочную стоимость ресурсов.
На дополнительные вопросы готовы ответить специалисты нашего центра компетенции — им можно позвонить или написать на почту.

Что еще у нас есть на Хабре:

Источник

Meet Webtops A Linux Desktop Environment In Your Browser

Before I joined the LinuxServer organization I had been working on a Docker management solution called Taisun. Over the years it became apparent everyone downloading this application was only really using the subfeature to be able to run a Linux desktop in their web browser. From parts of this project we as a team started deploying containers for popular GUI applications in docker containers and have now released: https://hub.docker.com/r/linuxserver/webtop

This technology stack goes a bit against the Docker grain as we are running many services in a single container to facilitate spinning up a usable web based desktop experience with a single command consisting of:

A lot of different Docker GUI solutions exist today, but what we always found is they were just missing some common sense stuff like:

  • Pixel perfect resolution for rendering
  • A basic window manager
  • Audio support
  • Using the RDP protocol
  • Clipboard support
  • On screen keyboard support
  • Remote file management for uploads/downloads

Because we control the whole stack and went into this with the design philosophy of building a baseimage any Linux GUI app could be easily embedded in, doing a desktop environment where users could customize it to their needs by installing the packages they want, seemed like the logical next step.

For Users

Basic Usage:

Spinning up is relatively straightforward:

Hop into http://localhost:3000 and you should be greeted with an Alpine XFCE desktop environment: On the left hand side of the screen is an arrow that will expand a menu with some baked in features, this menu can also be opened and closed using the keyboard combination of ctrl+alt+shift: From this menu you can launch a file browser, a keyboard overlay, or pull clipboard contents in and out of the desktop. The current webtop’s clipboard contents will be in the text area in the menu and any text you enter in there will be available on the webtop’s native clipboard. If you are a heavy user pressing ctrl+alt+shift to move clipboard contents in and out becomes second nature.

Flavors:

The image is also available in Ubuntu outside of just Alpine in the following Desktop environments installed and pre-configured:

Please take a look at the Github Repo for updated lists of supported tags:

Authentication:

By default the image is based around the abc user and we recommend using this user as all of the init/config is based around it. The default password is also abc . If you want to change this password and require authentication when accessing the interface simply issue passwd inside a gui terminal in the webtop. Then when accessing the web interface use the path:

http://localhost:3000/?login=true This will bring up xrdp’s default login manager where you can enter the credentials you set inside of the container.

Читайте также:  Windows server 2019 дата релиза

If you are planning to publish this port to the internet to hop into your remote server first off never do it over plain http you will expose your credentials, also we highly recommend doing two layers of security and running something like SWAG with password authentication at the reverse proxy level:

Keeping Up to Date:

As stated previously baking a whole Linux desktop env is not really compatible with the classic Docker model, and because these are designed to be customized by the user inside the running container we highly recommend not using Docker to handle image updates. Your user’s home folder will stay in tact with it’s files and settings but you would lose any software you installed inside of the container. Instead just use Alpine and Ubuntu’s package managers to keep software up to date inside the container.

For Developers

Building an image:

We tried to make using our desktop base image for embedding a desktop application as easy as possible. Let’s take a look at an example Dockerfile for a Firefox container:

On top of installing the app in the Dockerfile you need to create the file /root/defaults/autostart with the contents firefox .

And that’s it, when the container spins up and the user accesses the web interface on port 3000 Firefox will be launched in a basic Openbox gui: For a slightly more advanced example check out the LibreOffice image:

Autostart applications:

By default the desktop applications will only be launched when the user logs into the web interface, if you need your application to run on container spinup you will need to set the environment variable:

If the user changes the in container password from the default abc , they will also need to pass a password option to ensure the application autostarts:

Branding:

If you do not want the Linuxserver splash on container spinup make sure to include a modified one in your repo’s path /root/etc/cont-init.d/10-adduser , the only required logic is:

We are here to help

If you have any questions about using these Webtop images or developing new containers based on our rdesktop-web baseimage just hop on Discord and ask:

Источник

Как попробовать любую версию Linux в браузере

Как попробовать любую версию Linux в браузере

Каждый пользователь Linux в самом начале ставит перед собой три вопроса: какой дистрибутив лучше для меня, какой графический интерфейс мне нужен, какие у меня есть варианты конфигурации. Проект DistroTest.net позволяет взглянуть на существующие системы, протестируйте их под нагрузкой и без какой-либо установки прямо в браузере.

При желании вы также можете модифицировать системные файлы, например, для тестирования конфигурации или сценария.
После каждого выключения все возвращается к настройкам по умолчанию.

Чтобы выбранный дистрибутив работал, вам нужно будет разрешить всплывающие окна и отключить блокировщик рекламы. У вас будет 30 минут, чтобы протестировать любую версию Linux.

DistroTest.net

Спасибо, что читаете! Подписывайтесь на мои каналы в Telegram, Яндекс.Мессенджере и Яндекс.Дзен. Только там последние обновления блога и новости мира информационных технологий.

Респект за пост! Спасибо за работу!

Хотите больше постов? Узнавать новости технологий? Читать обзоры на гаджеты? Для всего этого, а также для продвижения сайта, покупки нового дизайна и оплаты хостинга, мне необходима помощь от вас, преданные и благодарные читатели. Подробнее о донатах читайте на специальной странице.

Заранее спасибо! Все собранные средства будут пущены на развитие сайта. Поддержка проекта является подарком владельцу сайта.

партнёры блога

telegram

Реклама

Последние

Рубрики

Здорово ! Спасибо за информацию , буем пробовать .

СЧЕТЧИКИ

РЕКЛАМА И ДОНАТЫ

Социальные сети

©2016-2021 Блог Евгения Левашова. Самое интересное и полезное из мира ИТ. Windows 10, Linux, Android и iOS. Обзоры программ и веб-сервисов. Статьи о мотивации и продуктивности.

Читайте также:  Metatrader 4 download windows

Использование материалов разрешается с активной ссылкой на levashove.ru.

Данный блог является личным дневником, содержащим частные мнения автора. В соответствии со статьей 29 Конституции РФ, каждый человек может иметь собственную точку зрения относительно его текстового, графического, аудио и видео наполнения, равно как и высказывать ее в любом формате. Блог не имеет лицензии Министерства культуры и массовых коммуникаций РФ и не является СМИ, а, следовательно, автор не гарантирует предоставления достоверной, не предвзятой и осмысленной информации. Сведения, содержащиеся в этом блоге не имеют никакого юридического смысла и не могут быть использованы в процессе судебного разбирательства. Автор блога не несёт ответственности за содержание комментариев к его записям.

Источник

Run Linux And Other Operating Systems In Your Browser

You can try a Linux OS in different ways. You could install it on your local disk and directly play with it. If you want to test many OSes often, deploying them locally is not a good idea. Every time, you need to format and install the OS. It’s very time consuming process. The second option is you could use any virtualization tools such as VirtualBox, VMWare, Xen server etc. Using these tools, you can install multiple OSs without formatting your host system. You can also easily backup the OS and restore it multiple times when necessary. The third option is you can rent a VPS and test the different OS which are provided by the service provider. But, it costs money. The fourth option is to run Linux directly in your web browser. Yeah, you read that right.

Say hello to JSLinux, a web service where you can run Linux and Windows VMs for free! You don’t need to spend a penny or you don’t need to have virtualization software installed. All you need is just an Internet-connected system with a modern web browser. Choose the Linux version or any other available OSs you want to explore and start using them in no time. This project is the brain-child of Fabrice Bellard, a Computer programmer who created other popular projects such as FFmpeg and QEMU. JSLinux is nothing but a PC/x86 emulator written in JavaScript.

JSLinux — Run Linux And Other Operating Systems In Your Browser

You can use JSLinux for the following purposes.

  • Benchmarking of Javascript engines (how much time takes your Javascript engine to boot Linux ?) and use of new browser technologies (asm.js, WASM).
  • Learning to use command line Unix tools without leaving the browser.
  • Secure file access within the browser.
  • Running old PC software.

To use JSLinux, head over to JSLinux website and click any emulated system of your choice to run it.

JSLinux PC/x86 emulator

I started Linux 4.12.0(Buildroot) system. After a couple seconds you have a full interactive shell like below.

JSLinux in action

You can use it as the way you use a physical system. You can export files to your system. Use the UP arrow under the console to upload a file to your system. All files will be exported to your home directory.

The other notable feature is JSLinux allows you to create your own account. Create your new account at https://vfsync.org/signup.

Create an account in JSLinux website

Once the new account is created, use ‘vflogin username’ to connect to your account.

The performance? It was really quite good with a 4G Internet connection! I tried Linux 4.12 system and it booted very quickly. And, it compiles C programs, it has vi and emacs, it supports all shell commands.

JSLinux also includes Windows 2000 system. The Windows fan boys can play the good old Windows programs by running this machine.

Windows 2000 runs in JSLinux emulator

As you see in the above screenshot, I am running Windows 2000 OS in Chromium browser inside Arch Linux.

Источник

Оцените статью