Hello
Who knows how to make a script in order to automate the rdp connection i make in the Terminal = rdesktop 192.168.0.115 -f for example (kind of batch I can write and then click on..?)
With thanks R
[Opgelost] Script for rdesktop
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
[Opgelost] Script for rdesktop
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Script
You can either create a launcher for this in the main menu, or indeed a script. For launcher go to Control Center -> Main Menu, select a category where you want this command, click New Item and set command to your rdesktop line. Also give it a name, and you are done. (You can click the default icon to change it to something else.)
You could also create a small shell script. Create a text file, for example called Connect.sh, and put the following text in it:
Either run "chmod +x Connect.sh", or mark the file as executable through the file browser. You can now double-click this file to run your script.
You could also create a small shell script. Create a text file, for example called Connect.sh, and put the following text in it:
Code: Select all
#!/bin/sh
rdesktop 192.168.0.115 -f
Re: Script for rdesktop
Moved here from Newbie Questions,title edited to make subject matter clear
Re: Script for rdesktop
Are these always going to be the for the same?
1.) IP
2.) username
3.) password
for this script?
because if they are then:
else if you connect to more than 1 machine with more than 1 username with more than 1 password:
1.) IP
2.) username
3.) password
for this script?
because if they are then:
Code: Select all
#!/bin/bash
rdesktop ipp.addr.ess -u <username> -p <password> -f
Code: Select all
#!/bin/bash
echo -n "IP...? "
read ANSWER1
for periods in "$@"
do
sed -e 's/\./\./' "$ANSWER1"
done
echo -n "user...? "
read ANSWER2
echo -n "pass... "
read ANSWER3
rdesktop "$ANSWER1" -u "$ANSWER2" -p "$ANSWER3" -f
ANSWER3=" "
Re: Script for rdesktop
Many thanks for your reactions but....
I copied and paste the script for several ip 's and users and saved the file as connect.sh.
So far so good, but how do i get this script working, if i click on the file de text editor opens with the script.
If i rightclick on the file i cannot make an excutable from it.
So how do i carry on right now ?
Thank you again
RdR
I copied and paste the script for several ip 's and users and saved the file as connect.sh.
So far so good, but how do i get this script working, if i click on the file de text editor opens with the script.
If i rightclick on the file i cannot make an excutable from it.
So how do i carry on right now ?
Thank you again
RdR
Re: Script for rdesktop
Right-click -> Properties -> Permissions tab -> check "Allow executing file as a program". Sorry, assumed you would know this or run the command I gave otherwiseRosie wrote:If i rightclick on the file i cannot make an excutable from it.
[Opgelost] Script for rdesktop
Beste Vincent,
Ik neem aan dat je ook nederlands leest gezien je naam.
Nogmaals met dank, werkt perfect.
Ik ben maar net begonnen met Linux, dus nog behoorlijk onwetend over allerlei zaken.
Lijkt soms of ik weer teug ben in de goede oude DOS dagen.
Echter zeer gecharmeerd van dit prachtige Mint OS
En een onverwoestbaar help forum uiteraard...
Groet
Rinke
Ik neem aan dat je ook nederlands leest gezien je naam.
Nogmaals met dank, werkt perfect.
Ik ben maar net begonnen met Linux, dus nog behoorlijk onwetend over allerlei zaken.
Lijkt soms of ik weer teug ben in de goede oude DOS dagen.
Echter zeer gecharmeerd van dit prachtige Mint OS
En een onverwoestbaar help forum uiteraard...
Groet
Rinke
Re: [Opgelost] Script for rdesktop
Good to hear this worked for you! Lets stick to English here, so others can read and understand solutions and feedback also Perhaps also note down the Dutch Linux Mint forums: http://forum.linuxmint-nl.org/