Forums

help - close all POL programs running by console?

i want to create a shortcut on my desktop

Auteur Réponses
luiscuadrado123 Lundi 11 Mai 2015 à 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' \;

 

Edité par luiscuadrado123

Ronin DUSETTE Lundi 11 Mai 2015 à 6:01
Ronin DUSETTE

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 Lundi 11 Mai 2015 à 7:15
petch

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 Lundi 11 Mai 2015 à 17:37
luiscuadrado123

jajaja

 

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

 

any another idea?

petch Jeudi 14 Mai 2015 à 8:03
petch

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)"

 

Edité par petch

cripplebeast Jeudi 21 Mai 2015 à 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

Edité par cripplebeast

cripplebeast Jeudi 21 Mai 2015 à 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 Jeudi 21 Mai 2015 à 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 Jeudi 21 Mai 2015 à 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

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com