Reply
Thread Tools Search this Thread
JonWW's Avatar
Posts: 623 | Thanked: 276 times | Joined on Jan 2010 @ UK
#21
Guessing here, try adding
Code:
sleep 100000
to the end of your script.
 
Posts: 21 | Thanked: 2 times | Joined on Apr 2010
#22
Thanks for the tip, but still nothing. I thought I try something simple, but I cant even do this with a script:
1. Start x terminal
2. run the command
ls
 
Posts: 900 | Thanked: 1,709 times | Joined on Dec 2010 @ Dayton, Ohio
#23
Originally Posted by raffe View Post
I would like a shortcut that
1. opens X terminal
2. Runs
nohup x11vnc -forever&
3. And then waits there until I do a Ctrl+C
I think explicitly calling osso-xterm with an exec flag from the shell script should do what you are saying here. Something like this:

Code:
#!/bin/sh
/usr/bin/osso-xterm -e "nohup x11vnc -forever"
Note: don't use the "&" flag, or the xterm will spawn off an independent x11vnc process and immediately close!

Edit: Or not. I just tried running osso-xterm -e "fennec &", and it worked exactly the same as just osso-xterm -e "fennec". Oh well, guess you can't use that sort of flag with -e...

Last edited by Copernicus; 02-10-2011 at 04:33 PM. Reason: Ampersand not working like I thought
 
Posts: 21 | Thanked: 2 times | Joined on Apr 2010
#24
Originally Posted by Copernicus View Post
I think explicitly calling osso-xterm with an exec flag from the shell script should do what you are saying here. Something like this:

Code:
#!/bin/sh
/usr/bin/osso-xterm -e "nohup x11vnc -forever"
Note: don't use the "&" flag, or the xterm will spawn off an independent x11vnc process and immediately close!

Edit: Or not. I just tried running osso-xterm -e "fennec &", and it worked exactly the same as just osso-xterm -e "fennec". Oh well, guess you can't use that sort of flag with -e...
Thanks for the tip, but not really there yet This works great!
Code:
#!/bin/sh
/usr/bin/osso-xterm -e "fennec"
This don't work, shows up on screen and the dissapears directly
Code:
#!/bin/sh
/usr/bin/osso-xterm -e "nohup x11vnc -forever"
Maybe I need to do something else when its a "terminal command"?
 
nicolai's Avatar
Posts: 1,621 | Thanked: 4,296 times | Joined on Apr 2009 @ Germany
#25
try this, make a script (say "xvncnohup.sh)":
Code:
#!/bin/sh
nohup x11vnc -forever &
/bin/sh
Put this script in /usr/bin
make a desktop file with the line
Exec=osso-xterm "/usr/bin/xvncnohup.sh"

Nicolai
 

The Following 2 Users Say Thank You to nicolai For This Useful Post:
Posts: 21 | Thanked: 2 times | Joined on Apr 2010
#26
Originally Posted by nicolai View Post
try this, make a script (say "xvncnohup.sh)":
Code:
#!/bin/sh
nohup x11vnc -forever &
/bin/sh
Put this script in /usr/bin
make a desktop file with the line
Exec=osso-xterm "/usr/bin/xvncnohup.sh"

Nicolai
I LOVE YOU!

It works, thank you!
 
Posts: 304 | Thanked: 112 times | Joined on May 2010 @ Malaysia
#27
hi..what if i want to show the output of the script?for example,

on the .desktop entry, the exec line is like this

Code:
Exec=/bin/busybox sh -c 'echo /path/to/script.sh | sudo gainroot'
however, it didn't show the output..just a blank(black) with the loading icon, then closes..

i put the script at /home/user..

how do i get the .desktop to show the output of the script?
 
Posts: 304 | Thanked: 112 times | Joined on May 2010 @ Malaysia
#28
anyone? =)
 
Banned | Posts: 34 | Thanked: 3 times | Joined on Jul 2011
#29
?????i don't see
 
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT -4. The time now is 10:52 AM.