Use Wine to run Cool Q Air/Pro in Docker container Author: Chuwen Time: 2018-12-13 Classification: Linux comment >Docker wine coolq allows you to run Cool Q Air or Cool Q Pro in Docker container through Wine. >Even if the dockerfile warehouse is released using GPL, the downloaded software still follows the end user license agreement. Please confirm that you agree to the agreement before downloading. >As the version is updated, the cool Q of wine is not always available. If you encounter the problem of unavailability, it can still be reproduced after strictly following the steps below, please submit the issue or give feedback in the community. # 1. How to eat (use) ># # First, install Docker. See details: https://nowtime.cc/linux/481.html How to install ## 1-1. After installation, execute the following command: ``` docker pull coolq/wine-coolq mkdir coolq && cd coolq docker run --rm -p 9000:9000 -v `pwd`:/home/user/coolq coolq/wine-coolq ``` ###You can run a wine coolq instance. After running, visit http://your IP: 9000 to open a VNC page. Enter MAX8char as the password to see that a cool Q Air has started. --- ###Cool Q and its data files will be saved in the/home/user/coolq folder in the container, and mapped to the folder created in the second step of the above command on the host. Adjusting the - v parameter can change the path of the host mapping. # 2. environment variable ># # When creating a docker container, you can use the following environment variables to adjust the container behavior. -# # # ` VNC_PASSWD ` Set VNC password. Note that the password cannot exceed 8 characters. -# # # ` COOLQ_ACCOUNT ` Set the account to log in to KuQ. After the first manual login, you can check the "Quick Login" function to enable automatic login. After that, when the docker container starts or KuQ exits abnormally, you will be automatically logged in to the account. -# # # ` COOLQ_URL ` Set the address for downloading Cool Q, which is defaulted to` http://dlsec.cqp.me/cqa-tuling `, the cool Q Air Turing version. Please ensure that the downloaded file can be decompressed to 'Cool Q Air/CQA.exe' or 'Cool Q Pro/CQP.exe` GitHub: https://github.com/CoolQ/docker-wine-coolq
Android executes shell commands | JAVA executes shell commands Author: Chuwen Time: 2018-12-07 Classification: Java comment ```java public static String execCMD(String command) { StringBuilder sb =new StringBuilder(); try { Process process=Runtime.getRuntime().exec(command); BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(process.getInputStream())); String line; while((line=bufferedReader.readLine())!= null) { sb.append(line+"\n"); } } catch (Exception e) { return e.toString(); } return sb.toString(); } ```