You are not logged in.
Pages: 1
hi to all !
i want do write a little script that launch a program only if it isn't already opened instead if there is already an istance opened close , kill it
i need help
PS: i'm trying to make the script so when i click on clock in pypanel it show me a calendar ....
thanks very much
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
killall calendar || setsid calendar &
Offline
killall calendar || setsid calendar &
thanks very much
i've put it directly in pypanel !!!!
OT: only one thing i don't understand..... from when i click to when orage is displayed there is 1 second
what is the problem ???
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Maybe it doesn't like setsid and &, try without. It shouldn't make a difference though, when I use either in xbindkeys it works immediately.
Offline
You should also try to find out what it does with strace. Just run it as
strace -tt -o strace.txt pypanel
wait a minute and remember the time
press the button
maybe wait another minute (there is a lot of noise at program start and end)
quit
look at the strace log and see if you can find the time you pressed the button and why it paused.
Offline
Pages: 1