├── .gitignore
├── .gitmodules
├── 00-wsl2-systemd.sh
├── ISwitch.exe
├── ISwitch.ini
├── ISwitch.msi
├── ISwitchlab.dll
├── LICENSE
├── README.md
├── argenv.sh
├── chguimod
├── clone.json
├── createln.sh
├── cwinlnk.sh
├── cygXS
├── cygwinXenv.sh
├── docker-service.sh
├── gnomelogout.py
├── gnomelogout.sh
├── install.sh
├── install_docker.sh
├── logo.txt
├── mklnk.exe
├── mysystemd.sh
├── restartudev.sh
├── runv4tov4.sh
├── setguienv.sh
├── setproxy.sh
├── setresolv.sh
├── setwsl2bridge.sh
├── setwslgenv.sh
├── shutdown.sh
├── slogo.txt
├── start-xfce4-2
├── start-xfce4-panel.sh
├── start-xfce4.sh
├── startXServer.sh
├── startgnome.sh
├── startgnome2.sh
├── startgnome3.sh
├── startjupyter-lab.sh
├── startplasma.sh
├── startsshd
├── startwslX.sh
├── temp
├── ucrtbase.dll
├── ucrtbased.dll
├── unsetproxy.sh
├── update.sh
├── vcruntime140.dll
├── vcruntime140d.dll
├── vscode.sh
├── wslfcitx.sh
├── wslibus.sh
├── wslpanel.sh
├── wslstartxfce4.sh
├── wslterminator.sh
└── wupdatee.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | .ipynb_checkpoints
2 | temp
3 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "cygwin-auto-install"]
2 | path = cygwin-auto-install
3 | url = https://github.com/nufeng1999/cygwin-auto-install.git
4 |
--------------------------------------------------------------------------------
/00-wsl2-systemd.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | cd /mnt/c
3 | #export WAYLAND_DISPLAY=wayland-0
4 | #export DISPLAY=:0
5 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -n9 > /dev/null 2>&1 &
6 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -n1 > /dev/null 2>&1 &
7 | SYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target' | grep -v unshare|grep -v grep | awk '{print $2}')
8 | if [ -z "$SYSTEMD_PID" ]; then
9 | sudo /usr/bin/daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
10 | sleep 3
11 | SYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target' | grep -v unshare|grep -v grep | awk '{print $2}')
12 | fi
13 | if [ -n "$SYSTEMD_PID" ] && [ "$SYSTEMD_PID" != "1" ]; then
14 | exec sudo /usr/bin/nsenter -t $SYSTEMD_PID -m -p su - $LOGNAME
15 | sleep 3
16 | fi
17 | cd $HOME
18 |
--------------------------------------------------------------------------------
/ISwitch.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/ISwitch.exe
--------------------------------------------------------------------------------
/ISwitch.ini:
--------------------------------------------------------------------------------
1 | [win]
2 | x=48
3 | y=-12
4 | ex=48
5 | ey=0
6 | [xwin]
7 | fx=12
8 | fex=-24
9 | fy=0
10 | fey=-18
--------------------------------------------------------------------------------
/ISwitch.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/ISwitch.msi
--------------------------------------------------------------------------------
/ISwitchlab.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/ISwitchlab.dll
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |   
2 |
3 | # WSL_GNOME
4 |
5 | 你可以加入[discord: discord.gg/xpkehrBx](https://discord.gg/xpkehrBx) 以获取项目最新进展.
6 |
7 | # Windows & Linux GUI Mix WSL GNOME Desktop
8 |
9 | Use Cygwin's xwin to run WSL GNOME Desktop
10 |
11 | ISwitch.exe --- Contrl app window maxsize,Resolving windows and WSL gui app input method conflicts
12 |
13 | ISwitch.exe -c --- Resolving windows and WSL gui app input method conflicts
14 |
15 | ISwitch.exe -w --- Contrl app window maxsize
16 |
17 | ISwitch.exe -s --- Move task to background( default -c -w)
18 |
19 | [](https://youtu.be/iy8j-fD82aQ)
20 |
21 | 
22 | 
23 | 
24 |
25 | # Install
26 |
27 | Important Notice :
28 | 1.Executing Windows terminal with administrator
29 | 2.Executing WSL with root (wsl -u root -d Ubuntu )
30 |
31 | ## Powershell /DOS
32 |
33 | notepad %USERPROFILE%\.wslconfig
34 | [wsl2]
35 | guiApplications=false
36 |
37 | ## WSL
38 |
39 | su - root
40 |
41 | apt install net-tools hwdata gedit
42 | apt install fcitx fcitx-ui-qimpanel fcitx-config-gtk fcitx-sunpinyin fcitx-pinyin fcitx-googlepinyin xfonts-intl-chinese
43 | apt install xfonts-wqy xfonts-unifont fonts-wqy*
44 |
45 | ## It depends on the version
46 | apt install linux-tools-generic graphicsmagick-imagemagick-compat
47 |
48 | apt install language-pack-gnome-zh-hans language-pack-kde-zh-hans language-pack-zh-hans
49 | apt install daemonize gdm3 gnome
50 | apt install ibus-libpinyin ibus-pinyin ibus-sunpinyin
51 |
52 | mkdir /opt/WSL
53 |
54 | cd /opt/WSL
55 |
56 | git clone --recurse-submodules
57 |
58 | or
59 |
60 | git clone git://github.com/nufeng1999/WSL_GNOME.git --recurse-submodules
61 |
62 | cd WSL_GNOME/cygwin-auto-install
63 | git checkout master
64 | cd ../
65 |
66 | ### Install WSL_GNOME
67 |
68 | chmod +x ./install.sh
69 | ./install.sh
70 | OR
71 | ./install.sh -c "C:\\\\cygwin64" -i "C:\\\\ISwitch"
72 | OR
73 | ./install.sh --cygwindir="C:\\\\cygwin64" --iswitchdir "C:\\\\ISwitch"
74 |
75 | 0.67.6+version of wsl already supports systemd
76 | Edit the file /etc/wsl.conf
77 | [boot]
78 | systemd=true
79 |
80 | # Close WSL
81 |
82 | DOS/PowerShell
83 |
84 | wsl --shutdown
85 |
86 | # reopening WSL
87 |
88 | wsl -u root -d Ubuntu
89 |
90 | // execute gnome
91 | ~~wsl2-systemd~~
92 | ~~gnome-session &~~
93 |
94 | startgnome2
95 | // other user execute gnome
96 | . setguienv
97 | startgnome2
98 |
99 | # Change the operating mode of the wls gui
100 |
101 | sudo chguimod -m 1 wslg mode
102 |
103 | sudo chguimod -m 2 xwin mode
104 |
105 | wslg 模式下字体清晰,中文输入流畅.
106 |
107 |
108 | 配合 SystemTrayMenu 工具使用更方便
109 | [SystemTrayMenu 项目](https://github.com/Hofknecht/SystemTrayMenu)
110 |
111 | ***
112 | If you feel that these contents are helpful to you, you can make friendly sponsorship to developers.You may get more help after sponsorship
113 |
114 | 如果你感觉这些内容对你有所帮助,可以向开发者进行友情赞助。赞助后你将可能获得更多帮助。
115 |
116 |
117 | WeChat Pay(微信方式赞助)
118 |
119 |
120 | Alipay(支付宝方式赞助)
121 |
122 | 咸鱼低付费远程协助 闲鱼搜【远程协助在wsl2运行gnome桌面】
123 |
124 | 咸鱼低付费远程协助 闲鱼搜【远程协助在wsl2运行gnome桌面】
125 |
126 | 技术支持赞助群名称:
127 | WSL_XWin_Cygwin
128 | 群 号:
129 | 1014866104
130 | 技术群含更多资料
131 | [赞助后可获得入群答案](http://dt1.8tupian.net/2/29215a3b200.pg3 "支付宝扫码支付后可获得入群答案")。
132 |
133 | QQ技术支持赞助群
134 |
--------------------------------------------------------------------------------
/argenv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | temp=`getopt -o c:i: --long cygwindir:,iswitchdir: \
3 | -n 'install.sh' -- "$@"`
4 | if [ $? != 0 ] ; then
5 | #echo "Unrecognized parameter..." >&2
6 | exit 1
7 | fi
8 |
9 | eval set -- "$temp"
10 |
11 | while true
12 | do
13 | case "$1" in
14 | -c|--cygwindir)
15 | CYGWINDIR="$2"
16 | #export CYGWINDIR
17 | #echo "cygwin install_dir: \`$2'"
18 | shift 2
19 | ;;
20 | -i|--iswitchdir)
21 | ISWITCHDIR="$2"
22 | #export ISWITCHDIR
23 | #echo "iswitchdir install_dir: \`$2'"
24 | shift 2
25 | ;;
26 | --)
27 | shift
28 | break
29 | ;;
30 | *)
31 | # echo "internal error!"
32 | exit 1
33 | ;;
34 | esac
35 | done
36 | #echo "Unrecognized arguments:"
37 | #for arg do
38 | # echo '--> '"\`$arg'" ;
39 | #done
40 |
41 |
--------------------------------------------------------------------------------
/chguimod:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/chguimod
--------------------------------------------------------------------------------
/clone.json:
--------------------------------------------------------------------------------
1 | {
2 | "count": 215,
3 | "uniques": 50,
4 | "clones": [
5 | {
6 | "timestamp": "2021-10-16T00:00:00Z",
7 | "count": 8,
8 | "uniques": 7
9 | },
10 | {
11 | "timestamp": "2021-10-17T00:00:00Z",
12 | "count": 3,
13 | "uniques": 3
14 | },
15 | {
16 | "timestamp": "2021-10-18T00:00:00Z",
17 | "count": 1,
18 | "uniques": 1
19 | },
20 | {
21 | "timestamp": "2021-10-19T00:00:00Z",
22 | "count": 7,
23 | "uniques": 4
24 | },
25 | {
26 | "timestamp": "2021-10-20T00:00:00Z",
27 | "count": 4,
28 | "uniques": 1
29 | },
30 | {
31 | "timestamp": "2021-10-21T00:00:00Z",
32 | "count": 18,
33 | "uniques": 5
34 | },
35 | {
36 | "timestamp": "2021-10-22T00:00:00Z",
37 | "count": 17,
38 | "uniques": 4
39 | },
40 | {
41 | "timestamp": "2021-10-23T00:00:00Z",
42 | "count": 35,
43 | "uniques": 5
44 | },
45 | {
46 | "timestamp": "2021-10-24T00:00:00Z",
47 | "count": 26,
48 | "uniques": 7
49 | },
50 | {
51 | "timestamp": "2021-10-25T00:00:00Z",
52 | "count": 40,
53 | "uniques": 8
54 | },
55 | {
56 | "timestamp": "2021-10-26T00:00:00Z",
57 | "count": 37,
58 | "uniques": 10
59 | },
60 | {
61 | "timestamp": "2021-10-27T00:00:00Z",
62 | "count": 13,
63 | "uniques": 7
64 | },
65 | {
66 | "timestamp": "2021-10-28T00:00:00Z",
67 | "count": 3,
68 | "uniques": 2
69 | },
70 | {
71 | "timestamp": "2021-10-29T00:00:00Z",
72 | "count": 3,
73 | "uniques": 2
74 | }
75 | ]
76 | }
77 |
--------------------------------------------------------------------------------
/createln.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ln -sf $PWD/cygwinXenv.sh /usr/bin/cygwinXenv
3 | ln -sf $PWD/setguienv.sh /usr/bin/setguienv
4 | ln -sf $PWD/setproxy.sh /usr/bin/setproxy
5 | ln -sf $PWD/unsetproxy.sh /usr/bin/unsetproxy
6 | ln -sf $PWD/startwslX.sh /usr/bin/startwslX
7 | ln -sf $PWD/startXServer.sh /usr/bin/startXServer
8 | ln -sf $PWD/wslfcitx.sh /usr/bin/wslfcitx
9 | ln -sf $PWD/wslibus.sh /usr/bin/wslibus
10 | ln -sf $PWD/wslpanel.sh /usr/bin/wslpanel
11 | ln -sf $PWD/wslstartxfce4.sh /usr/bin/wslstartxfce4
12 | ln -sf $PWD/wslterminator.sh /usr/bin/wslterminator
13 | ln -sf $PWD/setwsl2bridge.sh /usr/bin/setwsl2bridge
14 | ln -sf $PWD/00-wsl2-systemd.sh /usr/bin/wsl2-systemd
15 | ln -sf $PWD/setresolv.sh /usr/bin/setresolv.sh
16 | ln -sf $PWD/restartudev.sh /usr/bin/restartudev
17 | ln -sf $PWD/start-xfce4-panel.sh /usr/bin/start-xfce4-panel
18 | ln -sf $PWD/start-xfce4.sh /usr/bin/start-xfce4
19 | ln -sf $PWD/startgnome2.sh /usr/bin/startgnome2
20 | ln -sf $PWD/startgnome.sh /usr/bin/startgnome
21 | ln -sf $PWD/cygXS /usr/bin/cygXS
22 | ln -sf $PWD/gnomelogout.sh /usr/bin/gnomelogout
23 | ln -sf $PWD/start-xfce4-2 /usr/bin/start-xfce4-2
24 | ln -sf $PWD/setwslgenv.sh /usr/bin/setwslgenv
25 | ln -sf $PWD/chguimod /usr/bin/chguimod
26 | ln -sf $PWD/cwinlnk.sh /usr/bin/cwinlnk
27 |
28 | chmod +x /usr/bin/cwinlnk
29 | chmod +x /usr/bin/chguimod
30 | chmod +x /usr/bin/setwslgenv
31 | chmod +x /usr/bin/start-xfce4-2
32 | chmod +x /usr/bin/startgnome2
33 | chmod +x /usr/bin/startgnome
34 | chmod +x /usr/bin/gnomelogout
35 | chmod +x /usr/bin/cygXS
36 | chmod +x /usr/bin/cygwinXenv
37 | chmod +x /usr/bin/setguienv
38 | chmod +x /usr/bin/setproxy
39 | chmod +x /usr/bin/unsetproxy
40 | chmod +x /usr/bin/startwslX
41 | chmod +x /usr/bin/startXServer
42 | chmod +x /usr/bin/wslfcitx
43 | chmod +x /usr/bin/wslibus
44 | chmod +x /usr/bin/wslpanel
45 | chmod +x /usr/bin/wslstartxfce4
46 | chmod +x /usr/bin/wslterminator
47 | chmod +x /usr/bin/setwsl2bridge
48 | chmod +x /usr/bin/wsl2-systemd
49 | chmod +x /usr/bin/setresolv.sh
50 | chmod +x /usr/bin/restartudev
51 |
--------------------------------------------------------------------------------
/cwinlnk.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | Icon=`cat $1|grep Icon=| head -n 1| cut -c6-`
4 |
5 | Exec=`cat $1|grep TryExec=| head -n 1| cut -c9-| sed 's/ \+.*$//'`
6 | if [ "1$Exec" = "1" ];then
7 | Exec=`cat $1|grep Exec=| head -n 1| cut -c6-| sed 's/ \+.*$//'`
8 | fi
9 | # echo $Icon
10 | # echo $Exec
11 |
12 | Iconfile=`find /usr/share -name "*$Icon*"|grep 128|grep .png| head -n 1`
13 | if [ "1$Iconfile" = "1" ];then
14 | Iconfile=`find /usr/share -name "*$Icon*"|grep .svg| head -n 1`
15 | fi
16 | # echo "$Iconfile"
17 | WSLApps_path="/mnt/c/ProgramData/Microsoft/Windows/Start\ Menu/Programs/WSLApps"
18 | WSLApps_icopath="/mnt/c/Program\ Files/wslapps/icons/$Icon.ico"
19 |
20 | WSLApps_icopath="/mnt/c/ISwitch/icons"
21 | mkdir -p $WSLApps_icopath/usr/share/applications/org.gnome.Terminal.desktop
22 | # echo "convert \"$Iconfile\" \"$WSLApps_icopath/$Icon.ico\""
23 | convert $Iconfile "$WSLApps_icopath/$Icon.ico"
24 |
25 | Execlnk=$Exec
26 | if [ "1$2" != "1" ];then
27 | Execlnk=$2
28 | fi
29 | cd /mnt/c
30 | folder="/mnt/c/ProgramData/Microsoft/Windows/Start Menu/Programs/WSLApps"
31 | if [ ! -d "$folder" ]; then
32 | /mnt/c/WINDOWS/System32/cmd.exe /C MKDIR "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\WSLApps" 2>&1 >/dev/null
33 | fi
34 |
35 | /mnt/c/WINDOWS/System32/cmd.exe /C c:\\ISwitch\\mklnk.exe -n "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\WSLApps\\$Execlnk.lnk" -r "C:\\cygwin64\\bin\\run.exe" -w "C:\\Program Files\\wslapps" -c "--quote C:\\Windows\\System32\\wsl.exe -u nufeng -d Ubuntu bash -l -c '. /usr/bin/setguienv;$3 $Exec'" -i "c:\\ISwitch\\icons\\$Icon.ico" 2>&1 >/dev/null
36 | cd /opt/WSL/WSL_GNOME
37 | cd ~
38 |
--------------------------------------------------------------------------------
/cygXS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/cygXS
--------------------------------------------------------------------------------
/cygwinXenv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | export CYGWINDIR="C:\\cygwin64"
3 | export ISWITCHDIR="C:\\ISwitch"
4 |
--------------------------------------------------------------------------------
/docker-service.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | DOCKER_DISTRO="Ubuntu"
3 | DOCKER_DIR=/mnt/wsl/shared-docker
4 | DOCKER_SOCK="$DOCKER_DIR/docker.sock"
5 | export DOCKER_HOST="unix://$DOCKER_SOCK"
6 | if [ ! -S "$DOCKER_SOCK" ]; then
7 | mkdir -pm o=,ug=rwx "$DOCKER_DIR"
8 | /mnt/c/Windows/System32/wsl.exe -u root -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
9 | fi
10 |
--------------------------------------------------------------------------------
/gnomelogout.py:
--------------------------------------------------------------------------------
1 | from gi.repository import GLib
2 | import dbus_next
3 | from dbus_next.aio import MessageBus
4 |
5 |
6 | bus = MessageBus().connect()
7 |
8 | def handler(message):
9 | print("Received Logout signal")
10 | # 处理逻辑
11 |
12 | bus.add_message_handler(handler,
13 | interface_name="org.gnome.SessionManager",
14 | member_name="Logout")
15 |
16 | #loop = asyncio.get_event_loop()
17 | #loop.run_forever()
18 |
19 | #bus = MessageBus()
20 |
21 | #bus.add_signal_receiver(
22 | # logout_handler,
23 | # signal_name="Logout",
24 | # dbus_interface="org.gnome.SessionManager",
25 | # bus_name="org.gnome.SessionManager"
26 | #)
27 | #def logout_handler(user_data=None):
28 | # print("Received logout signal.")
29 |
30 | loop = GLib.MainLoop()
31 | loop.run()
32 |
33 |
--------------------------------------------------------------------------------
/gnomelogout.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PROC_NAME="type=signal,member=CustomSignal"
4 | ProcNumber=`ps -ef |grep -w "$PROC_NAME"|grep -v grep|wc -l`
5 | if [ $ProcNumber -gt 0 ];then
6 | exit
7 |
8 | fi
9 | logout() {
10 | echo $1
11 | if echo "$1" | grep -q "gnomelogout"; then
12 | #if echo "$1" | grep -q "interface=org.freedesktop.PackageKit.Transaction; member=Destroy"; then
13 | #if [[ $1 == *"org.freedesktop.DBus.Local; member=Disconnected"* ]]; then
14 | #if [ "$1" = "Logout" ]; then
15 | sleep 1
16 | echo "清理并重新启动 XServer."
17 |
18 | /usr/bin/startXServer restart 0
19 | /usr/bin/wslfcitx reload
20 | pn=`ps -ef|grep -w "$PROC_NAME"|grep -v grep|awk '{print $2}'`
21 | if [ "A$pn" != "A" ] ;then
22 | if [ $pn -gt 0 ];then
23 | kill -9 $pn >/dev/null
24 | exit
25 | fi
26 | fi
27 | elif [ "$1" = "Shutdown" ]; then
28 | echo "Shutdown"
29 | fi
30 |
31 | }
32 |
33 |
34 | /usr/bin/dbus-monitor "type=signal,member=CustomSignal" | while read line; do
35 | #/usr/bin/dbus-monitor --system interface=org.freedesktop.PackageKit.Transaction | while read line; do
36 | logout "$line"
37 | done
38 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | CYGWINDIR='C:\\cygwin64'
3 | ISWITCHDIR='C:\\ISwitch'
4 | . ./argenv.sh "$@"
5 | echo "cygwin install_dir: $CYGWINDIR"
6 | echo "iswitchdir install_dir: $ISWITCHDIR"
7 | #echo $CYGWINDIR
8 | #echo $ISWITCHDIR
9 | #Generate file cygwinXenv.sh
10 | cat << EOF > $PWD/cygwinXenv.sh
11 | #!/bin/sh
12 | export CYGWINDIR="$CYGWINDIR"
13 | export ISWITCHDIR="$ISWITCHDIR"
14 | EOF
15 | /mnt/c/WINDOWS/System32/cmd.exe /c "taskkill /F /IM ISwitch.exe" > /dev/null 2>&1
16 |
17 | wintemp=`/mnt/c/WINDOWS/System32/cmd.exe /c "echo %TEMP%" 2>/dev/null|head -n 1 |tail -n 1`
18 | winwsltemp=`wslpath -u $wintemp`
19 | winwsltemp=${winwsltemp//$'\r'}
20 | winwsltemp=${winwsltemp//$'\n'}
21 | cygwininstallfile=`echo $winwsltemp/cygwin-install.bat`
22 | ISwitchinstallfile=`echo $winwsltemp/ISwitch.msi`
23 |
24 | cp $PWD/cygwin-auto-install/cygwin-install.bat $cygwininstallfile
25 | cp $PWD/ISwitch.msi $ISwitchinstallfile
26 | #cp $PWD/ucrtbase.dll /mnt/c/WINDOWS/System32/
27 | #cp $PWD/ucrtbased.dll /mnt/c/WINDOWS/System32/
28 | #cp $PWD/vcruntime140.dll /mnt/c/WINDOWS/System32/
29 | #cp $PWD/vcruntime140d.dll /mnt/c/WINDOWS/System32/
30 |
31 | /mnt/c/WINDOWS/System32/cmd.exe /c msiexec /quiet /x "{C22F729F-7FBB-4556-B706-359E1D890722}"
32 | sleep 1
33 | /mnt/c/WINDOWS/System32/cmd.exe /c "cd $wintemp & $wintemp\\ISwitch.msi" TARGETDIR="$ISWITCHDIR"
34 | /mnt/c/WINDOWS/System32/cmd.exe /c "cd $wintemp & $wintemp\\cygwin-install.bat" "$CYGWINDIR"
35 |
36 | #-------------------
37 | chmod +x createln.sh
38 | chmod +x wupdatee.sh
39 | . ./createln.sh
40 | #-------------------
41 | /mnt/c/WINDOWS/System32/cmd.exe /c "taskkill /F /IM ISwitch.exe" > /dev/null 2>&1
42 |
43 | INCLUDENumber=`grep -i "setguienv" ~/.bashrc|wc -l`
44 | if [ $INCLUDENumber -le 0 ];then
45 | echo 'if [ ! -n "$SSH_CLIENT" ];then' >> ~/.bashrc
46 | echo 'if [ ! -n "$XRDP_SOCKET_PATH" ];then' >> ~/.bashrc
47 | echo '. /usr/bin/setguienv' >> ~/.bashrc
48 | echo 'fi' >> ~/.bashrc
49 | echo 'fi' >> ~/.bashrc
50 | fi
51 |
52 | #-------------------
53 |
54 |
55 |
--------------------------------------------------------------------------------
/install_docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | apt remove docker docker-engine docker.io containerd runc
3 | apt install --no-install-recommends apt-transport-https ca-certificates curl gnupg2
4 | apt install docker-ce docker-ce-cli containerd.io
5 | DOCKER_DIR=/mnt/wsl/shared-docker
6 | mkdir -pm o=,ug=rwx "$DOCKER_DIR"
7 | echo "{\"hosts\": [\"unix:///mnt/wsl/shared-docker/docker.sock\"],\"iptables\": false}">/etc/docker/daemon.json
8 | dockerd
9 | docker -H unix:///mnt/wsl/shared-docker/docker.sock run --rm hello-world
10 |
--------------------------------------------------------------------------------
/logo.txt:
--------------------------------------------------------------------------------
1 |
2 | := .#. .*
3 | :=-:. :.:== :=+==
4 | :+=:. .=-=-:=. .:-=:
5 | =: =--..----: :-.
6 | ==-. .==:.:--==+-+- :--=.
7 | - :. :==.:-:=+==++.=*=: :-:
8 | -*=: :--#=-=-=++=-+*=:=+++: ---.
9 | . -*+**=:=*:=:**:*+====*== .---
10 | =- -*+****+::-%+=+#***###*+*- .:-=
11 | :== .=*#*+++***#*+%##**++**#%#* :-.
12 | .--= **#**#**=+=+***##%%@%##*#*. -=-
13 | .-. +++#*+=-:=+=##%#*+-*%%##%* .==
14 | -==. ==**=--..:-+##*+++==#@*#%= :-:
15 | :-: :*#***=*+-=##*######***#*+%%+
16 | .-=: +#*=*==*==#%*+@+:**#+*#+#%%- :=:.
17 | :-- :+==+:..:=+==#*+#*=+#+#*: .--=
18 | :-. :=-+=:...-++=+#*#**#+ -==
19 | . - =##**#*##%%%%%#@#: .-=.
20 | . +%#%#*%%%@@@@= . =
21 | :=:- ..-#@%@%%@@@@%**=. .==
22 | .=== .-====+*##=#%#%%@@%***--- .:=:
23 | .:==: :=-=+:*@*::*@@%@@++*#*+++=*. .--:
24 | . ==-=-#@#+***###@@@###%*=*+=- -:
25 | =-+%%%@%##**##%@@@@@@@@%-=++
26 | :*%*=++--+-*%@%@%%###@@%#@#++=
27 | =@*++++=+%@@@@@@@@@@@@@%@%##%#:
28 | *####*##%@@%#*#%#%%@%%%#+=*=
29 | :+%@@@@@@@@%%@%###%##*+--+=
30 | ..:::.-.:.::::.....:.:.:::::::--:--:--:--::-=-=--:--:---=-=-=+====
31 | :*#***###*##*#%%%*##%%%%@@%@%*%%@%@%%%%@%@@%##%%##+++=============-
32 | .:=*#%@@@++**++#***##%--+**+++*#@%%%%@@@@@@@@@%*+:.
33 | :-*@%+=*+=***+=-=*-----==#%*+#@%%%+++++**##%%###++##+==*.
34 | +*++******+**#+#*+#***++##+*%*+**+=+++***##+#%+****%%%*#*==+
35 | .+@@%##*#*#***+*+++=++=*#**=*#*%##@@#%@*#@##@*#%*%#*+###%@@=
36 | .-*%%@@@@@@@@%@@##*+****+#%%%#%%@%%@%@@@%@@@@@@@@@@@@@%*:
37 | ...---=+*#*-=*%%*=+*%%#@%#%%%###*##*#*++=+==:.
38 | -+#%+%@#@@-+@@*.
39 | =%%%%#. :*%@%#*.
40 | ==+- .-==:
41 |
42 |
--------------------------------------------------------------------------------
/mklnk.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/mklnk.exe
--------------------------------------------------------------------------------
/mysystemd.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | #export WAYLAND_DISPLAY=wayland-0
3 | #export DISPLAY=:0
4 |
5 | SYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --unit=basic.target' | grep -v unshare|grep -v grep | awk '{print $2}')
6 | if [ -z "$SYSTEMD_PID" ]; then
7 | #sudo /usr/bin/daemonize env -i /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --unit=multi-user.target /lib/systemd/systemd --user
8 | sudo env -i /usr/bin/unshare --fork --mount-proc --pid --propagation unchanged -- sh -c "exec /lib/systemd/systemd --unit=basic.target" &
9 | sleep 3
10 | SYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --unit=basic.target' | grep -v unshare|grep -v grep | awk '{print $2}')
11 | fi
12 | if [ -n "$SYSTEMD_PID" ] && [ "$SYSTEMD_PID" != "1" ]; then
13 | sudo /usr/bin/nsenter -t $SYSTEMD_PID -m -p su - $LOGNAME
14 | sleep 2
15 | fi
16 |
--------------------------------------------------------------------------------
/restartudev.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | service udev restart
3 | udevadm control --reload-rules
4 | udevadm trigger
5 |
--------------------------------------------------------------------------------
/runv4tov4.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | export localhost_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d addr:`
3 | echo $localhost_ip
4 | /mnt/c/WINDOWS/System32/cmd.exe /c "netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=$localhost_ip" > /dev/null 2>&1 &
5 |
--------------------------------------------------------------------------------
/setguienv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function init_info(){
4 | echo "***************************************"
5 | echo X environment initializing
6 | }
7 | function ready_info(){
8 | echo X environment is ready
9 | echo "***************************************"
10 | }
11 |
12 | if [ -n "$WAYLAND_DISPLAY" ] ; then
13 | echo "***************************************"
14 | echo "Currently running in WAYLAND mode."
15 | echo "***************************************"
16 | . /usr/bin/setwslgenv
17 | return
18 | fi
19 |
20 | init_info
21 | . /usr/bin/cygwinXenv
22 | #mkdir -p "$HOME"/.local/share/keyrings
23 | export DONT_PROMPT_WSL_INSTALL=1
24 | alias gedit='dbus-launch gedit'
25 | #alias docker='docker -H unix:///mnt/wsl/shared-docker/docker.sock'
26 | alias code='dbus-launch /usr/bin/code --user-data-dir=$HOME/.vscode --no-sandbox'
27 | alias jupyter-lab='jupyter-lab --ip=0.0.0.0 --allow-root'
28 | alias reboot='sudo /usr/bin/reboot'
29 |
30 | export JAVA_HOME=/usr/lib/jvm/jdk
31 |
32 | LANG=zh_CN.UTF-8
33 | LANGUAGE=
34 | LC_CTYPE="zh_CN.UTF-8"
35 | LC_NUMERIC="zh_CN.UTF-8"
36 | LC_TIME="zh_CN.UTF-8"
37 | LC_COLLATE="zh_CN.UTF-8"
38 | LC_MONETARY="zh_CN.UTF-8"
39 | LC_MESSAGES="zh_CN.UTF-8"
40 | LC_PAPER="zh_CN.UTF-8"
41 | LC_NAME="zh_CN.UTF-8"
42 | LC_ADDRESS="zh_CN.UTF-8"
43 | LC_TELEPHONE="zh_CN.UTF-8"
44 | LC_MEASUREMENT="zh_CN.UTF-8"
45 | LC_IDENTIFICATION="zh_CN.UTF-8"
46 | LC_ALL="zh_CN.UTF-8"
47 |
48 | export HOSTIP=$(ip route | awk '/^default/{print $3; exit}')
49 | local_ip=`/sbin/ifconfig -a|grep eth0 -A 1| grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
50 | HOSTIPC=`/mnt/c/Windows/System32/ipconfig.exe|iconv -f gbk -t utf-8|grep -E "Default Gateway|默认网关"|grep $HOSTIP|wc -l`
51 | export DISPLAY=$HOSTIP:0.0
52 | export PULSE_SERVER=tcp:$HOSTIP
53 | if [ $HOSTIPC -gt 0 ];then
54 | export HOSTIP=$local_ip
55 | export DISPLAY=127.0.0.1:0.0
56 | export PULSE_SERVER=tcp:127.0.0.1
57 | fi
58 |
59 | #. /usr/bin/setresolv.sh
60 | cd ~
61 | export DONT_PROMPT_WSL_INSTALL=1
62 |
63 | export LIBGL_ALWAYS_INDIRECT=
64 | export LIBGL_ALWAYS_SOFTWARE=1
65 | #export GALLIUM_DRIVER=softpipe
66 | #export GALLIUM_DRIVER=llvmpipe
67 | #export GALLIUM_DRIVER=swr
68 |
69 | #export GTK_THEME="WhiteSur-dark-solid"
70 | #export GDK_THEME="WhiteSur-dark-solid"
71 | export XDG_SESSION_TYPE="x11"
72 |
73 | ProcNumber=`ps -ef|grep gnome-session-binary |grep -v grep|wc -l`
74 | if [ $ProcNumber -gt 0 ]; then
75 | export GDK_DPI_SCALE=1.75
76 | export QT_SCALE_FACTOR=1.75
77 | else
78 | export GDK_DPI_SCALE=1.75
79 | export QT_SCALE_FACTOR=1.75
80 | fi
81 |
82 | if [ "x$XDG_CURRENT_DESKTOP" != "x" ];then
83 | export GDK_DPI_SCALE=1
84 | export QT_SCALE_FACTOR=1
85 | fi
86 | #export GDK_SCALE=1
87 | #export GDK_DPI_SCALE=1
88 | #export ELM_SCALE=2
89 | #export QT_SCALE_FACTOR=1
90 | export QT_FONT_DPI=98
91 | #export QT_STYLE_OVERRIDE=adwaita
92 | export QT_QPA_PLATFORMTHEME=gtk2
93 | export DESKTOP_SESSION=gnome
94 |
95 | export XDG_RUNTIME_DIR=/run/user/`id -u`/
96 | export RUNLEVEL=3
97 |
98 | #GDK_SYNCHRONIZE
99 | #GDK_CORE_DEVICE_EVENTS
100 |
101 | #GTK_PATH
102 | #GDK_DEBUG
103 | #GTK_EXE_PREFIX
104 | #GTK_DATA_PREFIX
105 | #export GTK_THEME=Adwaita-dark
106 | #export GTK_CURSOR_SIZE=48
107 | #export GTK_THEME=Greybird-dark
108 | #export HOSTIP=`nslookup w541|sed -n "1, 1p"|awk '{print $2}'`
109 |
110 | #DESKTOP_STARTUP_ID
111 | #XDG_DATA_HOME
112 | #XDG_DATA_DIRS
113 | #GTK_OVERLAY_SCROLLING
114 | #GTK_CSD
115 | #GDK_BACKEND
116 | #GDK_RENDERING
117 | #GDK_PIXBUF_MODULE_FILE
118 |
119 | export NO_AT_BRIDGE=1
120 | #export GTK_IM_MODULE=ibus
121 | #export GTK_IM_MODULE_FILE
122 | #export XMODIFIERS=@im=ibus
123 | #export QT_IM_MODULE=ibus
124 | #export XIM_PROGRAM="ibus-daemon"
125 |
126 | export LC_CTYPE=zh_CN.UTF-8
127 | export XMODIFIERS=@im=fcitx
128 | export GTK_IM_MODULE=fcitx
129 | export QT_IM_MODULE=fcitx
130 |
131 | #eval $(/usr/bin/gnome-keyring-daemon --start)
132 | #export SSH_AUTH_SOCK
133 | #mkdir -p "$HOME"/.local/share/keyrings
134 | #update-binfmts --disable cli > /dev/null 2>&1 &
135 | ######################################################
136 | ProcNumber=`ps -ef|grep fcitx |grep -v grep|wc -l`
137 | if [ $ProcNumber -gt 0 ]; then
138 | /usr/bin/wslfcitx reload
139 | ready_info
140 | return
141 | fi
142 | #echo "----->$ProcNumber"
143 | SYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target' | grep -v unshare|grep -v grep | awk '{print $2}')
144 | if [ -n "$SYSTEMD_PID" ] && [ "$SYSTEMD_PID" == "1" ]; then
145 | echo "SYSTEMD_PID = $SYSTEMD_PID"
146 | export GDK_SCALE=1
147 | export GDK_DPI_SCALE=1
148 | ready_info
149 | return
150 | fi
151 |
152 | local_hostname=`hostname`
153 | /mnt/c/WINDOWS/System32/cmd.exe /C setx WSLHOSTIP $local_ip > /dev/null 2>&1 &
154 |
155 |
156 | #update Windows C:\Windows\System32\drivers\etc\hosts hostname
157 | #Modify permissions of hosts file runas /user:Administrator C:\WINDOWS\System32\cacls.exe C:\WINDOWS\System32\drivers\etc\hosts /t /e /c /g users:f
158 | /mnt/c/WINDOWS/System32/cacls.exe "C:\\WINDOWS\\System32\\drivers\\etc\\hosts" /t /e /c /g users:f > /dev/null 2>&1
159 | cp "/mnt/c/WINDOWS/System32/drivers/etc/hosts" ~/hosts
160 | sed -i "/ wslhost/d" ~/hosts > /dev/null 2>&1
161 | echo "$local_ip wslhost " >>~/hosts 2>/dev/null
162 | cp ~/hosts /mnt/c/WINDOWS/System32/drivers/etc/hosts
163 |
164 | # /usr/bin/wslfcitx
165 |
166 | /usr/bin/startXServer
167 | /usr/bin/wslfcitx reload
168 | ready_info
169 |
--------------------------------------------------------------------------------
/setproxy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | export HOSTIP=$(ip route | awk '/^default/{print $3; exit}')
3 | local_ip=`/sbin/ifconfig -a|grep eth0 -A 1| grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
4 | HOSTIPC=`/mnt/c/Windows/System32/ipconfig.exe|iconv -f gbk -t utf-8|grep -E "Default Gateway|默认网关"|grep $HOSTIP|wc -l`
5 | export HTTPPROXY=http://$HOSTIP:1080
6 | if [ "$HOSTIPC" -gt "0" ];then
7 | #echo "HOSTIP : $HOSTIP ,local_ip: $local_ip"
8 | export HOSTIP=$local_ip
9 | export HTTPPROXY=http://127.0.0.1:1080
10 | fi
11 | #export DISPLAY=$HOSTIP:0.0
12 | #export PULSE_SERVER=tcp:$HOSTIP
13 |
14 | npm config set proxy $HTTPPROXY
15 | npm config set https-proxy $HTTPPROXY
16 | git config --global http.proxy $HTTPPROXY
17 | git config --global https.proxy $HTTPPROXY
18 | export https_proxy=$HTTPPROXY
19 | export http_proxy=$HTTPPROXY
20 | export ftp_proxy=$HTTPPROXY
21 | export use_proxy=on
22 |
23 | export HTTPS_PROXY=$HTTPPROXY
24 | export HTTP_PROXY=$HTTPPROXY
25 | export FTP_PROXY=$HTTPPROXY
26 | export USE_PROXY=on
27 |
28 | #export wait=15
29 | gsettings set org.gnome.system.proxy.http host http://$HOSTIP >/dev/null 2>&1
30 | gsettings set org.gnome.system.proxy.http port 1080 >/dev/null 2>&1
31 | gsettings set org.gnome.system.proxy.https host http://$HOSTIP >/dev/null 2>&1
32 | gsettings set org.gnome.system.proxy.https port 1080 >/dev/null 2>&1
33 | gsettings set org.gnome.system.proxy.ftp host http://$HOSTIP >/dev/null 2>&1
34 | gsettings set org.gnome.system.proxy.ftp port 1080 >/dev/null 2>&1
35 |
--------------------------------------------------------------------------------
/setresolv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo "nameserver 192.168.0.2">/etc/resolv.conf
3 | echo "nameserver 61.128.128.68">>/etc/resolv.conf
4 | echo "nameserver 61.128.192.68">>/etc/resolv.conf
5 | echo "nameserver 114.114.114.114">> /etc/resolv.conf
6 | echo "nameserver 8.8.8.8">>/etc/resolv.conf
7 | chmod 666 /etc/resolv.conf
8 |
--------------------------------------------------------------------------------
/setwsl2bridge.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ###############################################
3 | # 设置 WSL2 网络为桥接模式 (Default use host WLAN)
4 | # Change WSL to bridge mode (Default use host WLAN)
5 | # ###############################################
6 | /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -command "Set-VMSwitch WSL -NetAdapterName WLAN" > /dev/null 2>&1
7 | /usr/bin/ip a flush dev eth0
8 | /usr/bin/ip addr add 192.168.0.50/24 broadcast 192.168.0.255 dev eth0
9 | /usr/bin/ip r add default via 192.168.0.2
10 |
--------------------------------------------------------------------------------
/setwslgenv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #export XMODIFIERS=@im=ibus
4 | #export GTK_IM_MODULE=ibus
5 | #export QT_IM_MODULE=ibus
6 | #dbus-launch ibus-daemon -x -d -R
7 |
8 | wslfcitx reload
9 | export DONT_PROMPT_WSL_INSTALL=1
10 | alias gedit='dbus-launch gedit'
11 | #alias docker='docker -H unix:///mnt/wsl/shared-docker/docker.sock'
12 | alias code='dbus-launch /usr/bin/code --user-data-dir=$HOME/.vscode --no-sandbox'
13 | alias jupyter-lab='jupyter-lab --ip=0.0.0.0 --allow-root'
14 | alias reboot='sudo /usr/bin/reboot'
15 |
16 | export JAVA_HOME=/usr/lib/jvm/jdk
17 |
18 | LANG=zh_CN.UTF-8
19 | LANGUAGE=
20 | LC_CTYPE="zh_CN.UTF-8"
21 | LC_NUMERIC="zh_CN.UTF-8"
22 | LC_TIME="zh_CN.UTF-8"
23 | LC_COLLATE="zh_CN.UTF-8"
24 | LC_MONETARY="zh_CN.UTF-8"
25 | LC_MESSAGES="zh_CN.UTF-8"
26 | LC_PAPER="zh_CN.UTF-8"
27 | LC_NAME="zh_CN.UTF-8"
28 | LC_ADDRESS="zh_CN.UTF-8"
29 | LC_TELEPHONE="zh_CN.UTF-8"
30 | LC_MEASUREMENT="zh_CN.UTF-8"
31 | LC_IDENTIFICATION="zh_CN.UTF-8"
32 | LC_ALL="zh_CN.UTF-8"
33 |
34 | export HOSTIP=$(ip route | awk '/^default/{print $3; exit}')
35 | local_ip=`/sbin/ifconfig -a|grep eth0 -A 1| grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
36 | HOSTIPC=`/mnt/c/Windows/System32/ipconfig.exe|iconv -f gbk -t utf-8|grep -E "Default Gateway|默认网关"|grep $HOSTIP|wc -l`
37 | PULSE_SERVER=tcp:$HOSTIP
38 | if [ $HOSTIPC -gt 0 ];then
39 | export HOSTIP=$local_ip
40 | export PULSE_SERVER=tcp:127.0.0.1
41 | fi
42 | export QT_FONT_DPI=98
43 | #export QT_STYLE_OVERRIDE=adwaita
44 | export QT_QPA_PLATFORMTHEME=gtk2
45 | export DESKTOP_SESSION=gnome
46 | export XDG_RUNTIME_DIR=/run/user/`id -u`/
47 |
48 | export GDK_DPI_SCALE=1.75
49 | export QT_SCALE_FACTOR=1.75
50 | export GDK_SCALE=1.75
51 |
--------------------------------------------------------------------------------
/shutdown.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo "--------------WSL Shutdown----------------"
3 | mkdir /opt/WSL/Shutdown
4 |
5 |
--------------------------------------------------------------------------------
/slogo.txt:
--------------------------------------------------------------------------------
1 | . : .
2 | ::. :=- :=-
3 | :- .-:---: ...
4 | .-. .=--=+====: ::
5 | . -**===++*+*+- ::
6 | .= +***+**#####* ::
7 | :: =*+-:=#*++%#* ::
8 | :: =#++=*##*****%: .
9 | .: .==::-++***+ :-
10 | . -*##%@%#: -
11 | .-. .::*%#%@%*+:. .-
12 | :: .==*#=#%@##*++. -.
13 | -**#+*#%%%%@#+=
14 | -***#@@%%%@%%**
15 | ..........=*****++++=-=.:::::-::
16 | ---=*#%#**##%#+###%@%%@%%#+-:::::
17 | .=**++**+++=+*#*#*+**###**#**-.
18 | =#%%%%%##++*+*##%%%%%%%%%%%%#.
19 | ..:+**%#+%*==-----:::.
20 | =*= :+*:
21 |
22 |
--------------------------------------------------------------------------------
/start-xfce4-2:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export GDK_SCALE=1
4 | export GDK_DPI_SCALE=1
5 | dbus-launch /usr/bin/xfce4-session
6 | dbus-send --type=signal /org/gnome/SessionManager org.gnome.SessionManager.CustomSignal string:"gnomelogout"
7 | echo "-------------XFCE4 Logout-----------------"
8 | #/usr/bin/gnomelogout
9 |
--------------------------------------------------------------------------------
/start-xfce4-panel.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | xfce4-panel --sm-client-disable --disable-wm-check >/dev/null 2>&1 &
3 |
4 |
--------------------------------------------------------------------------------
/start-xfce4.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | update-binfmts --disable cli
3 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n9 > /dev/null 2>&1 &
4 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n1 > /dev/null 2>&1 &
5 | sleep 5
6 | /usr/bin/fcitx -d -r >/dev/null 2>&1 &
7 | export GDK_SCALE=1
8 | export GDK_DPI_SCALE=1
9 | /usr/bin/start-xfce4-2 > /dev/null 2>&1 &
10 | sleep 2
11 | #echo "--------gnome logout"
12 | /usr/bin/gnomelogout >/dev/null 2>&1 &
13 |
--------------------------------------------------------------------------------
/startXServer.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd /mnt/c
3 | arg="0"
4 | PROC_NAME=XWin
5 | ProcNumber=`/mnt/c/WINDOWS/System32/cmd.exe /c tasklist 2>/dev/null |grep -w $PROC_NAME|grep -v grep|wc -l`
6 | if [ $ProcNumber -le 0 ] || [ "x$1" = "xrestart" ];then
7 | if [ "x$2" = "x1" ];then
8 | arg="1"
9 | fi
10 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n9 > /dev/null 2>&1 &
11 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n$arg > /dev/null 2>&1 &
12 | /usr/bin/sleep 4s
13 | /usr/bin/xfsettingsd --disable-wm-check --daemon --replace > /dev/null 2>&1 &
14 | #/usr/bin/sleep 6s
15 | fi
16 | cd $HOME
17 |
--------------------------------------------------------------------------------
/startgnome.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | dbus-launch /usr/bin/gnome-session
3 | dbus-send --type=signal /org/gnome/SessionManager org.gnome.SessionManager.CustomSignal string:"gnomelogout"
4 | echo "-------------GNOME Logout-----------------"
5 | #/usr/bin/gnomelogout
6 |
--------------------------------------------------------------------------------
/startgnome2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd /mnt/c
3 | #export WAYLAND_DISPLAY=wayland-0
4 | #export DISPLAY=:0
5 | #update-binfmts --disable cli
6 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n9 > /dev/null 2>&1 &
7 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n1 > /dev/null 2>&1 &
8 | sleep 5
9 | /usr/bin/fcitx -d -r >/dev/null 2>&1 &
10 | export GDK_SCALE=1.75
11 | export GDK_DPI_SCALE=1.75
12 | /usr/bin/wslfcitx reload
13 | #dbus-launch /usr/bin/gnome-session &
14 | #>/dev/null 2>&1 &
15 | #/usr/bin/gnome-session --debug &
16 | #>/dev/null 2>&1 &
17 | cd $HOME
18 | sudo -E su $USER -c '/usr/bin/startgnome &'
19 | #sudo -E su $USER -c '/usr/bin/gnome-session &'
20 | sleep 2
21 | #echo "--------gnome logout"
22 | /usr/bin/gnomelogout >/dev/null 2>&1 &
23 |
--------------------------------------------------------------------------------
/startgnome3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | /usr/bin/gnome-session >/dev/null 2>&1 &
3 |
--------------------------------------------------------------------------------
/startjupyter-lab.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd ~/Jupyter
3 | PROC_NAME=jupyter-lab
4 | ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l`
5 | #echo $ProcNumber
6 | if [ $ProcNumber -le 0 ];then
7 | echo "--->run jupyter-lab<---"
8 | /usr/local/bin/jupyter-lab --ip=0.0.0.0 --allow-root --autoreload > /dev/null 2>&1 &
9 | fi
10 | export localhost_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d addr:`
11 | echo $localhost_ip
12 | /mnt/c/WINDOWS/System32/cmd.exe /c "netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=$localhost_ip" > /dev/null 2>&1 &
13 |
--------------------------------------------------------------------------------
/startplasma.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | update-binfmts --disable cli
3 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -n9 > /dev/null 2>&1 &
4 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -n1 > /dev/null 2>&1 &
5 | sleep 5
6 |
7 | export DONT_PROMPT_WSL_INSTALL=1
8 | export LANG=zh_CN.UTF-8
9 | export LC_ALL=zh_CN.UTF-8
10 | export LC_LANG=zh_CN.UTF-8
11 |
12 | export LIBGL_ALWAYS_INDIRECT=
13 | export GDK_THEME=
14 | export XDG_SESSION_TYPE="x11"
15 | export GDK_SCALE=1
16 | export GDK_DPI_SCALE=1
17 | export ELM_SCALE=1
18 | export QT_SCALE_FACTOR=1.2
19 | export QT_FONT_DPI=144
20 | #export QT_STYLE_OVERRIDE=adwaita
21 | export QT_QPA_PLATFORMTHEME=gtk4
22 | export DESKTOP_SESSION=gnome
23 |
24 | /usr/bin/plasma_session >/dev/null 2>&1 &
25 |
--------------------------------------------------------------------------------
/startsshd:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PROC_NAME=sshd
3 | ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l`
4 | #echo $ProcNumber
5 | if [ $ProcNumber -le 0 ];then
6 | echo "--->run sshd<---"
7 | export localhost_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d addr:`
8 | echo $localhost_ip
9 | # /mnt/c/WINDOWS/System32/cmd.exe /c "netsh interface portproxy add v4tov4 listenport=22 listenaddress=0.0.0.0 connectport=22 connectaddress=$localhost_ip" > /dev/null 2>&1 &
10 | /usr/bin/mkdir /run/sshd > /dev/null 2>&1
11 | /usr/sbin/sshd -D
12 | #-D > /dev/null 2>&1 &
13 | fi
14 | export localhost_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d addr:`
15 | /mnt/c/WINDOWS/System32/cmd.exe /c "netsh interface portproxy add v4tov4 listenport=22 listenaddress=0.0.0.0 connectport=22 connectaddress=$localhost_ip" > /dev/null 2>&1 &
16 |
--------------------------------------------------------------------------------
/startwslX.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | arg='0'
3 | if [ "x$1" = "x1" ];then
4 | arg='1'
5 | fi
6 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n9 > /dev/null 2>&1 &
7 | /usr/bin/cygXS -c "$CYGWINDIR" -i "$ISWITCHDIR" -p2 -n$arg > /dev/null 2>&1 &
8 | /usr/bin/sleep 3
9 | #/usr/bin/wslpanel
10 |
--------------------------------------------------------------------------------
/temp:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | wintemp=`/mnt/c/WINDOWS/System32/cmd.exe /c "echo %TEMP%" 2>/dev/null|head -n 1 |tail -n 1`
4 | winwsltemp=`wslpath -u $wintemp`
5 | winwsltemp=${winwsltemp//$'\r'}
6 | winwsltemp=${winwsltemp//$'\n'}
7 |
8 | echo $winwsltemp
9 | wget -O "$winwsltemp/cygwin-setup.exe" https://cygwin.com/setup-x86_64.exe
10 | ll "$winwsltemp/cygwin-setup.exe"
11 |
--------------------------------------------------------------------------------
/ucrtbase.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/ucrtbase.dll
--------------------------------------------------------------------------------
/ucrtbased.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/ucrtbased.dll
--------------------------------------------------------------------------------
/unsetproxy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | git config --global --unset http.proxy
3 | git config --global --unset https.proxy
4 | npm config delete proxy
5 | npm config delete https-proxy
6 | export use_proxy=off
7 | export https_proxy=
8 | export http_proxy=
9 | export ftp_proxy=
10 | gsettings set org.gnome.system.proxy mode 'none'
11 | #gsettings set org.gnome.system.proxy mode 'auto'
12 |
--------------------------------------------------------------------------------
/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #-------------------
3 | sudo git config --global --add safe.directory $PWD
4 | sudo git config --global --add safe.directory $PWD/cygwin-auto-install
5 | cd cygwin-auto-install
6 | sudo git pull
7 | cd ../
8 | sudo git pull
9 | #-------------------
10 | . ./wupdatee.sh
11 | #-------------------
12 |
13 | #-------------------
14 |
15 | #-------------------
16 |
--------------------------------------------------------------------------------
/vcruntime140.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/vcruntime140.dll
--------------------------------------------------------------------------------
/vcruntime140d.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nufeng1999/WSL_GNOME/c76f5f2ec734790fd6c06bc6b2f6c0f97439b72e/vcruntime140d.dll
--------------------------------------------------------------------------------
/vscode.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | dbus-launch /usr/bin/code --user-data-dir --no-sandbox $1 >/dev/null 2>&1 &
3 |
--------------------------------------------------------------------------------
/wslfcitx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PROC_NAME=fcitx
4 | ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l`
5 | if [ $ProcNumber -le 0 ] || [ "x$1" = "xreload" ];then
6 | if [ $ProcNumber -gt 0 ];then
7 | ProcNumber1=`ps -ef |grep -w $PROC_NAME|grep $USER |grep -v grep|wc -l`
8 | if [ $ProcNumber1 -gt 0 ];then
9 | killall -9 fcitx >/dev/null
10 | else
11 | sudo killall -9 fcitx >/dev/null
12 | fi
13 | fi
14 | #echo "start fcitx..."
15 | export NO_AT_BRIDGE=1
16 | export LC_CTYPE=zh_CN.UTF-8
17 | export XMODIFIERS=@im=fcitx
18 | export GTK_IM_MODULE=fcitx
19 | export QT_IM_MODULE=fcitx
20 | cd ~
21 | /usr/bin/dbus-launch /usr/bin/fcitx -d -r --enable fcitx-qimpanel >/dev/null 2>&1 &
22 | fi
23 |
--------------------------------------------------------------------------------
/wslibus.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | export DISPLAY=127.0.0.1:0.0
3 | export NO_AT_BRIDGE=1
4 | export LC_CTYPE=zh_CN.UTF-8
5 | export XMODIFIERS=@im=ibus
6 | export GTK_IM_MODULE=ibus
7 | export QT_IM_MODULE=ibus
8 | cd /mnt/h/ISwitch
9 | ./ISwitch.exe &
10 | cd
11 | ibus-daemon --address='tcp:host=localhost,port=0' -d -r -x -R 2>/dev/null &
12 |
--------------------------------------------------------------------------------
/wslpanel.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #/usr/bin/wslfcitx
3 | /usr/bin/xfce4-panel > /dev/null 2>&1 &
4 |
--------------------------------------------------------------------------------
/wslstartxfce4.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #/usr/bin/wslfcitx
3 | export PULSE_SERVER=tcp:$HOSTIP
4 | export NO_AT_BRIDGE=1
5 | export LC_CTYPE=zh_CN.UTF-8
6 | #设置输入法
7 | export XMODIFIERS=@im=fcitx
8 | export GTK_IM_MODULE=fcitx
9 | export QT_IM_MODULE=fcitx
10 |
11 | export LIBGL_ALWAYS_SOFTWARE=1
12 | export LIBGL_ALWAYS_INDIRECT=1
13 | #cd /mnt/h/ISwitch
14 | #./ISwitch.exe -c -w &
15 | cd
16 | #启动输入法
17 | #/usr/bin/fcitx -d -r 2>/dev/null &
18 | #启动桌面环境
19 | /usr/bin/startxfce4 >/dev/null 2>&1 &
20 |
--------------------------------------------------------------------------------
/wslterminator.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | /usr/bin/gnome-terminal 2>/dev/null &
3 |
--------------------------------------------------------------------------------
/wupdatee.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ##update
3 |
4 | . ./createln.sh
5 |
6 | /opt/WSL/WSL_GNOME/cwinlnk.sh /usr/share/applications/org.gnome.gedit.desktop
7 | /opt/WSL/WSL_GNOME/cwinlnk.sh /usr/share/applications/htop.desktop HTOP "dbus-launch gnome-terminal -- "
8 | /opt/WSL/WSL_GNOME/cwinlnk.sh /usr/share/applications/org.gnome.Terminal.desktop Terminal dbus-launch
9 | /opt/WSL/WSL_GNOME/cwinlnk.sh /usr/share/applications/thunar.desktop thunar dbus-launch
10 |
11 |
--------------------------------------------------------------------------------