22 lines
667 B
Nu
Executable File
22 lines
667 B
Nu
Executable File
#!/usr/bin/env nu
|
|
|
|
# Connect with the VM over RDP.
|
|
#
|
|
# Requires XWayland or X11, and Remmina to be installed in flatpak.
|
|
# RDP over Remmina on XWayland is the only way i've been able to have fractional scaling on the host, and GPU acceleration on the guest.
|
|
def main []: nothing -> nothing {
|
|
print "> Extracting hostname from vagrant..."
|
|
|
|
let ip = (vagrant ssh-config | parse " {key} {val}" | transpose -r | get 0.HostName)
|
|
print $"> hostname: ($ip)"
|
|
|
|
let user = "vagrant"
|
|
let pass = "vagrant"
|
|
|
|
let uri = $"rdp://($user):($pass)@($ip)"
|
|
print $"> connecting to ($uri)"
|
|
|
|
flatpak run --socket=fallback-x11 org.remmina.Remmina --no-tray-icon -c $uri
|
|
}
|
|
|