bash/bin file wont executable, possible not the correct rights setup.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I think you are looking for "chown"---this is used to change the owner and/or group for a file.
"man chown" for details.
The other issue I see is that you are putting an executable script into a new directory (/scripts). If you want to be able to run things here, then the directory needs to be added to your PATH variable. Otherwise, you would simply need to give the full path when calling the command.
Are you going to run rdesktop as root? You shouldn't.
Run it as a regular user. Maybe you meant ~/scripts, and not /scripts. Your user scripts should reside in your $HOME directory, and not on any other place. There's no need to operate as root for this, and you should always operate with the minimal privileges that are necessary for a given task. Otherwise you are assuming an unnecessary risk.
Note that, in your case, you are chmoding the script with u+x, which means +x to user, and user is root. So, no one else will be able to run it anyway, and as said, you shouldn't run such kind of apps as root.
Another problem is your $PATH. /scripts is not a common location to search for executable files. So you need to add it to your path. To add a path globally you could use /etc/profile, or whatever mechanism your distro offers (that file might be changed without any notice the next time you upgrade bash). If you take my advice and decide to run it as a user, then you can add a path into ~/.bashrc and ~/.bash_profile (this all assumes that bash is your default shell).
ok, were can I place the scripts, to easy open it?
i can just insert,
Code:
sudo chown medewerker /scripts // this gives ownership to user "medewerker"
cd /scripts
sudo chown medewerker rdesktop.sh // this gives ownership to user "medewerker"
If i did a thing wrong... how should i give the user the rights/ownership..
*edit* it seems to work... now all i gotta find out is to get it to autostart, yet if i just insert the full path to the script (its going to be the only script, as its going to work in a loop aka ubuntu-thinclient )
Last edited by Dutch2005NL; 11-14-2008 at 08:44 AM.
ok, were can I place the scripts, to easy open it?
i can just insert,
Code:
sudo chown medewerker /scripts
cd /scripts
sudo chown medewerker rdesktop.sh
A couple of things, and I'm hoping not to confuse you, nor to override any advice given.
The *normal* directories for executables are /usr/bin & /usr/local/bin. A lot of Slackware users (and I suspect other distros' users, as well) would put their self-made executables in /usr/local/bin.
Generally, executables are put into some kind of *bin* directory...
/usr/bin & /usr/local/bin are normally already in $PATH by default, so you wouldn't have to make any changes to $PATH.
Also, you don't *necessarily* have to chmod u+x to make a script executable, unless you wish to restrict its execution to the file's owner, which can also be accomplished through file permissions. In other words, chmod +x should suffice.
OK---rdesktop is a utility to connect to a remote desktop--I don't know what the particular syntax is that you used. And what do you mean by "constantlooping"?
AND--what to you mean by "unresponsive"? What exactly is happening.
OK---rdesktop is a utility to connect to a remote desktop--I don't know what the particular syntax is that you used. And what do you mean by "constantlooping"?
AND--what to you mean by "unresponsive"? What exactly is happening.
Code:
while [ 1 ];rdesktop -f -z sbc;done
And for unresponcive: Mouse works, Keyboard numlock works. Unable to insert username and password at windows 2003 terminal server login-screen.
I just tried again now it just works like a charm
I do have 1 more "problem"
the pc I tested on has a BIOS, that is from 1999, and so i get the bios older then 2000 message and it states acpi=force, needs to be added, so i press esc when grub states me so, I add acpi=force at the end of the line press enter, and I see the
Quote:
acpi=force
at the end of the line (so far so good), then I say ok load this thing, and I still get the 1999 is to old for acpi message...
Last edited by Dutch2005NL; 11-17-2008 at 03:12 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.