WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xdialog scripting question - progress bar  (Read 7069 times)

Offline ACRizona

  • Jr. Member
  • **
  • Posts: 61
Xdialog scripting question - progress bar
« on: December 18, 2010, 11:30:59 PM »
...not beer or gold bar.  This a thermometer, speedometer bar showing the progress of something.   Keeps one entertained while BigSlowProgram loads.

How do I make it the "front-end" while BigSlowProgram loads ?
There is no RUN command in BASH.   I tried the background ampersand ruse, but Opera (as example) will not run (pun) in background 'mode'.

Any Guroo solutions ? :)        ( Please - only TinyCore capable.  No PHP etc. )

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Xdialog scripting question - progress bar
« Reply #1 on: December 19, 2010, 01:06:49 AM »
opera &
absolutely works.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Xdialog scripting question - progress bar
« Reply #2 on: December 19, 2010, 08:22:55 AM »
There is no RUN command in BASH.

There is 'exec', but don't use it indiscriminately.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ACRizona

  • Jr. Member
  • **
  • Posts: 61
Re: Xdialog scripting question - progress bar - CLARIFICATION
« Reply #3 on: December 19, 2010, 12:27:37 PM »
BASH:
Xdialog --progressbar.....10...9...8...7....6...5
exec BigSlowProgram :(

Results: 
Xdialog completes countdown from 10 to zero.
BigSlowProgram loads ( you are watching a blank screen) and runs. :P

Desired:
BigSlowProgram loads WHILE you watch Xdialog count down.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11026
Re: Xdialog scripting question - progress bar
« Reply #4 on: December 19, 2010, 01:12:07 PM »
Bigslowapp &
Xdialog --progressbar...
The only barriers that can stop you are the ones you create yourself.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Xdialog scripting question - progress bar
« Reply #5 on: December 19, 2010, 02:48:56 PM »
exec is not exactly a "run in background command" but is for replacing the current process with another.

Offline ACRizona

  • Jr. Member
  • **
  • Posts: 61
Re: Xdialog scripting question - progress bar
« Reply #6 on: December 19, 2010, 02:59:08 PM »
hmmmm...  I guess I'm in deep water.  I hoped for something simple that could be added to the wbar exec command line.  

Using Opera as my BigSlowExample, It seems I need another script to SET all values in background (matching user TC's foreground) so that Opera will run.  
Opera attempts it's first-time-run processes ( like a new user ).

Thanks for your help.


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Xdialog scripting question - progress bar
« Reply #7 on: December 19, 2010, 03:07:26 PM »
Opera is an X client, and cannot run outside of a logged-in X server with proper authentication..
Any logged in X user should be able to 'opera &'.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Xdialog scripting question - progress bar
« Reply #8 on: December 19, 2010, 06:41:29 PM »
Opera attempts it's first-time-run processes ( like a new user ).

One reason why this could happen is when no preexisting profile dir is used.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ACRizona

  • Jr. Member
  • **
  • Posts: 61
Re: Xdialog scripting question - progress bar
« Reply #9 on: December 20, 2010, 01:50:48 AM »
Got it ! :)

script1 appears:
/usr/local/bin/opera -nomail -nolirc -personaldir /home/tc/.opera/
exit

# tinypoodle was right-on to -personaldir
# Opera documentation  ::)   no comment!

script2 appears:
script1 &       #launch Opera
xdialog progress bar... 10.. 9... 8...
exit


wbar
Changed Opera entry to read exec /user/tc/script2

Later I'll add a 'single-instance' check to allow only 1 Opera.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Xdialog scripting question - progress bar
« Reply #10 on: December 20, 2010, 05:29:31 AM »
Not sure if '-personaldir' would work, but '-pd' certainly does   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)