WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Insert a Wait Command in .xsession  (Read 3158 times)

Offline the_sim

  • Newbie
  • *
  • Posts: 5
Insert a Wait Command in .xsession
« on: November 28, 2009, 12:11:48 AM »
I have a script that starts my vmware view open client at startup through the .xsession file but I get a cannot connect to server error at bootup. Once I click on ok then click on connect it connects fine. I am assuming that the reason is because the network is not fully initialized when it tries to connect to the server the first time. How can I add a wait command in my .xsession file so it would wait a few seconds before calling this program?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Insert a Wait Command in .xsession
« Reply #1 on: November 28, 2009, 12:58:51 AM »
sleep 5

or you could just add the waitusb=5 to your boot opitons, adjusting the 5 to as many seconds as needed, as it really has nothing to do with usb it just pauses 5 seconds.
10+ Years Contributing to Linux Open Source Projects.

Offline the_sim

  • Newbie
  • *
  • Posts: 5
Re: Insert a Wait Command in .xsession
« Reply #2 on: November 28, 2009, 01:26:02 AM »
I read about the waitusb=5 but I was not sure at which point it would wait for 5 seconds. Do you know if it will wait after the network starts? If I use the sleep command would I put the sleep 5 just before I call the program in the .xsession?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Insert a Wait Command in .xsession
« Reply #3 on: November 28, 2009, 01:33:50 AM »
Yeah, waitubs is used for building fstab
Try:
.
sleep 5 && your_command
10+ Years Contributing to Linux Open Source Projects.

Offline the_sim

  • Newbie
  • *
  • Posts: 5
Re: Insert a Wait Command in .xsession
« Reply #4 on: November 28, 2009, 03:53:21 PM »
I tested it on 2 different PC and it worked on one of them but not the other. I might have to try a longer sleep for the other type of PC.

The one that it worked on is very dark when it comes up with tinycore. It looks fine before tinycore loads but then I see a white page just before the gui comes up and then it is very dark. It is hard to see the icons even with the brightness all the way up.

Is there something I can do to fix this?