WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Startup script  (Read 3330 times)

Offline kentaxel

  • Newbie
  • *
  • Posts: 4
Startup script
« on: June 20, 2012, 01:05:14 AM »
Hello!

Im new to LTC and fairly new to linux in general, I'm trying to set up a thin client with TCL booting from a usb. I've managed to install the OS on the usb and am able to boot it and i can start rdesktop just fine, i've figured out how to save settings and such but for resons that elude me i cannot for the life of me get my startup script to work.

All i want to do is to start rdesktop as soon as the OS has started but it just wont happen. I've tried multiple ways of doing this but to no avail.

I've tried:

adding /usr/local/bin/rdesktop <IP> to /usr/local/tce.installed/rdesktop but nothing happens
adding a script named start.sh to /home/tc/.X.d/ with the folowing code
/usr/local/bin/rdesktop <IP>

and then chmod +x /home/tc/.X.d/start.sh

But nothing on startup.

adding /usr/local/bin/rdesktop <IP> to opt/bootlocal.sh

but still nothing happens.

I't seems like such a trivial thing to accomplish but obviously i'm missing some vital competence.

any help appreciated.
« Last Edit: June 20, 2012, 01:07:44 AM by kentaxel »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10969
Re: Startup script
« Reply #1 on: June 20, 2012, 02:57:03 AM »
tce.installed and bootlocal are wrong places for an X app. .X.d is the right place.

Make sure it gets executed (echo "me here" > /tmp/rdesk-text), and that rdesktop does not return any error (maybe your network is not yet up?).
The only barriers that can stop you are the ones you create yourself.

Offline kentaxel

  • Newbie
  • *
  • Posts: 4
Re: Startup script
« Reply #2 on: June 20, 2012, 03:51:53 AM »
tce.installed and bootlocal are wrong places for an X app. .X.d is the right place.

Make sure it gets executed (echo "me here" > /tmp/rdesk-text), and that rdesktop does not return any error (maybe your network is not yet up?).

Do i put: "echo "me here" > /tmp/rdesk-text" as is in the start.sh in .X.d?

Also, what to do if the problem is as you say, that the network is not yet up?
« Last Edit: June 20, 2012, 04:18:54 AM by kentaxel »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10969
Re: Startup script
« Reply #3 on: June 20, 2012, 04:50:27 AM »
Quote
Do i put: "echo "me here" > /tmp/rdesk-text" as is in the start.sh in .X.d?

Yes.

Quote
Also, what to do if the problem is as you say, that the network is not yet up?

Wait until it is up before launching rdesktop; there are several code examples of that in this forum, both sleeping and pinging some server.
The only barriers that can stop you are the ones you create yourself.

Offline kentaxel

  • Newbie
  • *
  • Posts: 4
Re: Startup script
« Reply #4 on: June 20, 2012, 05:37:39 AM »


Wait until it is up before launching rdesktop; there are several code examples of that in this forum, both sleeping and pinging some server.

I think you are right, the echo line "me here" is written to the file. I'm not sure on what im looking for in the forum with regards to making the script wait for the network, would you be able to point me in the right direction?

Thank you

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: Startup script
« Reply #5 on: June 20, 2012, 05:48:10 AM »
Hi kentaxel
This should work:
http://forum.tinycorelinux.net/index.php/topic,12791.msg70043.html#msg70043
There are some simpler examples in the forum but I can't find them right now.
Have you tried executing  rdesktop <IP>  from the command line to make sure you can connect?

Offline kentaxel

  • Newbie
  • *
  • Posts: 4
Re: Startup script
« Reply #6 on: June 20, 2012, 06:23:10 AM »
Thank you so much, this did the trick!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: Startup script
« Reply #7 on: June 20, 2012, 06:32:53 AM »
Hi kentaxel
You are welcome. By the way, if you need to connect to a machine running  Network Level Authorization and can't
connect, try rdesktop.tcz, version 1.0.1, not 0.8.2.