0

I need to launch a zenity's script with mouse, I managed to launch the script using "Xsession".

With the following configuration :

[Desktop Entry]
NAME=rdp
Exec=/Xfreerdp.sh
Terminal=false
Type=Application

My script runs correctly, and works however I do not have a mouse! And this script displays an RDP login screen and it is a problem for the user to not be able to move the mouse to change from "username" to password box and press OK.

Once the RDP connection, everything works.

So, is it possible to initialize the mouse in my script?

Script bash :

> #!/bin/bash 
>W=$(xwininfo -root | awk '$1=="Width:" {print $2}') 
>H=$(xwininfo -root | awk '$1=="Height:" {print $2}')
> 
> OUTPUT=$(zenity --forms --width=$W --height=$H --title="Connexion RDP"
> \
>     --text="Information de connexion" \
>     --separator="," \
>     --add-entry="Username" \
>     --add-password="Password")
> 
> 
> OUTPUT_RESULTS=$? Username=$(awk -F, '{print $1}' <<<$OUTPUT)
> Password=$(awk -F, '{print $2}' <<<$OUTPUT)
> 
> xfreerdp /f /v:IP_server /d:lab.dom.ad /u:$Username /p:$Password
> /cert-ignore +clipboard

i found a solution with this : https://www.cyberciti.biz/tips/howto-linux-configure-the-mouse-at-a-text-based-terminal-for-copy-and-paste-operation.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.