Solved

Script login to rdesktop upon bootup?

Posted on 2009-05-05
7
942 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

820 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