WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: run after X loaded  (Read 1990 times)

Offline burak

  • Newbie
  • *
  • Posts: 5
run after X loaded
« on: June 18, 2010, 12:16:54 PM »
Hi,

I thought I did manage to run a sh script when X starts , however it turned out that it did not...

I add the line /home/tc/rdp.sh to /home/tc/.xsession file.
Unfortunately this works only when I click log out, select exit to prompt and entering the command startx.
After X begins the sh script runs...
However, when I reboot the main Tiny Core screen comes but the sh script does not run...
Where I am doing wrong  ???

Burak

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: run after X loaded
« Reply #1 on: June 18, 2010, 12:26:51 PM »
Shell commands should run in an xterm.
xterm -e myshellprog &
The term will close when the program terminates.

You should probably consider putting the script in .X.d
« Last Edit: June 18, 2010, 12:29:09 PM by gerald_clark »

Offline burak

  • Newbie
  • *
  • Posts: 5
Re: run after X loaded
« Reply #2 on: June 18, 2010, 01:00:36 PM »

Thanks for the reply,

I did it, it turned out that rdesktop initiates to quickly for the X.
I added the line "sleep 2" in order for the X get stable on boot and rdesktop script runs after it.
It works both by using term -e or giving the script location directly.

It was working when I was logging out to shell and getting back via startx.
However when booted for the first time, the term windows was coming and getting disappeared with rdesktop running...
Adding the line "sleep 2" into the .xsession solved the problem. I did try sleep 1 , it did not work :)
Maybe because I am running it in Virtual PC, however Tiny Core rocks !!!  ;D

Cheers,
Burak