mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 18:56:49 +01:00
Add a HTML5 client for the remote desktop protocol.
It is implemented using websockets and canvas darwing. It directly speaks the remote desktop protocol. A websocket proxy that translates the TCP connection into a usable form is needed. Websockify works for this out of the box directly under Haiku. Note that not all drawing modes are implemented, and most of them don't have a good match on the canvas side. Fonts are also not properly supported yet. A sans serif font will be used on the client for everything and the metrics between the client and server will diverge and cause drawing artifacts. Usage: * Run an application with a target screen to create the desktop: TARGET_SCREEN=5001 Terminal * Use a websocket proxy to expose the port via websockets: websockify.py 5000 localhost:5001 * Open HaikuRemoteDesktop.html in a browser and connect. To get the full desktop experience you may want to run Tracker and Deskbar inside the virtual desktop. As they are both single launch and controlled by the launch_daemon, you have to stop them via: launch_roster stop x-vnd.be-trak launch_roster stop x-vnd.be-tskb And then start them manually from within the virtual desktop: /system/Tracker & /system/Deskbar &
This commit is contained in:
parent
778469156a
commit
85195eb807
76
data/html5_remote_desktop/HaikuRemoteDesktop.html
Normal file
76
data/html5_remote_desktop/HaikuRemoteDesktop.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Haiku Remote Desktop</title>
|
||||
<script src="HaikuRemoteDesktop.js"></script>
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body, #connectForm {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: sans;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#connectForm {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
#connectForm div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input, button {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
button {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.session {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.connect .session {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
body.connect #connectForm {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<div id="connectForm">
|
||||
<div>
|
||||
<label for="targetAddress">Remote Host</label>
|
||||
<input type="text" id="targetAddress"
|
||||
value="ws://localhost:5000" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="width">Width</label>
|
||||
<input type="number" id="width" value="800" />
|
||||
<label for="height">Height</label>
|
||||
<input type="number" id="height" value="600" />
|
||||
</div>
|
||||
<button id="connectButton" autofocus>Connect</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
2241
data/html5_remote_desktop/HaikuRemoteDesktop.js
Normal file
2241
data/html5_remote_desktop/HaikuRemoteDesktop.js
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user