├── LICENSE ├── README.md ├── base-config.sh ├── base-remove.sh ├── changelog.sh ├── changelog.txt ├── config.sh ├── debian-config.sh ├── debian-qq ├── install.sh ├── package.sh └── remove.sh ├── deepin-config.sh ├── deepin-qq ├── install.sh ├── package.sh └── remove.sh ├── install.sh ├── nspawn-debian.sh ├── nspawn-deepin.sh ├── polkit.sh ├── remove-debian.sh ├── remove-deepin.sh ├── remove.sh ├── user-dirs.sh ├── xnoshm.c └── xnoshm.sh /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nspawn-qq 2 | 3 | #### 介绍 4 | 利用systemd-nspawn容器跑Deepin 20.5或者Debian 11,安装deepinwine,稳定运行QQ、TIM、微信、深度商店等应用。低内存,高性能,沙盒机制不污染宿主机,支持多用户,可在任何以systemd为init的Linux发行版上运行。 5 | 6 |

技术支持QQ群:19346666、111601117

7 |

技术支持钉钉群:35948877

8 | TIM下载deepin-tim包。解决微信输入框乱码,执行:deepin-config-weixin,Windows版本选择"Windows 10",“字体”标签页取消选择“允许加载Windows Fonts目录下的字体”。 9 | 10 | #### 软件架构 11 | 软件架构说明:amd64 12 | 13 | #### 一键安装、卸载 14 | 1. 下载成品容器压缩包,解压 15 | 2. 安装执行:install.sh 16 | 3. 卸载执行:remove.sh 17 | 18 | #### 从零开始生成容器 19 | 1. 执行:sudo ./nspawn-debian.sh 创建 Debian 容器 20 | 2. 或者:sudo ./nspawn-deepin.sh 创建 Deepin 容器 21 | 3. 也可以同时创建两个容器:sudo ./install.sh 22 | 4. 安装微信为例:deepin-install-weixin 或者 debian-install-weixin 23 | 5. 配置微信举例:deepin-config-weixin 或者 debian-config-weixin 24 | 6. 启动器中查找QQ或者微信启动,或终端启动,例如:deepin-qq 或者 debian-qq 25 | 7. 打开容器内的终端:deepin-terminal 或者 debian-terminal 26 | 27 | #### 多系统配置 28 | 1. 自动安装的容器支持多系统共享,请提前做好 ~/.machines 的软链接 29 | 2. 管理员权限执行:sudo ./debian-config.sh 或者 sudo ./deepin-config.sh 30 | 3. 可以同时配置两个容器:sudo ./config.sh 31 | 32 | #### 升级方法 33 | 1. 普通用户权限执行:deepin-update 或者 debian-update 34 | 2. 如果需要升级容器,执行:deepin-upgrade 或者 debian-upgrade 35 | 36 | #### 高级用法 37 | 1. 如果稳定性不佳,请同时禁用宿主机和容器的MIT-SHM扩展:sudo DISABLE_HOST_MITSHM=1 ./deepin-config.sh (注意:深度商店点击链接崩溃是软件不稳定,不是容器不稳定) 38 | 2. 注意:禁用宿主机MIT-SHM后,需要重启电脑才生效! 39 | 3. 可登录shell,执行:machinectl login debian,用户名u1000,密码与用户名相同。 40 | 4. 可禁止多用户模式:sudo MULTIUSER_SUPPORT=0 ./deepin-config.sh 41 | 42 | #### 软件列表 43 | 1. 以 deepin 为例罗列应用,带星号(*)的代表 debian 容器也有。 44 | 2. 非本列表的应用,需要你在商店或者终端安装,然后添加启动脚本。 45 | 3. 如遇到容器中的无法打开链接之类的问题,请为容器安装相关软件。 46 | 4. 终端中启动容器软件后,可以关闭终端窗口。 47 | 5. 为什么会包含一些原生软件:因为容器中文件关联需要,例如QQ打开链接,文件管理器编辑文档、播放视频音频、查看图片等。 48 | 49 | | 应用名称 | 安装脚本 | 启动脚本 | 50 | | :--- | :---- | :---- | 51 | | QQ* | deepin-install-qq | deepin-qq | 52 | | TIM* | deepin-install-tim | deepin-tim | 53 | | 微信* | deepin-install-weixin | deepin-weixin | 54 | | 天翼云盘* | deepin-install-ecloud | deepin-ecloud | 55 | | 终端* | deepin-install-terminal | deepin-terminal | 56 | | 文件管理器* | deepin-install-file | deepin-file | 57 | | 浏览器* | deepin-install-chromium | deepin-chromium | 58 | | LibreOffice*| deepin-install-libreoffice | deepin-libreoffice | 59 | | 媒体播放器* | deepin-install-mpv | deepin-mpv | 60 | | 图片浏览* | deepin-install-shotwell | deepin-shotwell | 61 | | PDF阅读* | deepin-install-mupdf | deepin-mupdf | 62 | | 商店 | deepin-install-app-store | deepin-app-store | 63 | | 迅雷 | deepin-install-xunlei | deepin-xunlei | 64 | | 金山词霸 | deepin-install-powerword | deepin-powerword | 65 | | 腾讯会议 | deepin-install-wemeet | deepin-wemeet | 66 | | 央视影音 | deepin-install-cbox | deepin-cbox | 67 | | 向日葵远程控制 | deepin-install-sunlogin | deepin-sunlogin | 68 | | 百度网盘 | deepin-install-baidunetdisk | deepin-baidunetdisk | 69 | | 腾讯视频 | deepin-install-tenvideo | deepin-tenvideo | 70 | | 反恐精英 | deepin-install-cstrike | deepin-cstrike | 71 | | 野狐围棋 | deepin-install-foxwq | deepin-foxwq | 72 | | 企业微信 | deepin-install-work-weixin | deepin-work-weixin | 73 | | 全民K歌 | deepin-install-wesing | deepin-wesing | 74 | | 保卫萝卜 | deepin-install-baoweiluobo | deepin-baoweiluobo | 75 | | 更多... | 欢迎... | PR... | 76 | 77 | #### 参与贡献 78 | 1. Fork 本仓库 79 | 2. 新建 Feat_xxx 分支 80 | 3. 提交代码 81 | 4. 新建 Pull Request 82 | 83 | #### 致谢 84 | Debian 容器用到了 https://deepin-wine.i-m.dev/ 的作品。 85 | 在此感谢作者为开源做出的贡献。 86 | -------------------------------------------------------------------------------- /base-config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 维护:Yuchen Deng [Zz] QQ群:19346666、111601117 3 | 4 | # 不能单独执行提醒 5 | if [[ `basename $0` == base-config.sh ]]; then 6 | echo "'`basename $0`' 命令不能单独执行" 7 | exit 1 8 | fi 9 | 10 | # 多用户支持选项:启用动态绑定 11 | [[ ! $MULTIUSER_SUPPORT ]] && MULTIUSER_SUPPORT=1 12 | 13 | # systemd 247 bug 解决方案,禁止多用户支持,去除动态绑定 14 | # 详见:https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1816433.html 15 | ## Debian 11 systemd 247.3-7中修复了这个bug,详细请看apt changelog systemd-container 16 | # 判断现在的版本的bug是否被修复 17 | [[ ! $BUG_FIXED ]] && BUG_FIXED=0 18 | 19 | if [[ $BUG_FIXED = 0 && $(systemctl --version | grep systemd) =~ '247.3-7' && $(cat /etc/issue) =~ 'Debian GNU/Linux 11' ]]; then 20 | BUG_FIXED=0 21 | fi 22 | if [[ $MULTIUSER_SUPPORT = 1 && $(systemctl --version | grep systemd) =~ 247 && $BUG_FIXED = 0 ]]; then 23 | MULTIUSER_SUPPORT=0 24 | echo -e "\033[31m当前 systemd 有bug,不支持多用户动态绑定,已强制启用单用户模式。" 25 | systemd --version | grep systemd 26 | echo -e "\033[0m" 27 | sleep 3 28 | fi 29 | 30 | # 必备软件包 31 | [ -f /usr/bin/apt ] && apt install -y systemd-container xdg-user-dirs 32 | [ -f /usr/bin/dnf ] && dnf install -y systemd-container xdg-user-dirs 33 | [ -f /usr/bin/pacman ] && pacman -S xdg-user-dirs --noconfirm --needed 34 | [ -f /usr/bin/emerge ] && emerge -u1 xdg-user-dirs 35 | if [[ `loginctl show-session $(loginctl | grep $SUDO_USER |awk '{print $ 1}') -p Type` == *x11* ]]; then 36 | [ -f /usr/bin/pacman ] && [ ! -f /usr/bin/xhost ] && pacman -S xorg-xhost --noconfirm --needed 37 | [ -f /usr/bin/apt ] && [ ! -f /usr/bin/xhost ] && apt install -y x11-xserver-utils 38 | [ -f /usr/bin/dnf ] && [ ! -f /usr/bin/xhost ] && dnf install -y xhost 39 | [ -f /usr/bin/emerge ] && [ ! -f /usr/bin/xhost ] && emerge -u1 xhost 40 | fi 41 | 42 | # 禁用SELinux 43 | if [[ -f /usr/bin/sestatus && $(sestatus |grep 'SELinux status:') == *enabled ]]; then 44 | sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux 45 | [ -f /etc/selinux/config ] && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 46 | echo -e "\033[31m已禁用SELinux!如有需要,可手动开启:sudo sed -i 's/SELINUX=disabled/SELINUX=enforcing/g' /etc/sysconfig/selinux\033[0m" 47 | setenforce 0 48 | fi 49 | 50 | # 初始化配置 51 | EXEC_FROM_CONFIG=1 source `dirname ${BASH_SOURCE[0]}`/remove-$1.sh 52 | ROOT=/var/lib/machines/$1 53 | ln -sfnv /home/$SUDO_USER/.machines/$1 $ROOT 54 | [ ! -d /usr/local/bin ] && mkdir /usr/local/bin 55 | 56 | 57 | # 允许无管理员权限启动 58 | source `dirname ${BASH_SOURCE[0]}`/polkit.sh 59 | 60 | 61 | # 获取用户目录 62 | source `dirname ${BASH_SOURCE[0]}`/user-dirs.sh 63 | 64 | 65 | # 设置容器目录权限 66 | cat > /lib/systemd/system/nspawn-$1.service < $ROOT/etc/fonts/conf.d/99-nspawn.conf < 85 | 86 | 87 | 88 | Hack 89 | Monospace 90 | en 91 | 92 | 93 | 94 | WenQuanYi Micro Hei 95 | Sans 96 | zh-cn 97 | 98 | 99 | 100 | 文泉驿微米黑 101 | Fallback 102 | enzh-cn 103 | 104 | 105 | monoMonospace 106 | sans serifSans 107 | sans-serifSans 108 | serifSans 109 | 110 | ArialSans 111 | Arial BlackSans 112 | Times New RomanSerif 113 | TimesSerif 114 | CourierMonospace 115 | Courier NewMonospace 116 | FixedMonospace 117 | UnifontMonospace 118 | 119 | DejaVu Sans MonoMonospace 120 | DejaVu SansSans 121 | DejaVu SerifSerif 122 | 123 | WenQuanYi Zen HeiSans 124 | WenQuanYi Zen Hei SharpSans 125 | WenQuanYi Zen Hei MonoSans 126 | 文泉驿正黑Sans 127 | 文泉驿点阵正黑Sans 128 | 文泉驿等宽正黑Sans 129 | 130 | Noto Sans CJK SCSans 131 | Noto Sans CJK TCSans 132 | Noto Sans CJK JPSans 133 | Noto Sans CJK KRSans 134 | Noto Serif CJK SCSans 135 | Noto Serif CJK TCSans 136 | Noto Serif CJK JPSans 137 | Noto Serif CJK KRSans 138 | Noto Sans Mono CJK SCSans 139 | Noto Sans Mono CJK TCSans 140 | Noto Sans Mono CJK JPSans 141 | Noto Sans Mono CJK KRSans 142 | 143 | Microsoft YaHeiSansSans 144 | Microsoft YaHei UISansSans 145 | 微软雅黑SansSans 146 | SimSunSerifSans 147 | NSimSunSans 148 | 新宋体Sans 149 | SimSun-ExtBSans 150 | SimSun-18030SerifSans 151 | 宋体-18030SerifSans 152 | NSimSun-18030Sans 153 | 新宋体-18030Sans 154 | 155 | 156 | Monospace 157 | Sans 158 | Serif 159 | Sans 160 | 161 | 162 | 163 | Sans 164 | Sans 165 | 166 | 167 | 168 | 169 | 170 | 171 | system-ui 172 | 173 | 174 | sans-serif 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | sans-serif 183 | 184 | 185 | Sans 186 | Fallback 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | Serif 195 | 196 | 197 | Serif 198 | Fallback 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | Monospace 207 | 208 | 209 | Monospace 210 | Fallback 211 | 212 | 213 | 214 | 215 | 216 | 103 217 | 218 | 219 | en 220 | 221 | 222 | familyMonospace 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | pixelsize10 233 | 10 234 | pixelsize 235 | 236 | 237 | 238 | 239 | true 240 | 241 | 242 | true 243 | false 244 | 245 | hintfull 246 | 247 | 248 | rgb 249 | lcddefault 250 | 251 | 252 | false 253 | 254 | 255 | false 256 | 257 | 258 | 259 | roman 260 | roman 261 | oblique 262 | 263 | 264 | matrix 265 | 266 | 10.2 267 | 01 268 | 269 | 270 | 271 | 272 | 273 | 274 | 105 275 | 105 276 | bold 277 | true 278 | 279 | 280 | 281 | 282 | 283 | pixelsize0.52 284 | pixelsize0.52 285 | 286 | 287 | 288 | 289 | 290 | true 291 | 292 | 293 | 294 | pixelsize 295 | pixelsize13.525 296 | 297 | 298 | 299 | 300 | 301 | true 302 | 303 | true 304 | 305 | pixelsize1 306 | 307 | 308 | 309 | true 310 | true 311 | 10.5 312 | 12.5 313 | 314 | 12 315 | false 316 | 80 317 | 318 | 319 | 320 | Monospace 321 | hintslight 322 | 323 | 324 | Sans 325 | 326 | 327 | 328 | pixelsize10 329 | pixelsize12 330 | 331 | hintslight 332 | hintfull 333 | 334 | 335 | 336 | 337 | Serif 338 | 10 339 | 0 340 | hintslight 341 | 342 | 343 | zhHei 344 | hintslight 345 | 346 | 347 | NotoSansKR 348 | hintslight 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | EOF 358 | 359 | 360 | # 配置容器 361 | [[ $(machinectl list) =~ $1 ]] && machinectl stop $1 && sleep 1 362 | systemctl start systemd-resolved 363 | resolvectl | grep "Current DNS Server" | cut -d ':' -f 2 | xargs echo "nameserver" > $ROOT/etc/resolv.conf 364 | cat > $ROOT/config.sh < /etc/hostname 370 | rm -f /var/lib/dpkg/lock 371 | rm -f /var/lib/dpkg/lock-frontend 372 | rm -f /var/cache/apt/archives/lock 373 | dpkg --configure -a 374 | apt install -f 375 | apt update 376 | apt purge --yes less:amd64 377 | if [ -z $(which less) ]; then 378 | dpkg --add-architecture i386 379 | apt update 380 | fi 381 | apt install --yes --no-install-recommends apt-utils systemd-container 382 | apt install --yes --no-install-recommends sudo procps pulseaudio libpam-systemd locales xdg-utils dbus-x11 dex bash-completion neofetch nano x11-xserver-utils dialog 383 | apt install --yes --no-install-recommends fonts-hack fonts-wqy-microhei 384 | [ "$1" = "deepin" ] && apt install --yes --no-install-recommends gpg deepin-desktop-base 385 | apt install --yes --no-install-recommends less:i386 386 | echo -e "127.1 $1\n::1 $1" > /etc/hosts 387 | sed -i 's/# en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen 388 | sed -i 's/# zh_CN.UTF-8/zh_CN.UTF-8/g' /etc/locale.gen 389 | locale-gen 390 | locale 391 | $(echo -e "$SOURCES_LIST") 392 | [[ ! -f /etc/securetty || ! \$(cat /etc/securetty | grep pts/0) ]] && echo -e "\n# systemd-container\npts/0\npts/1\npts/2\npts/3\npts/4\npts/5\npts/6" >> /etc/securetty 393 | [[ ! \$(cat /etc/securetty | grep pts/9) ]] && echo -e "pts/7\npts/8\npts/9" >> /etc/securetty 394 | [[ \$(cat /etc/passwd | grep user:) ]] && userdel -r user 395 | for i in {1000..1005}; do 396 | [[ ! \$(cat /etc/passwd | grep u\$i:) ]] && useradd -u \$i -m -s /bin/bash -G sudo u\$i 397 | echo u\$i:u\$i | chpasswd 398 | cd /home/u\$i/ 399 | mkdir -p .local/share/fonts .config .cache $USER_DOCUMENTS $USER_DOWNLOAD $USER_DESKTOP $USER_PICTURES $USER_VIDEOS $USER_MUSIC $USER_CLOUDDISK 400 | chown -R u\$i:u\$i .local .config .cache $USER_DOCUMENTS $USER_DOWNLOAD $USER_DESKTOP $USER_PICTURES $USER_VIDEOS $USER_MUSIC $USER_CLOUDDISK 401 | done 402 | for i in {1000..1005}; do 403 | echo u\$i:u\$i | chpasswd 404 | [[ ! \$(groups u\$i | grep audio) ]] && usermod -aG audio u\$i 405 | [[ ! \$(groups u\$i | grep video) ]] && usermod -aG video u\$i 406 | [[ ! \$(groups u\$i | grep plugdev) ]] && usermod -aG plugdev u\$i 407 | echo -e "Xft.dpi: 103\nXft.lcdfilter: lcddefault\nXft.antialias: true\nXft.autohint: true\nXft.hinting: true\nXft.hintstyle: hintfull\nXft.rgba: rgb" > /home/u\$i/.Xresources 408 | [[ -z "\$(grep .Xresources /home/u\$i/.bashrc)" ]] && echo '[ -n "\$DISPLAY" ] && xrdb -merge ~/.Xresources' >> /home/u\$i/.bashrc 409 | [[ -z "\$(grep .Xresources /home/u\$i/.profile)" ]] && echo '[ -n "\$DISPLAY" ] && xrdb -merge ~/.Xresources' >> /home/u\$i/.profile 410 | [[ -z "\$(grep neofetch /home/u\$i/.bashrc)" ]] && echo '[ -n "\$DISPLAY" ] && neofetch' >> /home/u\$i/.bashrc 411 | cat /home/u\$i/.Xresources 412 | done 413 | # No password for sudo 414 | sed -i "s/.*sudo.*ALL=(ALL:ALL) ALL/%sudo ALL=(ALL) NOPASSWD:ALL/" /etc/sudoers 415 | # 移除奇怪的软链接 416 | [ -L /bin/X11 ] && /bin/unlink /bin/X11 417 | # 刷新字体缓存 418 | fc-cache -rf 419 | # 字体调试输出 420 | fc-match Monospace 421 | fc-match Sans 422 | fc-match Serif 423 | FC_DEBUG=1024 fc-match | grep Loading 424 | fc-conflist | grep + 425 | fc-match --verbose sans-serif | grep -v 00 426 | # FC_DEBUG=4 fc-match Monospace | grep -v 00 > log 427 | find /etc/fonts/conf.d/ -name "*.conf" | sort 428 | echo 429 | echo fc-match --sort 'serif:lang=zh-cn' ...... 430 | fc-match --sort 'serif:lang=zh-cn' 431 | echo 432 | echo fc-match --sort 'monospace:lang=zh-cn' ...... 433 | fc-match --sort 'monospace:lang=zh-cn' 434 | echo 435 | echo fc-match --sort 'sans-serif:lang=zh-cn' ...... 436 | fc-match --sort 'sans-serif:lang=zh-cn' 437 | echo 438 | echo fc-list 439 | fc-list 440 | EOF 441 | 442 | chroot $ROOT /bin/bash /config.sh 443 | 444 | 445 | # 禁用MIT-SHM 446 | sleep 0.5 447 | source `dirname ${BASH_SOURCE[0]}`/xnoshm.sh $1 448 | 449 | 450 | #精简容器空间 451 | cat > $ROOT/clean.sh < /usr/local/bin/$1-start < /etc/systemd/system/systemd-nspawn@$1.service.d/override.conf <> /etc/systemd/system/systemd-nspawn@$1.service.d/override.conf < /etc/systemd/nspawn/$1.nspawn < /usr/local/bin/$1-config < /usr/local/bin/$1-bind < /usr/local/bin/$1-bind < /usr/local/bin/$1-query < /usr/local/bin/$1-clean < /usr/local/bin/$1-update < /usr/local/bin/$1-upgrade < /usr/local/bin/$1-install-terminal < /usr/local/bin/$1-terminal < /usr/local/bin/$1-install-qq < /usr/share/applications/deepin-qq.desktop <<$(echo EOF) 909 | [Desktop Entry] 910 | Encoding=UTF-8 911 | Type=Application 912 | Categories=Network; 913 | Icon=com.qq.im.deepin 914 | Exec=$1-qq %F 915 | Terminal=false 916 | Name=QQ 917 | Name[zh_CN]=QQ 918 | Comment=Tencent QQ Client on Deepin Wine 919 | StartupWMClass=QQ.exe 920 | MimeType= 921 | $(echo EOF)' 922 | EOF 923 | 924 | chmod 755 /usr/local/bin/$1-install-qq 925 | 926 | # 配置QQ 927 | cat > /usr/local/bin/$1-config-qq < /usr/local/bin/$1-qq < /usr/local/bin/$1-install-tim < /usr/share/applications/deepin-tim.desktop <<$(echo EOF) 962 | [Desktop Entry] 963 | Encoding=UTF-8 964 | Type=Application 965 | Categories=Network; 966 | Icon=com.qq.office.deepin 967 | Exec=$1-tim %F 968 | Terminal=false 969 | Name=TIM 970 | Name[zh_CN]=TIM 971 | Comment=Tencent TIM Client on Deepin Wine 972 | StartupWMClass=TIM.exe 973 | MimeType= 974 | $(echo EOF)' 975 | EOF 976 | 977 | chmod 755 /usr/local/bin/$1-install-tim 978 | 979 | # 配置TIM 980 | cat > /usr/local/bin/$1-config-tim < /usr/local/bin/$1-tim < /usr/local/bin/$1-install-weixin < /usr/share/applications/deepin-weixin.desktop <<$(echo EOF) 1015 | [Desktop Entry] 1016 | Encoding=UTF-8 1017 | Type=Application 1018 | X-Created-By=Deepin WINE Team 1019 | Categories=Network; 1020 | Icon=com.qq.weixin.deepin 1021 | Exec=$1-weixin %F 1022 | Terminal=false 1023 | Name=WeChat 1024 | Name[zh_CN]=微信 1025 | Comment=Tencent WeChat Client on Deepin Wine 1026 | StartupWMClass=WeChat.exe 1027 | MimeType= 1028 | $(echo EOF)' 1029 | EOF 1030 | 1031 | chmod 755 /usr/local/bin/$1-install-weixin 1032 | 1033 | # 配置微信 1034 | cat > /usr/local/bin/$1-config-weixin < /usr/local/bin/$1-weixin < /usr/local/bin/$1-install-ecloud < /usr/share/applications/deepin-ecloud.desktop <<$(echo EOF) 1075 | [Desktop Entry] 1076 | Encoding=UTF-8 1077 | Type=Application 1078 | X-Created-By=Yuchen Deng 1079 | Categories=Network; 1080 | Icon=cn.189.cloud.deepin 1081 | Exec=$1-ecloud %F 1082 | Name=eCloud 1083 | Name[zh_CN]=天翼云盘 1084 | Comment=eCloud on Deepin Wine 1085 | StartupWMClass=eCloud.exe 1086 | MimeType= 1087 | $(echo EOF)' 1088 | EOF 1089 | 1090 | chmod 755 /usr/local/bin/$1-install-ecloud 1091 | 1092 | # 配置云盘 1093 | cat > /usr/local/bin/$1-config-ecloud < /usr/local/bin/$1-ecloud < /usr/local/bin/$1-install-file < /usr/local/bin/$1-file < /usr/local/bin/$1-install-shotwell < /usr/local/bin/$1-shotwell < /usr/local/bin/$1-install-chromium < /usr/local/bin/$1-chromium < /usr/local/bin/$1-install-mupdf < /usr/local/bin/$1-install-mpv < /usr/local/bin/$1-mpv < /usr/local/bin/$1-install-libreoffice < /usr/local/bin/$1-libreoffice < changelog.txt 15 | prev=$i 16 | else 17 | cmd="git log $prev..$i --oneline" 18 | echo -e "$cmd\n$($cmd)\n\n$(cat changelog.txt)" > changelog.txt 19 | prev=$i 20 | fi 21 | sleep 0.1 22 | done 23 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | git log v3.7..v3.7.1 --oneline 2 | 339b9f4 完善图片打开方式的关联 3 | 1787bda 完善默认打开方式配置 4 | 751e5e6 微调云盘路径检测 5 | 1bb84fd 提高dpi至102.5 6 | d242e1f .profile中执行xrdb 7 | 6a0ce81 配置时执行初始化 8 | 86ae3a4 删除字体后刷新缓存 9 | 6232d20 安装时添加延时 10 | fcabdc2 添加3.7更新日志 11 | 12 | git log v3.6.1..v3.7 --oneline 13 | beefae2 完善字体配置 14 | 6abf392 修正preload查询 15 | 481448e 解决创建容器时DNS解析失败 16 | 28a712f 根据调试输出优化 17 | 621b905 增大必要的延时 18 | 908a1d9 移除调试信息输出 19 | 97d79a4 禁用--allow-change-held-packages 20 | 616a20b 安装时,立即更新 21 | dcf6ac0 完善容器字体配置 22 | 24270c3 开始自定义字体配置 23 | 860ec85 统一thunar名称为小写 24 | 3a69cba E: Unable to locate package libexo-1-0 25 | 7d9c0e3 移除Xauthority的绑定 26 | 4ccb5b6 启动终端时,自动运行neofetch 27 | fa90f5a 修复从零开始命令构建容器 28 | 2d3971d 精简xrdb需要的x11-xserver-utils包 29 | f462778 将deepin特征包放到config里 30 | e479aa5 添加v3.6.1更新日志 31 | 32 | git log v3.6..v3.6.1 --oneline 33 | 788053f 完善字体方案 34 | d21d609 避免单用户模式绑定整个用户目录 35 | 4e6f9dd 解决QQ字体虚的问题 36 | 2f348f7 Merge branch 'master' of github.com:loaden/nspawn-qq 37 | a4613c1 修复错误的用户目录绑定 38 | 5701762 完善必备软件安装 39 | a5585b0 添加v3.6更新日志 40 | 41 | git log v3.5..v3.6 --oneline 42 | aa8dfa8 默认添加wqy字体,精简noto 43 | be15b24 优化打包权限 44 | af98e90 添加nano文本编辑器 45 | 6a62ca1 完善源和系统升级 46 | 30b09e6 优化离线安装 47 | 22f5a85 安装过程添加更新 48 | 8f97221 配置时明确卸载64位less 49 | ed7785f 不再默认安装QQ 50 | 5835637 更换北外源 51 | 0bc1725 一键安装时静默清理 52 | ac1fb33 初始安装后查询安装信息 53 | 80e1a19 停止容器后延时1秒 54 | 2acb3e4 配置之前先停止容器 55 | fa9a67a home不可能是引用 56 | aa77c49 没有必要在安装时update 57 | 042664b 为find明确指定路径 58 | 6596962 安装后执行更新清理 59 | 1ead3df 绑定字体是错误的 60 | b838416 Merge branch 'master' of github.com:loaden/nspawn-qq 61 | 2390f7f 项目更名为nspawn-qq 62 | a65bed6 修正在某些系统下路径错误 63 | d3a9b73 修正一处错误判断 64 | dafef74 让宿主机和容器使用相同的字体和配置 65 | f61be7b Add fonts bind 66 | f3a4a8a Change to lxterminal 67 | 92a0da7 修正nspawn服务禁用错误 68 | b234bb8 DConf只读绑定 69 | 4e4281e 清理时清空日志 70 | 6d6d9c2 添加启动环境变量TERM=xterm-256color 71 | 9064a29 添加压缩打包脚本 72 | 922f5d3 更新日志 73 | 74 | git log v3.4..v3.5 --oneline 75 | f96a284 修正D-Bus绑定 76 | 17c29aa 必须升级到Debian 11容器了 77 | 76feeb6 添加技术支持钉钉群 78 | ceaa690 修复用户添加错误 79 | 615d9ec 取消可能不存在的绑定 80 | 4a0d893 不再创建/home/share 81 | b4197bf chroot后不再需要绝对路径 82 | e3b4579 Gentoo系统安装debootstrap 83 | 638e120 Merge branch 'master' of gitee.com:loaden/nspawn-deepinwine 84 | 7cd37fc 不再精简基本系统组件 85 | 6f82c13 Use *x11* better than *wayland* 86 | 5ec60b1 修复Wayland下绑定 87 | 6b0479f 修复参数错误 88 | bbbb122 修复Gentoo系统配置 89 | f77ebe6 修复ecloud安装失败 90 | 3fc7122 优化polkit配置 91 | 95f9ab6 默认密码与用户名相同 92 | 0e1a407 chroot后更新环境变量 93 | 5324cdb 优化调试输出日志 94 | 2729ca6 禁止开机启动 95 | afbdcaa bash使用绝对路径 96 | 2993a70 解决可能的fonts绑定失败 97 | 8fd6ce3 Merge branch 'master' of github.com:loaden/nspawn-deepinwine 98 | fca4f52 Merge branch 'stable' 99 | 4d2b086 修复eCloud卸载 100 | c08372d Merge pull request #6 from loaden/stable 101 | 61ce769 更新ChangeLog 102 | 103 | git log v3.3.3..v3.4 --oneline 104 | 79f42d5 删除钉钉和飞书 105 | 85d8e10 更新ReadMe 106 | fcc4abe Merge branch 'master' of gitee.com:loaden/nspawn-deepinwine 107 | 55ead5d 尝试修复N卡绑定失败 108 | 0d86f82 添加钉钉启动器 109 | 4d8ede8 Merge branch 'master' of gitee.com:loaden/nspawn-deepinwine 110 | 95bf914 修正钉钉Linux版本依赖 111 | 511fffb 修正微信配置 112 | 09f4f67 奇怪的判断错误 113 | 88d7b97 完善微信配置 114 | 0920416 QQ支持离线安装 115 | b321c4d 完善天翼云盘 116 | 454b56e 添加微信配置脚本 117 | 3252b92 完善ReadMe 118 | d6e4d1c 更新ReadMe 119 | 70c3060 修复TIM卸载 120 | e6f64da Revert "修正TIM配置" 121 | aed7eeb 添加TIM离线安装 122 | 5a70ce0 修正TIM配置 123 | 6864c9c 添加TIM 124 | 3c38092 修正二次更新错误 125 | b8c7071 更新ChangeLog 126 | 127 | git log v3.3.2..v3.3.3 --oneline 128 | 09d4776 只卸载一次不必要组件 129 | d5071b0 添加自动更新功能 130 | 1b36638 修复卸载不彻底 131 | 61c6a85 更新后提醒hold软件 132 | 0094824 添加生成更新日志脚本 133 | 134 | git log v3.3.1..v3.3.2 --oneline 135 | 2aea00b 修复安装脚本 136 | b000b99 添加更新商店命令 137 | e7aa07c 优化卸载 138 | 2d206dc Merge branch 'master' of gitee.com:loaden/nspawn-deepinwine 139 | f254980 优化查询输出 140 | 5e680a3 优化离线安装 141 | 142 | git log v3.3..v3.3.1 --oneline 143 | 24c2001 修复安装脚本 144 | 4ad77ab 改进安装脚本 145 | 013c4c1 Add install scripts 146 | 0b0907b Config Fixes 147 | b8fcf48 添加changelog 148 | 149 | git log v3.2..v3.3 --oneline 150 | 5e99fb8 不卸载eject 151 | 07298c1 确保配置时update只执行一次 152 | b1c2c69 优化配置与清理 153 | 2d7a2be update只执行一次 154 | c5f4b5a 添加neofetch 155 | e9cccec 移除mount 156 | a0d5ce2 启动前输出环境变量 157 | 807f089 完善query和SHM配置 158 | ed12cde 修复安装与配置报错 159 | b7b4ca2 重写query 160 | 50949a1 优化config 161 | 3b76340 重写clean脚本 162 | 167fb29 重写config脚本 163 | 9f27853 Fix denpency 164 | 08ea44f 终端免密码安装软件 165 | 4795739 最小化基本系统安装 166 | 847d987 优化容器配置 167 | 600a540 优化清理函数 168 | edc15b9 添加xarchiver 169 | 2123df5 deepin特殊包 170 | ce6a16a 添加gtk依赖 171 | 619686d Revert "移除不必要的依赖" 172 | 2f28f34 修复严重错误 173 | 527373a Revert "取消最小化" 174 | b3cb207 取消最小化 175 | eea73f3 默认XFCE文管和终端 176 | 44d45a5 移除不必要的依赖 177 | 7725aab 更轻量级文管和终端 178 | 63a1dae 添加procps 179 | 0cd7e7a 添加zstd 180 | 57a76df 恢复清理 181 | a36f7ef 去除wqy字体 182 | 29b0d67 改用wqy中文字体 183 | a912f00 精简不必要的依赖 184 | be5660c 修复安装判断 185 | 4f30641 精简初始安装 186 | 70a3595 完善容器tty配置 187 | 196ff6c 避免有可能的/bin不存在 188 | 1b69325 不再移除旧版本遗留文件 189 | a9f49c2 完善用户修改目录名称问题 190 | a93e48b 输出更多调试信息 191 | aa9aa15 同步容器改进 192 | c4132d3 优化容器工具安装 193 | 1379ee2 添加工具包检测 194 | 195 | git log v3.1..v3.2 --oneline 196 | 204a3c8 优化字符串判断 197 | 5ee5e4f 优化创造启动器的条件 198 | dfe9696 添加天翼云盘启动器 199 | 13101a6 修正嵌套软链接 200 | d8208a0 添加解释 201 | 5448db6 Merge branch 'master' of gitee.com:loaden/nspawn-deepinwine 202 | 0183da4 修正拼写 203 | 1df7cf1 安装完成后不清理 204 | 00820f4 修正QQ微信图标 205 | ada4f89 不能判断chroot的返回值 206 | f5f2771 继续优化安装判断 207 | 8d09332 完善安装判断 208 | 097cb57 判断容器创建是否成功 209 | 3c37344 更新维护人 210 | c465cbe 提醒用户错误执行配置脚本 211 | 389ecae 完善执行脚本用户权限判断 212 | 682c511 添加不能单独执行提示 213 | e24bf4b 删除过时代码 214 | de5a656 配置过程不删除启动器 215 | d4128c9 安装或配置容器时,以普通用户身份执行安装 216 | b820d1e 安装与启动只允许普通用户权限执行 217 | 6c3adf8 容器不存在时先创建 218 | 2c45469 清理时删除被淘汰软件 219 | 9b4bfbd mousepad改32位 220 | 221 | git log v3.0..v3.1 --oneline 222 | 74c718b 添加多用户模式开关 223 | 9cb1b6c 优化启动环境变量输出 224 | 7b7150d 添加升级说明 225 | 0b93c01 优化交互 226 | 7253f55 加粗QQ群 227 | 08c871f 去掉颜色,不支持 228 | b4971c7 用户名和密码红色标注 229 | c1da2b4 添加技术支持QQ群提示 230 | ee519ae 优化清理函数 231 | 8b8e245 添加安装所有脚本 232 | 54eb128 修正拼写 233 | e8c59df 解决多用户共享权限 234 | 23c27b0 不覆盖软链接 235 | 7e9782f 消除终端启动警告 236 | c284323 优化同用户目录 237 | 934ad90 修复N卡可能的绑定失败 238 | c917a83 完善输入法环境变量设置 239 | 3a35f4f Merge branch 'master' of github.com:loaden/nspawn-deepinwine 240 | e2f7cf5 暂停容器与宿主机使用相同用户目录 241 | 4144448 优化云盘配置脚本 242 | 5ce18b4 添加云盘脚本安装 243 | b69b9a2 修正LibreOffice启动警告 244 | 5d11f6b LibreOffice添加breeze图标 245 | 4a47ba3 默认安装deepin-desktop-base 246 | d131eb2 LibreOffice安装elementary图标 247 | af4589d 解决LibreOffice启动警告 248 | 249 | git log v2.2..v3.0 --oneline 250 | 38c1adc 更新ReadME 251 | e8d3c1d 添加解压工具 252 | d382493 修正LibreOffice样式 253 | b471115 移除多余空行 254 | b0fb8ea 修复Nvidia绑定 255 | 3efe487 添加图片打开方式查询 256 | b6f4116 完善PDF默认打开方式 257 | 567f200 添加PDF浏览器 258 | d678bfd LibreOffice只安装基本组件 259 | 1e0a21f 添加网页浏览器 260 | 321305b 添加mousepad 261 | ac42ab6 去掉多余update 262 | a5e90d0 添加LibreOffice 263 | 095a01b 添加图片浏览器 264 | 1969ecd 添加压缩解压插件 265 | c2c9338 优化安装性能 266 | f464158 添加系统升级脚本 267 | 4a39726 移除多余空行 268 | 6f849be 增强日志可读性 269 | c3d5b0a 增大延时 270 | abef321 按需启动容器 271 | 2185cd3 禁用SELinux 272 | cdb4ee3 微调移除 273 | 4626bfd 让卸载更完整 274 | 8216f2c 修复脚本目录不存在 275 | 4d4c7e2 避免可能的误删除 276 | b314ac7 禁止套娃 277 | c0e0283 启动器不存在时才创建 278 | bde9c17 完善hostname设置 279 | ab74ff2 修正启动器配置 280 | 6e7c9f8 交互优化 281 | 3ee225d 完善clean 282 | 0808208 修正管理员权限 283 | 6f9fb22 修正卸载 284 | ff05a47 修正初始化配置中可能的误删除 285 | 6d96d2d 优化卸载脚本 286 | 79bb9a1 统一风格 287 | 3972a1c 添加原生钉钉 288 | b7411b1 避免需要管理员权限删除钉钉容器 289 | 5a3aaf0 彻底解决钉钉自动升级问题 290 | c0e2d7b 修正钉钉启动 291 | 2c7ad35 取消.cache绑定 292 | d56006b 优化清理脚本 293 | 15ee5ac 精简Thunar安装 294 | 2b2e1ad 修复央视影音SHM禁用 295 | e5b563c deepin容器设置默认终端 296 | a325d31 完善文件管理器安装 297 | 262fce9 将容器用户添加到audio组中 298 | f960185 添加pts/7-9 299 | 41ef794 添加/dev/snd绑定 300 | 5cff8c6 禁止钉钉自动升级 301 | 0667b5f 修正钉钉SHM禁用失败 302 | a315af7 查询时去除过多的空行 303 | 83c22b5 容器配置添加1秒延时 304 | 4597b7b 细节修正与完善 305 | 6bb46a6 添加SHM禁用查询 306 | d077549 x11-utils应该提前安装 307 | 745a7da 添加保卫萝卜 308 | c814e77 添加全民K歌 309 | 4034949 添加钉钉和企业微信 310 | 23e22ef 修正百度网盘安装 311 | f155525 修复拼写 312 | d5b7f2d 内核要加载fuse 313 | 9523ae1 添加软件列表 314 | 3d07327 添加反恐精英 315 | 18fa74d 完善设备绑定 316 | b0e83fd 添加百度网盘 317 | c8d4979 添加野狐围棋 318 | 021560a 添加向日葵远程控制 319 | a9229f4 添加飞书 320 | d633aa2 添加央视影音 321 | c6f85f1 添加金山词霸 322 | 3f487e0 添加腾讯视频 323 | f1502fb 修正deepin卸载 324 | 1271232 丰富调试信息 325 | 62c0f75 移除模块代码重构 326 | e78ec59 文件名完善 327 | ec646da 修正语法歧义引起的错误 328 | 4af8f03 简化语法 329 | a896630 代码重构 330 | 7353e64 修正Thunar默认文件管理器注册 331 | d81a61c Merge branch 'master' of github.com:loaden/nspawn-deepinwine 332 | 2b16809 运行前判断容器是否启动 333 | 334 | git log v2.1..v2.2 --oneline 335 | 5a37c8f 完善默认安装 336 | 956a023 解决打开文件夹 337 | 687c5d9 deepin安装deepin-desktop-base 338 | 12f3dd1 卸载前先停止容器 339 | 4520dbd 添加登录shell说明 340 | f1b88cb 允许root登录tty 341 | 342 | git log v2.0..v2.1 --oneline 343 | 686071c 确保欺骗库目录存在 344 | 6bd3dc3 确认编译欺骗库成功才卸载编译器 345 | 3b7eba0 两次chroot之间加上sleep 0.1 346 | e6523f1 执行chatt之前先判断 347 | d92c162 默认安装终端和QQ 348 | e5fabc4 配置时打印启动器命令 349 | 05ab1c5 尝试解决可能的/dev/dri绑定失败 350 | 03abee0 设置开机启动 351 | 78dda46 完善查询功能 352 | c450484 修正xdg-user-dir检测 353 | 5afe4b2 Merge branch 'stable' 354 | 862d070 修复星号显示 355 | 413583e 添加致谢 356 | 357 | git log v1.02..v2.0 --oneline 358 | 93a1916 Merge branch 'master' into stable 359 | e8a3c4d 细节优化 360 | 5d83c9e 智能添加启动器 361 | f854f10 完善ReadMe 362 | 9b802b7 微调 363 | c3b89f1 确保xdg-user-dir在RPM系存在 364 | 9e10295 获取用户路径时判断工具是否存在 365 | d635347 添加必备软件包 366 | 1d850df 解决Arch下不存在xhost 367 | bfb2c6d 默认不禁用宿主机MITSHM 368 | 9c19e8d 删除调试代码 369 | 6295488 安装后即刻清理缓存 370 | 884b495 下载deepin容器时修改保护属性 371 | 5bc6692 修正nvidia-uvm判断 372 | eb6aef8 修正Nvidia绑定 373 | ccf1678 修正初始配置 374 | eeaedb8 更新ReadME 375 | 5b15983 重写所有SHM函数 376 | 54d7f41 添加更多的伪造函数 377 | ee431d8 根据时间戳编译欺骗库 378 | 3cc1c5b 删除deepin的capability 379 | 4d36936 修正默认类型注册与查询 380 | 6e42f29 修正QQ启动错误 381 | 38891b5 添加mpv安装 382 | 3d2ce0c 注册默认文件管理器 383 | c61b909 删除WAYLAND_DISPLAY环境变量 384 | 34157f7 清除旧版本遗留配置 385 | 5222a12 为两个容器启用不同的capability 386 | 1266086 取消容器MITSHM扩展禁用 387 | db2f4a0 默认绑定/dev/shm 388 | efc1085 修复卸载错误 389 | aa527ff 完善ReadMe 390 | a4d7448 添加选项控制禁用MITSHM的模式 391 | 29a4d78 完善MIT-SHM禁用 392 | 06b5a7f Merge branch 'stable' 393 | 0bf897a 伪造函数的基础上再禁用容器MITSHM扩展 394 | 110a1ad 代码格式化 395 | c02fd12 添加加载权限 396 | 3ae6148 逻辑优化 397 | a0522dc 修改编译选项 398 | 55b0bd0 成功欺骗! 399 | 729a2c4 修正动态库提前加载 400 | 216a2fa 同时编译32位和64位欺骗库 401 | 5f84d04 Merge remote-tracking branch 'origin/stable' 402 | 7f9663a 独立MITSHM禁用模块 403 | 404 | git log v1.01..v1.02 --oneline 405 | 7bce104 修正QQ启动错误 406 | 407 | git log v1.0..v1.01 --oneline 408 | cb78843 添加RPM系安装支持 409 | a694502 修复用户判断错误 410 | 411 | git log v1.0 --oneline 412 | d50b488 更好的查看服务的方法 413 | 8181a5e 运行时判断输入法模块 414 | eddff58 添加NOSHM环境变量 415 | 428eb91 添加卸载脚本 416 | a5afe93 添加迅雷 417 | 7fcf91e 修正微信启动 418 | 9a0ffec Arch包不重复安装 419 | 15ae1bc 安装可能缺少的包 420 | eff7079 完善Debian安装deepinwine 421 | 1d3daf8 采用更可靠的判断用户是否存在的方法 422 | 48323ec 当用户存在时,不再删除用户 423 | 7ae8435 修复循环软链接 424 | f80be3f 安装QQ前确保启动容器 425 | 5d2eb52 Arch不更新包管理数据 426 | 92239e4 移除不必要的绑定 427 | 690c52e 默认安装QQ 428 | 200d172 启动时指定语言 429 | 7ff27cd 修改ReadMe 430 | f0fc748 自动生成locales 431 | 563d5e8 修复微信安装错误 432 | 9adcdc3 完善代码缩进 433 | e118325 使容器与宿主机使用相同用户目录 434 | f52c400 判断是否添加云盘目录 435 | 45d6911 修复错误引号 436 | 0520050 不硬编码用户目录 437 | 86ae8b3 Merge branch 'master' of https://gitee.com/loaden/nspawn-deepinwine 438 | e37c798 禁用宿主机MIT-SHM功能 439 | 503fe53 支持Arch系一键安装配置 440 | 4ee83f9 空格隔开下一行,不然难受 441 | 354365c 判断包管理类型 442 | 2fc049e 还原初始化配置 443 | 5bf6e87 安装语言提醒 444 | a5741ae 添加批量安装和多系统共享 445 | 12a66cc add README.md. 446 | 1b6ade8 代码重构,支持一键安装 447 | e4ee9ce 共享同一份授权修改脚本 448 | 739c112 安装脚本中添加启动器 449 | bfa9461 add LICENSE. 450 | 08015c5 初始化导入 451 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 维护:Yuchen Deng [Zz] QQ群:19346666、111601117 3 | 4 | # 确认管理员权限 5 | if [[ $EUID != 0 ]]; then 6 | echo "请打开终端,在脚本前添加 sudo 执行,或者 sudo -s 获得管理员权限后再执行。" 7 | exit 1 8 | fi 9 | 10 | # 配置Debian容器 11 | source `dirname ${BASH_SOURCE[0]}`/debian-config.sh 12 | sleep 2 13 | 14 | # 配置Deepin容器 15 | source `dirname ${BASH_SOURCE[0]}`/deepin-config.sh 16 | -------------------------------------------------------------------------------- /debian-config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 维护:Yuchen Deng [Zz] QQ群:19346666、111601117 3 | 4 | # 确认管理员权限 5 | if [[ $EUID != 0 ]]; then 6 | echo "请打开终端,在脚本前添加 sudo 执行,或者 sudo -s 获得管理员权限后再执行。" 7 | exit 1 8 | fi 9 | 10 | 11 | # 容器不存在时先创建 12 | if [ ! -d /home/$SUDO_USER/.machines/debian ]; then 13 | echo "容器 debian 不存在,即将自动创建,请耐心等待..." 14 | source `dirname ${BASH_SOURCE[0]}`/nspawn-debian.sh 15 | exit 0 16 | fi 17 | 18 | 19 | # 设置专属环境变量 20 | SOURCES_LIST="echo 'deb https://mirrors.bfsu.edu.cn/debian/ bullseye main contrib non-free' > /etc/apt/sources.list" 21 | 22 | IFS='' read -r -d '' INSTALL_QQ < /usr/local/bin/debian-update-store < /usr/local/bin/debian-install-all < /usr/local/bin/deepin-install-app-store < /usr/local/bin/deepin-app-store < /usr/local/bin/deepin-install-wemeet < /usr/local/bin/deepin-wemeet < /usr/local/bin/deepin-install-xunlei < /usr/local/bin/deepin-xunlei < /usr/local/bin/deepin-install-tenvideo < /usr/local/bin/deepin-tenvideo < /usr/local/bin/deepin-install-powerword < /usr/local/bin/deepin-powerword < /usr/local/bin/deepin-install-cbox < /usr/local/bin/deepin-cbox < /usr/local/bin/deepin-install-sunlogin < /usr/local/bin/deepin-sunlogin < /usr/local/bin/deepin-install-sunlogin < /usr/local/bin/deepin-sunlogin < /usr/local/bin/deepin-install-foxwq < /usr/local/bin/deepin-foxwq < /usr/local/bin/deepin-install-baidunetdisk < /usr/local/bin/deepin-baidunetdisk < /usr/local/bin/deepin-install-cstrike < /usr/local/bin/deepin-cstrike < /usr/local/bin/deepin-install-work-weixin < /usr/local/bin/deepin-work-weixin < /usr/local/bin/deepin-install-wesing < /usr/local/bin/deepin-wesing < /usr/local/bin/deepin-install-baoweiluobo < /usr/local/bin/deepin-baoweiluobo < /usr/local/bin/deepin-install-all < 105 ]]; then 13 | cat > /usr/share/polkit-1/rules.d/10-machines.rules < /var/lib/polkit-1/localauthority/10-vendor.d/machines.pkla < 2 | #include 3 | #include 4 | #include 5 | 6 | __attribute__((visibility("default"))) Bool XShmQueryExtension( 7 | Display *display /* dpy */ 8 | ) 9 | { 10 | return 0; 11 | } 12 | 13 | __attribute__((visibility("default"))) int XShmGetEventBase( 14 | Display *display /* dpy */ 15 | ) 16 | { 17 | return 0; 18 | } 19 | 20 | __attribute__((visibility("default"))) Bool XShmQueryVersion( 21 | Display *display /* dpy */, 22 | int *major /* majorVersion */, 23 | int *minor /* minorVersion */, 24 | Bool *pixmaps /* sharedPixmaps */ 25 | ) 26 | { 27 | *major = 0; 28 | *minor = 0; 29 | *pixmaps = 0; 30 | return 0; 31 | } 32 | 33 | __attribute__((visibility("default"))) int XShmPixmapFormat( 34 | Display *display /* dpy */ 35 | ) 36 | { 37 | return 0; 38 | } 39 | 40 | __attribute__((visibility("default"))) Bool XShmAttach( 41 | Display *display /* dpy */, 42 | XShmSegmentInfo *shminfo /* shminfo */ 43 | ) 44 | { 45 | return 0; 46 | } 47 | 48 | __attribute__((visibility("default"))) Bool XShmDetach( 49 | Display *display /* dpy */, 50 | XShmSegmentInfo *shminfo /* shminfo */ 51 | ) 52 | { 53 | return 0; 54 | } 55 | 56 | __attribute__((visibility("default"))) Bool XShmPutImage( 57 | Display *display /* dpy */, 58 | Drawable d /* d */, 59 | GC gc /* gc */, 60 | XImage *image /* image */, 61 | int src_x /* src_x */, 62 | int src_y /* src_y */, 63 | int dst_x /* dst_x */, 64 | int dst_y /* dst_y */, 65 | unsigned int src_width /* src_width */, 66 | unsigned intsrc_height /* src_height */, 67 | Bool send_event /* send_event */ 68 | ) 69 | { 70 | return 0; 71 | } 72 | 73 | __attribute__((visibility("default"))) Bool XShmGetImage( 74 | Display *display /* dpy */, 75 | Drawable d /* d */, 76 | XImage *image /* image */, 77 | int x /* x */, 78 | int y /* y */, 79 | unsigned long plane_mask /* plane_mask */ 80 | ) 81 | { 82 | return 0; 83 | } 84 | 85 | __attribute__((visibility("default"))) XImage *XShmCreateImage( 86 | Display *display /* dpy */, 87 | Visual *visual /* visual */, 88 | unsigned int depth /* depth */, 89 | int format /* format */, 90 | char *data /* data */, 91 | XShmSegmentInfo *shminfo /* shminfo */, 92 | unsigned int width /* width */, 93 | unsigned int height /* height */ 94 | ) 95 | { 96 | return 0; 97 | } 98 | 99 | __attribute__((visibility("default"))) Pixmap XShmCreatePixmap( 100 | Display *display /* dpy */, 101 | Drawable d /* d */, 102 | char *data /* data */, 103 | XShmSegmentInfo *shminfo /* shminfo */, 104 | unsigned int width /* width */, 105 | unsigned int height /* height */, 106 | unsigned int depth /* depth */ 107 | ) 108 | { 109 | return 0; 110 | } 111 | -------------------------------------------------------------------------------- /xnoshm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 维护:Yuchen Deng [Zz] QQ群:19346666、111601117 3 | 4 | # 不能单独执行提醒 5 | if [[ `basename $0` == xnoshm.sh ]]; then 6 | echo "'`basename $0`' 命令不能单独执行" 7 | exit 1 8 | fi 9 | 10 | 11 | # 禁用MIT-SHM 12 | [[ $(machinectl list) =~ $1 ]] && machinectl stop $1 13 | [[ ! $DISABLE_HOST_MITSHM ]] && DISABLE_HOST_MITSHM=0 14 | 15 | [ -f /etc/X11/xorg.conf ] && perl -0777 -pi -e 's/Section "Extensions"\n Option "MIT-SHM" "Disable"\nEndSection\n//g' /etc/X11/xorg.conf 16 | [ -f /etc/X11/xorg.conf ] && [[ ! $(cat /etc/X11/xorg.conf) ]] && rm -f /etc/X11/xorg.conf 17 | 18 | DISABLE_MIT_SHM_SH=disable-MIT-SHM.sh 19 | DISABLE_MIT_SHM_SO=disable-MIT-SHM.so 20 | 21 | if [[ $DISABLE_HOST_MITSHM == 1 ]]; then 22 | if [[ `loginctl show-session $(loginctl | grep $SUDO_USER |awk '{print $ 1}') -p Type` == *x11* ]]; then 23 | mkdir -p /etc/X11/xorg.conf.d 24 | echo -e 'Section "Extensions"\n Option "MIT-SHM" "Disable"\nEndSection' > /etc/X11/xorg.conf.d/disable-MIT-SHM.conf 25 | fi 26 | cat > $ROOT/$DISABLE_MIT_SHM_SH < /etc/X11/xorg.conf.d/disable-MIT-SHM.conf 34 | rm -f /etc/X11/xorg.conf 35 | EOF 36 | else 37 | rm -f /etc/X11/xorg.conf.d/disable-MIT-SHM.conf 38 | [[ -d /etc/X11/xorg.conf.d && `ls -A /etc/X11/xorg.conf.d |wc -w` == 0 ]] && rm -rf /etc/X11/xorg.conf.d 39 | cp -fp `dirname ${BASH_SOURCE[0]}`/xnoshm.c $ROOT/disable-MIT-SHM.c 40 | cat > $ROOT/$DISABLE_MIT_SHM_SH < \$(stat -c %Y /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO) 48 | || \$(stat -c %Y /disable-MIT-SHM.c) > \$(stat -c %Y /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO) ]]; then 49 | dpkg --add-architecture i386 50 | apt update 51 | apt install -y gcc gcc-multilib libc6-dev libxext-dev --no-install-recommends 52 | mkdir -p /lib/x86_64-linux-gnu/ 53 | gcc /disable-MIT-SHM.c -shared -o /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO 54 | chmod u+s /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO 55 | ls -lh /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO 56 | mkdir -p /lib/i386-linux-gnu/ 57 | gcc /disable-MIT-SHM.c -m32 -shared -o /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO 58 | chmod u+s /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO 59 | ls -lh /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO 60 | if [[ -f /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO && -f /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO ]]; then 61 | rm -f /disable-MIT-SHM.c 62 | apt purge -y gcc gcc-multilib libc6-dev libxext-dev 63 | apt autopurge -y && apt clean 64 | fi 65 | fi 66 | EOF 67 | fi 68 | 69 | chroot $ROOT /bin/bash /$DISABLE_MIT_SHM_SH 70 | 71 | 72 | # 导出SHM相关环境变量 73 | DISABLE_MITSHM="[[ -f /lib/x86_64-linux-gnu/$DISABLE_MIT_SHM_SO && -f /lib/i386-linux-gnu/$DISABLE_MIT_SHM_SO ]] && export LD_PRELOAD=$DISABLE_MIT_SHM_SO 74 | export QT_X11_NO_MITSHM=1 75 | export _X11_NO_MITSHM=1 76 | export _MITSHM=0 77 | " 78 | --------------------------------------------------------------------------------