Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: yjd on January 15, 2010, 02:51:40 PM

Title: How to autorun rdekstop?
Post by: yjd on January 15, 2010, 02:51:40 PM
HI,

I'm not an expert on Linux but did manage to install TC on my hard drive just yesterday using the latest final release 2.7.

What I'm looking to do is to transform my old computers at work into thin clients.
For this, I would like to autorun the following command when TC is stared: rdesktop -f xxx.xxx.xxx.xxx.

Also, I would like that when the user logs off the remote desktop session, to automatically restart that same command. Of course, I'll have to find a fail save to stop it from running.

If I can get some help doing that, it would be really nice.

I will have other questions after that part is done.

Thank you for your help and the great work on TinyCore and its tutorial for installation.

Yael
Title: Re: How to autorun rdekstop?
Post by: gerald_clark on January 15, 2010, 03:09:35 PM
Write an executable  script ( /home/tc/myrdesktop ) that does:

#!/bin/sh
# myrdesktop
while true
do
   rdesktop -f xxx.xxx.xxx.xxx
done


Then in .xsession, after the lines that start X and wait for it to come up, add:
./myrdesktop &


Title: Re: How to autorun rdekstop?
Post by: yjd on January 15, 2010, 03:18:23 PM
Thank you.

I did the first part, but where do you go to do the .xsession?

Yael
Title: Re: How to autorun rdekstop?
Post by: curaga on January 15, 2010, 03:21:35 PM
/home/tc/.xsession

Or did you mean where in the file?
Title: Re: How to autorun rdekstop?
Post by: yjd on January 15, 2010, 03:28:58 PM
Thanks, I manage do to all of this but it doesn't work.
When the computer starts, nothing shows up.
Title: Re: How to autorun rdekstop?
Post by: yjd on January 15, 2010, 03:33:37 PM
How do you write an executable script?

I just did vi, that's probably where the problem is.
Title: Re: How to autorun rdekstop?
Post by: gerald_clark on January 15, 2010, 03:36:38 PM
Chmod +x /home/tc/myrdesktop

Please get a book on Linux.
Title: Re: How to autorun rdekstop?
Post by: yjd on January 18, 2010, 10:09:41 AM
Thank you, but it isn't working.
Any idea?

Gerald_Clark, I did look for books, mainly on amazon, but it's hard to find out which is would be good to start with. I know I need one about the commands but also about some script like what I'm trying to do.
If you know of any good ones, feel free to let me know!

Thank you again for the help.
Title: Re: How to autorun rdekstop?
Post by: gerald_clark on January 18, 2010, 01:41:14 PM
If you open up a terminal, can you run rdesktop?
Title: Re: How to autorun rdekstop?
Post by: yjd on January 18, 2010, 01:43:58 PM
Yes it works good.

If the autorun script doesn't work, could I create a shorcut to the desktop for users to launch it?
Title: Re: How to autorun rdekstop?
Post by: sery_volk_inc on May 24, 2011, 03:15:10 PM
Same problem.
I tryed what you said. Checked flags for /home/tc/myrdp and trying to run it manually - everithing works!
Putting command to .xsession - doesent!
I tryed to put /home/tc/myrdp command after "waitforX" and in the end of the file and ... completely no reaction.
It would be nice if you can help me...
Title: Re: How to autorun rdekstop?
Post by: gerald_clark on May 24, 2011, 05:05:58 PM
X application startup scripts go in ~/.X.d
Ex:


# .X.d/synergyc.sh
# Autostart the synergy client at login
# Connect to thesynergy server on the machine named 'sharp'
synergyc sharp &

Title: Re: How to autorun rdekstop?
Post by: sery_volk_inc on May 26, 2011, 06:09:34 PM
I've tryed to create file /home/tc/.X.d/rd.sh and got the same result: it works when I run ./rd.sh and doesent when I reload the system...
Maybe this file runs before those modules from onboot.lst appear loaded??
Title: Re: How to autorun rdekstop?
Post by: gerald_clark on May 26, 2011, 06:56:26 PM
No.
`/.X.d  scripts don't run until after login.
Title: Re: How to autorun rdekstop?
Post by: sery_volk_inc on May 26, 2011, 08:12:40 PM
It worked when I put the file at X.d/ and wrote the command in the .xsession file after "waitforX@. I didn't guess that I have to do both... THANK you very very much!!!