Add script to connect to computer with rdesktop.
This commit is contained in:
parent
b590a788d9
commit
be08b80190
@ -603,7 +603,25 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\DEHAEZE" -p $(pass ssl.esrf.fr/dehaeze | sed -n 1p) 172.24.4.69
|
||||
computer=$(echo -e 'RNICE\nPCMEL1\nPCNASS1\nPCMEG01' | dmenu -p 'Computer:' -l 20);
|
||||
|
||||
case $computer in
|
||||
PCMEL1)
|
||||
rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\OPPEL" -p $(pass esrf/PCMEL1/OPPEL | sed -n 1p) pcmel1
|
||||
;;
|
||||
PCMEG01)
|
||||
rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\DEHAEZE" -p $(pass ssl.esrf.fr/dehaeze | sed -n 1p) pcmeg01
|
||||
;;
|
||||
PCNASS1)
|
||||
rdesktop -a 16 -P -z -x m -r sound:off -g "80%" -u "ESRF\DEHAEZE" -p $(pass ssl.esrf.fr/dehaeze | sed -n 1p) pcnass1
|
||||
;;
|
||||
RNICE)
|
||||
echo "Not yet implemented"
|
||||
;;
|
||||
,*)
|
||||
echo "Not existing"
|
||||
;;
|
||||
esac
|
||||
#+end_src
|
||||
|
||||
* Toggle Network
|
||||
@ -613,7 +631,7 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash :results output
|
||||
#+begin_src bash
|
||||
result=$(nmcli device | sed '1d' | dmenu -l 20);
|
||||
|
||||
interface=$(echo $result | awk -F ' ' '{print $1}');
|
||||
@ -626,8 +644,6 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: Device 'enp0s20f0u1u4' successfully disconnected.
|
||||
* Print on Rnice
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/print-rnice
|
||||
@ -640,14 +656,15 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | dmenu -p 'Two Sided:' -l 20);
|
||||
|
||||
# First copy the file to Rnice
|
||||
if sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" scp $1 dehaeze@160.103.228.221:~/Downloads/; then
|
||||
if sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" scp $1 dehaeze@rnice:~/Downloads/; then
|
||||
# Then print on Rnice
|
||||
sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" ssh dehaeze@160.103.228.221 "lpr -o media=A4 -o sides=$sides -o outputorder=reverse -o number-up=$nbpage -P ctb110c1u ~/Downloads/$1";
|
||||
sshpass -p "$(pass ssl.esrf.fr/dehaeze | sed -n 1p)" ssh dehaeze@rnice "lpr -o media=A4 -o sides=$sides -o outputorder=reverse -o number-up=$nbpage -P ctb110c1u ~/Downloads/$1";
|
||||
# Finally, delete the file
|
||||
else
|
||||
echo "Command Failed"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
* Mount TMP14DAYS
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/mnt_tmp_14_days
|
||||
|
Loading…
Reference in New Issue
Block a user