The forum

help - close all POL programs running by console?

i want to create a shortcut on my desktop

Author Replies
luiscuadrado123 Monday 11 May 2015 at 5:28
luiscuadrado123

SOLVED

Hello!!

I want to create a desktop shortcut to CLOSE all the programs from POL runing (like the options inside the Tools menu in POL).

I don't know what is the command i need to exect to do this.

Anybody?

Thanks!

SOLVED: the command i wanted was this:

find $HOME/.PlayOnLinux/wineprefix/* -maxdepth 0 -exec /bin/bash -c 'export WINEPREFIX="{}"; /usr/bin/wineserver -k' \;

 

Edited by luiscuadrado123

Ronin DUSETTE Monday 11 May 2015 at 6:01
Ronin DUSETTE
Admin

wineserver -k, if I am not mistaken. You should just be able to create a script with this command and add a shortcut to it (make sure you make it executable.). At least that is my first thought to doing it. 


Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Monday 11 May 2015 at 7:15
petch
Developer

wineserver -k alone will probably not work, at the very minimum $WINEPREFIX will have to be set correctly first, and then possibly the right wineserver will have to be used (same instance used for the given virtual drive).

Even if the latter condition is not required (I haven't checked), on some distributions like Debian and derivatives, wineserver is not in the $PATH, so wineserver -k will just result in an error (command not found).

luiscuadrado123 Monday 11 May 2015 at 17:37
luiscuadrado123

jajaja

 

wineserver -k on the console don't close any program :(

 

any another idea?

petch Thursday 14 May 2015 at 8:03
petch
Developer

Well, you can create a stop shortcut; If $SHORTCUT represents the shortcut of the program to stop, run

$ sed -e 's/^POL_Wine /wineserver -k/' < ~/.PlayOnLinux/shortcuts/"$SHORTCUT" > ~/.PlayOnLinux/shortcuts/"$SHORTCUT (Stop)"

Then to stop the program,

$ playonlinux --run "$SHORTCUT (Stop)"

 

Edited by petch

cripplebeast Thursday 21 May 2015 at 5:19
cripplebeastAnonymous

If all else fails

sudo shutdown -r now

or more seriously

find /full/path/to/playonlinux/prefixes/* -maxdepth 0 -exec /bin/bash -c 'export WINEPREFIX="{}"; /full/path/to/wineserver -k' \;

or something along those lines

this should (someone please correct me if im wrong, i like learning) end all games currently running under playonlinux

 

sample output:

Im currently at work so dont have access to wine

find ~/this/* -maxdepth 0 -exec /bin/bash -c 'export WINEPREFIX="{}"; echo "WINEPREFIX=$WINEPREFIX; wineserver -k"' \;

WINEPREFIX=/home/mobaxterm/this/hello; wineserver -k
WINEPREFIX=/home/mobaxterm/this/that; wineserver -k
WINEPREFIX=/home/mobaxterm/this/this; wineserver -k

Edited by cripplebeast

cripplebeast Thursday 21 May 2015 at 9:02
cripplebeastAnonymous

this may be a dead thread by now but here is the full command, I have tested this and it is working

find $HOME/.PlayOnLinux/wineprefix/* -maxdepth 0 -exec /bin/bash -c 'export WINEPREFIX="{}"; /usr/bin/wineserver -k' \;

I put too much effort into this bash fu to not follow through

luiscuadrado123 Thursday 21 May 2015 at 13:43
luiscuadrado123

 

this may be a dead thread by now but here is the full command, I have tested this and it is working

find $HOME/.PlayOnLinux/wineprefix/* -maxdepth 0 -exec /bin/bash -c 'export WINEPREFIX="{}"; /usr/bin/wineserver -k' \;

I put too much effort into this bash fu to not follow through

 

cripplebeast Thursday 21 May 2015 at 14:11
cripplebeastAnonymous

You are most welcome.

I must have used this about 20 times already in the past couple of hours, its actually incredibly useful