Solved

Script login to rdesktop upon bootup?

Posted on 2009-05-05
7
941 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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 500 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

810 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