Solved

Script login to rdesktop upon bootup?

Posted on 2009-05-05
7
939 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:jwilliamson6
Comment Utility
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
Comment Utility
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
Comment Utility
> 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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Like many organizations, your foray into cloud computing may have started with an ancillary or security service, like email spam and virus protection. For some, the first or second step into the cloud was moving email off-premise. For others, a clou…
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 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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now