windows-subsystem-for-linux

Using subprocess() in with variable containing the DOS-cmd

早过忘川 提交于 2020-07-22 08:01:59
问题 I not that good in programming and have a problem using the subprocess() command in Python. My program creates the following string: wsl ocrmypdf -sr -l deu "\mnt\z\dms\_inbox\Scan 2019-11-27 13.12.33.pdf" "z:\dms\_inbox\OCR_Scan 2019-11-27 13.12.33.pdf" If I use this command in my Windows 10 DOSbox it is working without issues. Now I want to start it with the following Python command: subprocess.run(cmd, shell=True, check=True, stdout=subprocess.PIPE, universal_newlines=True).decode() While

Can't open sublime in Bash on Ubuntu on WIndows

橙三吉。 提交于 2020-07-16 06:16:24
问题 I would like to be able to open the sublime text editor from the command line from Bash on Ubuntu on Windows, but each time I attempt to run the command 'subl' I get hit with -bash: C:/Program Files/Sublime Text 3/sublime_text.exe: No such file or directory This is definitely the right directory, but I have no clue as to why this isn't working. Any tips? 回答1: Run notepad as administrator. Copy & paste this two line of code below: #!/bin/bash "$(dirname "$0")/subl.exe" "$@" Save it as subl.txt

Can't open sublime in Bash on Ubuntu on WIndows

本小妞迷上赌 提交于 2020-07-16 06:15:56
问题 I would like to be able to open the sublime text editor from the command line from Bash on Ubuntu on Windows, but each time I attempt to run the command 'subl' I get hit with -bash: C:/Program Files/Sublime Text 3/sublime_text.exe: No such file or directory This is definitely the right directory, but I have no clue as to why this isn't working. Any tips? 回答1: Run notepad as administrator. Copy & paste this two line of code below: #!/bin/bash "$(dirname "$0")/subl.exe" "$@" Save it as subl.txt

Can't open sublime in Bash on Ubuntu on WIndows

别来无恙 提交于 2020-07-16 06:15:14
问题 I would like to be able to open the sublime text editor from the command line from Bash on Ubuntu on Windows, but each time I attempt to run the command 'subl' I get hit with -bash: C:/Program Files/Sublime Text 3/sublime_text.exe: No such file or directory This is definitely the right directory, but I have no clue as to why this isn't working. Any tips? 回答1: Run notepad as administrator. Copy & paste this two line of code below: #!/bin/bash "$(dirname "$0")/subl.exe" "$@" Save it as subl.txt

Which Android sdkmanager version to use?

北慕城南 提交于 2020-07-10 10:25:25
问题 I've followed the steps from Jing Li's answer for this question. My initial directory structure for Android was: $ tree -L 3 ~/Programs/ ~/Programs/ └── Android └── cmdline-tools └── tools I added these lines to .bashrc : export ANDROID_SDK_ROOT=$HOME/Programs/Android export ANDROID_HOME=$ANDROID_SDK_ROOT export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools:$PATH export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/bin:$PATH export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/lib:$PATH export PATH=

PostreSQL 10 fails to start on Ubuntu 18.04 running on Windows Subsystem for Linux

时间秒杀一切 提交于 2020-07-07 11:22:28
问题 I recently did a fresh install of Ubuntu 18.04 on Windows 10 using the Windows Subsystem for Linux (WSL). I then installed PostgreSQL 10 and was able to start the database server successfully. I then logged into the server via PGAdmin 4.4 and installed the PostGIS 2.5.2 extension. I was then about to import data via pg_restore when PGAdmin said it had lost its connection to the PostgreSQL server. I tried restarting and I got the following errors in my log: 2019-04-04 15:46:12.561 DST [47] LOG

PostreSQL 10 fails to start on Ubuntu 18.04 running on Windows Subsystem for Linux

泄露秘密 提交于 2020-07-07 11:22:13
问题 I recently did a fresh install of Ubuntu 18.04 on Windows 10 using the Windows Subsystem for Linux (WSL). I then installed PostgreSQL 10 and was able to start the database server successfully. I then logged into the server via PGAdmin 4.4 and installed the PostGIS 2.5.2 extension. I was then about to import data via pg_restore when PGAdmin said it had lost its connection to the PostgreSQL server. I tried restarting and I got the following errors in my log: 2019-04-04 15:46:12.561 DST [47] LOG

Windows Subsystem for Linux (WSL) using shared Node.js installation with Windows: Node.js npm & npx binaries not working

非 Y 不嫁゛ 提交于 2020-07-06 19:56:31
问题 I have recently moved to a Windows + WSL environment (WSL is going very good by the way). The main reason of doing this is to have a Linux environment for development and having Windows for other apps & games without having to reboot my computer (had a dual-boot setup before). In the setup process, I found most of the Windows installed binaries can be executed from WSL. So instead of duplicating installations (eg: installing java and maven in Windows in order to use Eclipse IDE and then

WSL (Ubuntu): how to open localhost in browser from bash terminal

不问归期 提交于 2020-07-06 10:39:14
问题 I am trying to open http://localhost in (any) browser from WSL bash terminal. So far I have tried: How can I open Google Chrome from the terminal with the URL "localhost:3000"? "Couldn't find a file descriptor referring to the console" on Ubuntu bash on Windows How to mention C:\Program Files in batchfile No luck in setting up BROWSER variable for xdg-open, it responds to xdg-open http://localhost with /usr/bin/xdg-open: 851: /usr/bin/xdg-open: /c/"Program: not found . I have tried escaping

WSL (Ubuntu): how to open localhost in browser from bash terminal

只谈情不闲聊 提交于 2020-07-06 10:38:17
问题 I am trying to open http://localhost in (any) browser from WSL bash terminal. So far I have tried: How can I open Google Chrome from the terminal with the URL "localhost:3000"? "Couldn't find a file descriptor referring to the console" on Ubuntu bash on Windows How to mention C:\Program Files in batchfile No luck in setting up BROWSER variable for xdg-open, it responds to xdg-open http://localhost with /usr/bin/xdg-open: 851: /usr/bin/xdg-open: /c/"Program: not found . I have tried escaping