Настройте простой http-сервер на вашем Linux-компьютере с несколькими статическими html-страницами. Пишите свои сообщения из bash напрямую на эти страницы. Откройте эти страницы в браузере на вашем компьютере с Windows. Вы можете использовать некоторую магию javascript для автоматической перезагрузки его содержимого при поступлении новых данных.
Пример:
На компьютере с Linux:
Настройте статический http-сервер и разрешите ему обслуживать/var/www/room/
:
mkdir /var/www/room/
cd /var/www/room/
python3 -m http.server
Создать страницу/var/www/room/index.html
:
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="data">
<!-- here will be an autoreloaded data -->
</div>
<script>
const AUTORELOAD_TIMEOUT = 1000; // milliseconds
setInterval(async () => {
/*
Load data from an address after the hash-sign (#) and put it into div#data
E.g. if the browser location is:
http://somesite/some/path#some/file/name
then the function will load data from the page:
http://somesite/some/file/name
*/
const hash = document.location.hash
if (hash.length <= 1) {
return
}
const file = hash.slice(1)
const response = await fetch(file)
if (response.status === 200) {
document.getElementById("data").innerHTML = await response.text()
}
}, AUTORELOAD_TIMEOUT)
</script>
</body>
На компьютере с Windows:
http://your-linux-machine-ip:your-linux-machine-port/index.html#screen1
На компьютере с Linux:
screen1
:echo "Hello, world!" > /var/www/room/screen1
Проверьте машину Windows:
Hello, world!