Browse Source

Fixed remote office script

master
haemka 3 years ago
parent
commit
e7840ebea6
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      remoteoffice.sh

+ 4
- 0
remoteoffice.sh View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh


set -x

# VPN # VPN
NMCONN="49088a1e-18c2-48aa-a664-f212eb83a727" NMCONN="49088a1e-18c2-48aa-a664-f212eb83a727"
# RDP # RDP
@@ -10,6 +12,8 @@ USER="$(pass show Work/AD-LOGIN | awk '/user:/ {print $2}')"
REMOTE="$(pass show Work/AD-LOGIN | awk '/remote:/ {print $2}')" REMOTE="$(pass show Work/AD-LOGIN | awk '/remote:/ {print $2}')"


rdp() { rdp() {
# resolve REMOTE to IPv4 before connecting in order to avoid IPv6 usage
REMOTE=$(dig ${REMOTE} A +short)
# alternative to "dynamic-resolution" is "smart-sizing" # alternative to "dynamic-resolution" is "smart-sizing"
xfreerdp /network:lan /gdi:hw +glyph-cache +fonts +aero \ xfreerdp /network:lan /gdi:hw +glyph-cache +fonts +aero \
/bpp:32 /size:${DEF_RESOLUTION} /dynamic-resolution \ /bpp:32 /size:${DEF_RESOLUTION} /dynamic-resolution \


Loading…
Cancel
Save