Update remote to ESRF computers
This commit is contained in:
@@ -39,7 +39,7 @@ $TERMINAL --title esrf-phonebook -e contacts
|
||||
:END:
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
||||
computer=$(echo -e 'WID21SPEEDGOAT1\nWID24SPEEDGOAT1\nWBM23SPEEDGOAT1\nWMELSPEEDGOAT1\nWID31PC1\nPCOPTRO\nPCMEL1\nPCMEL2\nRNICE\nPCDEHAEZE\nLAPMEL01\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
|
||||
computer=$(echo -e 'WID16A1\nWID21SPEEDGOAT1\nWID24SPEEDGOAT1\nWBM23SPEEDGOAT1\nWMELSPEEDGOAT1\nWID31PC1\nPCOPTRO\nPCMEL1\nRNICE\nPCDEHAEZE\nLAPMEL01\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
|
||||
|
||||
if [[ -z "$computer" ]]; then
|
||||
exit 1
|
||||
@@ -69,12 +69,15 @@ case "$computer" in
|
||||
"RNICE" | "PCDEHAEZE")
|
||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:dehaeze /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||
|
||||
"PCMEL1" | "PCMEL2" | "PCOPTRO" | "LAPMEL01")
|
||||
"PCMEL1" | "PCOPTRO" | "LAPMEL01")
|
||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:OPPEL /p:TonicPEL /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||
|
||||
"WMELSPEEDGOAT1")
|
||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||
|
||||
"WID16A1")
|
||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid16a /p:tonic16 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||
|
||||
"WID31PC1")
|
||||
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid31 /p:tonic31 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
|
||||
|
||||
@@ -168,56 +171,42 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
remote_loc=""
|
||||
passname=""
|
||||
case "$drive" in
|
||||
"homelab")
|
||||
remote_loc="thomas@homelab:/srv/storage/" ;;
|
||||
"tmp_14_days")
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/tmp_14_days/"
|
||||
passname="esrf/dehaeze" ;;
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/tmp_14_days/" ;;
|
||||
"unix_home")
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/home/esrf/dehaeze/"
|
||||
passname="esrf/dehaeze" ;;
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/home/esrf/dehaeze/" ;;
|
||||
"monochromators")
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/data/monochromators/"
|
||||
passname="esrf/dehaeze" ;;
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/data/monochromators/" ;;
|
||||
"data_mel")
|
||||
remote_loc="opid00@lmellab$proxy_arg:/data/id00/inhouse/MEL/"
|
||||
passname="esrf/opid00" ;;
|
||||
remote_loc="opid00@lmellab$proxy_arg:/data/id00/inhouse/" ;;
|
||||
"data_jazzy")
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/jazzy/data/"
|
||||
passname="esrf/dehaeze" ;;
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/jazzy/data/" ;;
|
||||
"data_easy")
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/easy/data/"
|
||||
passname="esrf/dehaeze" ;;
|
||||
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/easy/data/" ;;
|
||||
"data_id16a")
|
||||
remote_loc="blissadm@pico3$proxy_arg:/data/id16a/inhouse1/commissioning/ni_endstation/Speedgoat/" ;;
|
||||
"data_id31")
|
||||
remote_loc="opid31@id31$proxy_arg:/data/id31/inhouse/"
|
||||
passname="esrf/opid31" ;;
|
||||
remote_loc="opid31@id31$proxy_arg:/data/id31/inhouse/" ;;
|
||||
"bliss_mel")
|
||||
remote_loc="blissadm@lmellab$proxy_arg:/users/blissadm/local/"
|
||||
passname="esrf/blissadm" ;;
|
||||
remote_loc="blissadm@lmellab$proxy_arg:/users/blissadm/local/" ;;
|
||||
"bliss_id16a")
|
||||
remote_loc="blissadm@pico3$proxy_arg:/users/blissadm/local/" ;;
|
||||
"bliss_id21")
|
||||
remote_loc="blissadm@lid21nano$proxy_arg:/users/blissadm/local/"
|
||||
passname="esrf/blissadm" ;;
|
||||
remote_loc="blissadm@lid21nano$proxy_arg:/users/blissadm/local/" ;;
|
||||
"bliss_id24")
|
||||
remote_loc="blissadm@foucault$proxy_arg:/users/blissadm/local/"
|
||||
passname="esrf/blissadm" ;;
|
||||
remote_loc="blissadm@foucault$proxy_arg:/users/blissadm/local/" ;;
|
||||
"groupshare")
|
||||
mount ~/mnt/groupshare && \
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
if [-z $remote_loc ]
|
||||
then
|
||||
if [ -z $remote_loc ]; then
|
||||
exit
|
||||
else
|
||||
if [-z $passname ]
|
||||
then
|
||||
sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
|
||||
else
|
||||
pass "$passname" | sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions,password_stdin $remote_loc /home/thomas/mnt/$drive
|
||||
fi
|
||||
|
||||
sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions,IdentityFile=/home/thomas/.ssh/id_ed25519 $remote_loc /home/thomas/mnt/$drive
|
||||
fi
|
||||
|
||||
# sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
|
||||
|
||||
Reference in New Issue
Block a user