35 lines
542 B
Bash
Executable file
35 lines
542 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Variables
|
|
weston=weston
|
|
backend=rdp-backend.so
|
|
rdp_d="${HOME}/.rdp"
|
|
hostname="$(hostname)"
|
|
crt="${rdp_d}/${hostname}.crt"
|
|
key="${rdp_d}/${hostname}.key"
|
|
socket=wayland-1
|
|
|
|
# Arguments
|
|
width="${1:-1920}" ; shift
|
|
height="${1:-1080}"; shift
|
|
|
|
# Command building
|
|
weston_com=(
|
|
"$weston"
|
|
"--backend=${backend}"
|
|
"--rdp-tls-cert=${crt}"
|
|
"--rdp-tls-key=${key}"
|
|
"--width=${width}"
|
|
"--height=${height}"
|
|
"--socket=${socket}"
|
|
)
|
|
|
|
# Debug
|
|
#echo "${weston_com[@]}"
|
|
#exit 0
|
|
|
|
# Execution
|
|
set -xe
|
|
cd
|
|
"${weston_com[@]}"
|
|
|