Reply
Thread Tools
JonWW's Avatar
Posts: 623 | Thanked: 284 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: 1,343 | Thanked: 3,571 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; 2011-02-10 at 20:33. 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,637 | Thanked: 4,406 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: 309 | Thanked: 113 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: 309 | Thanked: 113 times | Joined on May 2010 @ Malaysia
#28
anyone? =)
 
Banned | Posts: 34 | Thanked: 3 times | Joined on Jul 2011
#29
?????i don't see
 
Posts: 24 | Thanked: 6 times | Joined on Apr 2013
#30
hello guys,
i need some help out here, i downloaded a script (evil ap.sh) and i was wondering if i can link it to the Desktop (like the ones in the pwnie express image) so that i would press the icon and the script would run automatically instead of "cd" in xterm to mydocs and execute it.
any help appreciated and thanks in advance
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 00:37.