Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script login to rdesktop upon bootup?

Posted on 2009-05-05
7
Medium Priority
?
954 Views
Last Modified: 2013-12-15
I'm a rookie to Linux but have made some headway, but now I'm stuck. What I'm doing is formatting two boxes with Fedora 10 and will be using them to login to a virtual machine for training. What I need to do is create a script to log these machines into rdesktop automatically when the machine boots. I have learned the script that I need to be "rdesktop -f -u [username]  192.168.xxx.xxx" but I'm not sure how to embed this into a login script.

Also, I'm looking to optimize these machines at bootup, they are running a little slow, any suggestions?

Thanks in advance for your suggestions!


rdesktop -f -u [username] 192.168.xxx.xxx

Open in new window

0
Comment
Question by:jwilliamson6
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24305972
It depends on which desktop environment you have. For example, in GNOME go to System-->Preferences-->Sessions. Choose the Startup Programs tab and add the script you crafted (I assume you already did your executable script)
0
 
LVL 14

Expert Comment

by:arrkerr1024
ID: 24307130
Since you're using fedora 10, your window manager is probably gnome.  Since you aren't actually going to be using the window manager for much, just launching a remote desktop, you should switch to something a lot more lightweight and faster like fluxbox.  Fluxbox is also included in fedora, as well as xfce, another lightweight window manager.

You can put the rdesktop command in a .xinitrc file in the user's home directory.
0
 
LVL 4

Expert Comment

by:amrox
ID: 24308926
Put the script in somewhere like /usr/local/bin
and (assuming you're using gnome), go to system=>preferences=>Startup Applications Preferences
click add
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:jwilliamson6
ID: 24338346
Thanks all,
 I'm trying to move the script I wrote into the /usr/local/bin folder but am receiving "you do not have permissions to save the file" message. I've researched it and found a lot of different options, but none seem to work for me.

My issue now is that my permissions aren't as root... I've gone to turn selinux off by using

echo 0 > /selinux/enforce

to turn off temporarily while I try to straighten this out. It's not helping either. Any suggestions?

My real question now is "how do I set my user account to log in as root?"
0
 
LVL 4

Expert Comment

by:amrox
ID: 24343724
Do you have root access to the machine?
If so, I would suggest that you move the file to /usr/local/bin as root, and then change permissions to enable you to execute it as a normal user
eg. chmod 551 /usr/local/bin/<filename>

If you don't have root access at all, then just keep the script in your home directory and run it from there

I'm not sure what your "real question" is.  Do you want to "log in" as root, or run the script as root?
For the latter, you can chmod +s /usr/local/bin<filename> for SUID, but my guess is this is not what you need.

Which bit are you having problems with, is it executing the script, adding it to Startup Applications, or moving it?
0
 
LVL 16

Accepted Solution

by:
ai_ja_nai earned 2000 total points
ID: 24344492
> I'm trying to move the script I wrote into the /usr/local/bin folder but am receiving "you do not have permissions to save the file" message

Of course. It's conceptually wrong. If you need to execute some file widely, put the folder that contains it in your PATH. But don't move it to bin folder. And don't turn off SELinux to pursue the wrong way.

Use the method I told you, that's effective for your normal user account and won't expose your compute to security threats
0
 
LVL 1

Author Closing Comment

by:jwilliamson6
ID: 31578028
Thanks for your help!
In order to make this a thinclient I had to take the following steps:
1) Download rdesktop
2) Go to System>Preferences>Personal> Sessions, click ADD, then in the second box, type: rdesktop -f -u "" . Then close.
3) Go to /etc/gdm/custom.conf and add the following to the bottom of the page:
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=user

Thanks again!
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Local Printing Using Remote Desktop Windows 7 sometimes has issues with printing to a local printer using a Remote Desktop Connection (RDC). The 1st step is to verify that printers are checked on the Local Resources tab of the Remote Desktop C…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question