WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to autorun rdekstop?  (Read 9168 times)

Offline yjd

  • Newbie
  • *
  • Posts: 6
How to autorun rdekstop?
« 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

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to autorun rdekstop?
« Reply #1 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 &



Offline yjd

  • Newbie
  • *
  • Posts: 6
Re: How to autorun rdekstop?
« Reply #2 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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: How to autorun rdekstop?
« Reply #3 on: January 15, 2010, 03:21:35 PM »
/home/tc/.xsession

Or did you mean where in the file?
The only barriers that can stop you are the ones you create yourself.

Offline yjd

  • Newbie
  • *
  • Posts: 6
Re: How to autorun rdekstop?
« Reply #4 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.

Offline yjd

  • Newbie
  • *
  • Posts: 6
Re: How to autorun rdekstop?
« Reply #5 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to autorun rdekstop?
« Reply #6 on: January 15, 2010, 03:36:38 PM »
Chmod +x /home/tc/myrdesktop

Please get a book on Linux.

Offline yjd

  • Newbie
  • *
  • Posts: 6
Re: How to autorun rdekstop?
« Reply #7 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to autorun rdekstop?
« Reply #8 on: January 18, 2010, 01:41:14 PM »
If you open up a terminal, can you run rdesktop?

Offline yjd

  • Newbie
  • *
  • Posts: 6
Re: How to autorun rdekstop?
« Reply #9 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?

Offline sery_volk_inc

  • Newbie
  • *
  • Posts: 3
Re: How to autorun rdekstop?
« Reply #10 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...
« Last Edit: May 24, 2011, 03:16:44 PM by sery_volk_inc »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to autorun rdekstop?
« Reply #11 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 &


Offline sery_volk_inc

  • Newbie
  • *
  • Posts: 3
Re: How to autorun rdekstop?
« Reply #12 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??

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to autorun rdekstop?
« Reply #13 on: May 26, 2011, 06:56:26 PM »
No.
`/.X.d  scripts don't run until after login.

Offline sery_volk_inc

  • Newbie
  • *
  • Posts: 3
Re: How to autorun rdekstop?
« Reply #14 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!!!