├── .github └── FUNDING.yml ├── LICENSE ├── README.md ├── adduser.conf ├── assets ├── executive_edid.conf ├── executive_edid_hooks ├── executive_edid_mod90hz.bin └── readme.md ├── benchmark_nodejs.sh ├── executive_edid.sh ├── fedora_essential_kbd_module_install.sh ├── kernel-clean.sh ├── slimbook-brightness-start.sh ├── slimbook-hello ├── testing ├── drivers-3.sh ├── drivers-4.sh ├── drivers-5.sh ├── readme.md └── slimbook-sleep-9.0 └── wireless-info.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [friend1, friend2] 4 | patreon: slimbook 5 | -------------------------------------------------------------------------------- /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 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 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 | {project} Copyright (C) {year} {fullname} 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 | # SLIMBOOK 2 | "Welcome to freedom" - El ultrabook GNU/Linux - www.slimbook.es 3 | 4 | ## All the application repositories have been transfered to [Slimbook-Team Organization](https://github.com/Slimbook-Team) 5 | 6 | ## slimbook-hello 7 | ``` 8 | sudo wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/slimbook-hello -P /usr/bin && sudo chmod +x /usr/bin/slimbook-hello 9 | slimbook-hello 10 | ``` 11 | 12 | ## This repository: 13 | ### Scripts: 14 | 15 | 1. Download 16 | 2. Open a terminal (ctrl+alt+t) 17 | 3. Move to the script path: 18 | ``` 19 | cd 20 | ``` 21 | 4. Use bash to exec the script: 22 | ``` 23 | bash script.sh 24 | ``` 25 | 26 | ### 📫 How to reach us: ... 27 | - Send an e-mail to: dev@slimbook.es 28 | 29 | ## Issues 30 | 31 | Having issues? Just report in [the issue section](https://github.com/slimbook/slimbook/issues). **Thanks for the feedback!** 32 | 33 | ## Contribute 34 | 35 | Fork this repository, make your changes and then issue a pull request. If you find bugs or have new ideas that you do not want to implement yourself, file a bug report. 36 | 37 | ## Donate 38 | 39 | Become a patron, by simply clicking on this button (**very appreciated!**): 40 | 41 | [![](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/slimbook) 42 | 43 | -------------------------------------------------------------------------------- /adduser.conf: -------------------------------------------------------------------------------- 1 | # /etc/adduser.conf: `adduser' configuration. 2 | # See adduser(8) and adduser.conf(5) for full documentation. 3 | 4 | # The DSHELL variable specifies the default login shell on your 5 | # system. 6 | DSHELL=/bin/bash 7 | 8 | # The DHOME variable specifies the directory containing users' home 9 | # directories. 10 | DHOME=/home 11 | 12 | # If GROUPHOMES is "yes", then the home directories will be created as 13 | # /home/groupname/user. 14 | GROUPHOMES=no 15 | 16 | # If LETTERHOMES is "yes", then the created home directories will have 17 | # an extra directory - the first letter of the user name. For example: 18 | # /home/u/user. 19 | LETTERHOMES=no 20 | 21 | # The SKEL variable specifies the directory containing "skeletal" user 22 | # files; in other words, files such as a sample .profile that will be 23 | # copied to the new user's home directory when it is created. 24 | SKEL=/etc/skel 25 | 26 | # FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs 27 | # for dynamically allocated administrative and system accounts/groups. 28 | # Please note that system software, such as the users allocated by the base-passwd 29 | # package, may assume that UIDs less than 100 are unallocated. 30 | FIRST_SYSTEM_UID=100 31 | LAST_SYSTEM_UID=999 32 | 33 | FIRST_SYSTEM_GID=100 34 | LAST_SYSTEM_GID=999 35 | 36 | # FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically 37 | # allocated user accounts/groups. 38 | FIRST_UID=1000 39 | LAST_UID=59999 40 | 41 | FIRST_GID=1000 42 | LAST_GID=59999 43 | 44 | # The USERGROUPS variable can be either "yes" or "no". If "yes" each 45 | # created user will be given their own group to use as a default. If 46 | # "no", each created user will be placed in the group whose gid is 47 | # USERS_GID (see below). 48 | USERGROUPS=yes 49 | 50 | # If USERGROUPS is "no", then USERS_GID should be the GID of the group 51 | # `users' (or the equivalent group) on your system. 52 | USERS_GID=100 53 | 54 | # If DIR_MODE is set, directories will be created with the specified 55 | # mode. Otherwise the default mode 0755 will be used. 56 | DIR_MODE=0755 57 | 58 | # If SETGID_HOME is "yes" home directories for users with their own 59 | # group the setgid bit will be set. This was the default for 60 | # versions << 3.13 of adduser. Because it has some bad side effects we 61 | # no longer do this per default. If you want it nevertheless you can 62 | # still set it here. 63 | SETGID_HOME=no 64 | 65 | # If QUOTAUSER is set, a default quota will be set from that user with 66 | # `edquota -p QUOTAUSER newuser' 67 | QUOTAUSER="" 68 | 69 | # If SKEL_IGNORE_REGEX is set, adduser will ignore files matching this 70 | # regular expression when creating a new home directory 71 | SKEL_IGNORE_REGEX="dpkg-(old|new|dist|save)" 72 | 73 | # Set this if you want the --add_extra_groups option to adduser to add 74 | # new users to other groups. 75 | # This is the list of groups that new non-system users will be added to 76 | # Default: 77 | EXTRA_GROUPS="input dialout cdrom floppy audio video plugdev users" 78 | 79 | # If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS 80 | # option above will be default behavior for adding new, non-system users 81 | ADD_EXTRA_GROUPS=1 82 | 83 | 84 | # check user and group names also against this regular expression. 85 | #NAME_REGEX="^[a-z][-a-z0-9_]*\$" 86 | 87 | # use extrausers by default 88 | #USE_EXTRAUSERS=1 89 | -------------------------------------------------------------------------------- /assets/executive_edid.conf: -------------------------------------------------------------------------------- 1 | install_items+="/lib/firmware/edid/edid.bin" 2 | -------------------------------------------------------------------------------- /assets/executive_edid_hooks: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PREREQ="" 3 | prereqs() 4 | { 5 | echo "$PREREQ" 6 | } 7 | 8 | case $1 in 9 | prereqs) 10 | prereqs 11 | exit 0 12 | ;; 13 | esac 14 | 15 | . /usr/share/initramfs-tools/hook-functions 16 | # Begin real processing below this line 17 | mkdir -p "${DESTDIR}/lib/firmware/edid" 18 | cp -a /lib/firmware/edid/edid.bin "${DESTDIR}/lib/firmware/edid/edid.bin" 19 | exit 0 20 | -------------------------------------------------------------------------------- /assets/executive_edid_mod90hz.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Slimbook-Team/slimbook/81de778c94058b8bd4df1bf124ea3cd9d9b74797/assets/executive_edid_mod90hz.bin -------------------------------------------------------------------------------- /assets/readme.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /benchmark_nodejs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SLIMBOOK TEAM 2021 3 | 4 | # instructions: 5 | # open a terminal and run: 6 | # wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/benchmark_nodejs.sh 7 | # Exec: 8 | # bash benchmark_nodejs.sh 9 | # Use --loop parameter to loop execution; stop loop pressing Ctrl+C 10 | # wait 10 minutes (or more) 11 | # share your result with us, twitter: @SlimbookES 12 | 13 | VERSION='14.19.1' 14 | THREADS=$(lscpu | grep -E '^CPU\(s\)\:' | awk '{print $2}') 15 | CPU=$(grep 'model name' /proc/cpuinfo | head -1 | cut -d ':' -f2) 16 | CURDIR="$PWD" 17 | RESULT='' 18 | 19 | cd /tmp || exit # && echo "We are now in $PWD" 20 | echo "Starting execution..." 21 | 22 | # if ! test -f "$FILE"; 23 | # then 24 | # echo "$FILE does not exists." 25 | # wget https://github.com/nodejs/node/archive/refs/tags/v14.17.3.tar.gz 26 | # fi 27 | 28 | DOWNLOAD_FILE="https://github.com/nodejs/node/archive/refs/tags/v${VERSION}.tar.gz" 29 | FILE="/tmp/v${VERSION}.tar.gz" 30 | if ! test -f "$FILE"; 31 | then 32 | wget $DOWNLOAD_FILE 33 | rs=$? 34 | if [[ $rs -ne 0 || ! -f "v${VERSION}.tar.gz" ]] 35 | then 36 | echo "Can not download" 37 | exit 1 38 | fi 39 | fi 40 | 41 | clean_test(){ 42 | if [[ -d "/tmp/node-${VERSION}" ]] 43 | then 44 | rm -rf "/tmp/node-${VERSION}" 45 | fi 46 | # if [[ -f "/tmp/v${VERSION}.tar.gz" ]] 47 | # then 48 | # rm -f "v${VERSION}.tar.gz" 49 | # fi 50 | } 51 | 52 | funct_compile () { 53 | 54 | # Clean before test 55 | clean_test 56 | 57 | tar xf "/tmp/v${VERSION}.tar.gz" 58 | cd "node-${VERSION}" || exit 59 | ./configure 60 | 61 | START_TIME="$(date -u +%s)" 62 | make -s -j "$THREADS" 2>&1 63 | END_TIME="$(date -u +%s)" 64 | 65 | ELAPSED="$((END_TIME - START_TIME))" 66 | h=$((ELAPSED / 3600)) 67 | m=$(((ELAPSED % 3600) / 60)) 68 | s=$((ELAPSED % 60)) 69 | 70 | RESULT="\nCPU benchmark finished. -- $(date) \nCPU:$CPU \nTotal time (hours:minutes:seconds): $h:$m:$s \n" 71 | printf "$RESULT\n" 72 | 73 | } 74 | 75 | if test $1 && [ $1 = '--loop' ]; 76 | then 77 | echo "Infinite loop started [ hit CTRL+C to stop]" 78 | for (( ; ; )) 79 | do 80 | funct_compile 81 | printf "$RESULT" >> ~/nodejsbenchmark_results.txt 82 | cd /tmp || exit 83 | done 84 | else 85 | funct_compile 86 | fi 87 | -------------------------------------------------------------------------------- /executive_edid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SLIMBOOK TEAM 2022 3 | 4 | # instructions: 5 | # open a terminal and run: 6 | # wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/executive_edid.sh 7 | # Exec: 8 | # sudo bash executive_edid.sh 9 | 10 | DISTRO=$(lsb_release -is) 11 | 12 | cd /tmp || exit # && echo "We are now in $PWD" 13 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/assets/executive_edid_mod90hz.bin 14 | sudo mkdir /lib/firmware/edid/ 15 | sudo cp /tmp/executive_edid_mod90hz.bin /lib/firmware/edid/edid.bin 16 | 17 | sudo sed -i 's%GRUB_CMDLINE_LINUX_DEFAULT="%GRUB_CMDLINE_LINUX_DEFAULT="drm.edid_firmware=eDP-1:edid/edid.bin %g' "/etc/default/grub" #% en lugar de / 18 | 19 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/assets/executive_edid_hooks 20 | sudo mkdir /etc/initramfs-tools/hooks/ 21 | sudo cp /tmp/executive_edid_hooks /etc/initramfs-tools/hooks/edid 22 | sudo chmod +x /etc/initramfs-tools/hooks/edid 23 | 24 | sudo update-initramfs -u 25 | sudo update-grub 26 | 27 | #fedora start (y algunos arch) 28 | if [ $DISTRO = "Fedora" ] || [ $DISTRO = "Manjaro" ]; then 29 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/assets/executive_edid.conf 30 | sudo cp /tmp/executive_edid.conf /etc/dracut.conf.d/executive_edid.conf 31 | sudo dracut -f 32 | sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 33 | sudo grub2-mkconfig -o /boot/grub/grub.cfg 34 | fi 35 | #fedora end 36 | 37 | if [ -f "/etc/kernelstub/configuration" ] 38 | then 39 | echo "File is found" 40 | cat < /etc/kernelstub/configuration 41 | { 42 | "default": { 43 | "kernel_options": [ 44 | "quiet", 45 | "splash" 46 | ], 47 | "esp_path": "/boot/efi", 48 | "setup_loader": false, 49 | "manage_mode": false, 50 | "force_update": false, 51 | "live_mode": false, 52 | "config_rev": 3 53 | }, 54 | "user": { 55 | "kernel_options": [ 56 | "quiet", 57 | "loglevel=0", 58 | "systemd.show_status=false", 59 | "splash", 60 | "drm.edid_firmware=eDP-1:edid/edid.bin" 61 | ], 62 | "esp_path": "/boot/efi", 63 | "setup_loader": true, 64 | "manage_mode": true, 65 | "force_update": false, 66 | "live_mode": false, 67 | "config_rev": 3 68 | } 69 | } 70 | EOF 71 | 72 | sudo kernelstub -f 73 | 74 | else 75 | echo "File is not found" 76 | fi 77 | 78 | echo "Finalizado, reinicie el ordenador para aplicar los cambios" 79 | -------------------------------------------------------------------------------- /fedora_essential_kbd_module_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo dnf install kernel-headers kernel-devel-$(uname -r) dkms 3 | git clone https://github.com/Slimbook-Team/slimbook-keyboard-dkms.git 4 | cd slimbook-keyboard-dkms/slimbook_keyboard-0.0 5 | make 6 | sudo make dkmsinstall 7 | -------------------------------------------------------------------------------- /kernel-clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This file is an adaptation of original script of itadicts, by Slimbook TEAM ( www.slimbook.es ) 4 | # LAST UPDATE : 27 April 2016 5 | 6 | # COMANDOS 7 | OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}') 8 | CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g') 9 | LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)" 10 | METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)" 11 | OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL) 12 | 13 | # COLORES 14 | AMARILLO="\033[1;33m" 15 | ROJO="\033[0;31m" 16 | COLORFIN="\033[0m" 17 | 18 | # PROCESOS 19 | if [ $USER != root ]; then 20 | echo -e $ROJO"Error: se debe ejecutar como root" 21 | echo -e $AMARILLO"Saliendo..."$COLORFIN 22 | exit 0 23 | fi 24 | 25 | echo -e "Limpiando la cache apt..." 26 | apt-get -qq clean 27 | 28 | echo -e "Eliminando viejos ficheros de configuracion..." 29 | sudo apt-get -qq purge $OLDCONF 30 | 31 | echo -e "Eliminando viejos kernels..." 32 | sudo apt-get -qq purge $OLDKERNELS 33 | 34 | echo -e "Eliminando los residuos..." 35 | rm -rf /root/.local/share/Trash/*/** &> /dev/null 36 | 37 | echo -e "Actualizando el cargador de arranque..." 38 | update-grub 39 | 40 | apt-get install linux-generic -y 41 | 42 | echo -e "Script ejecutado correctamente" 43 | -------------------------------------------------------------------------------- /slimbook-brightness-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SLIMBOOK TEAM 3 | # RNM 23/06/2017 4 | # We found a bug that cause the brightness at login screen and desktop 5 | # on Antergos reset, its only when we restart the computer at max bright 6 | # Comment the lines that is not your OS 7 | # By default the KDE lines are commented 8 | BRG=$(cat /sys/class/backlight/intel_backlight/brightness) 9 | # Antergos 10 | if [ $BRG -ge 900 ]; then 11 | echo 891 > /sys/class/backlight/intel_backlight/brightness 12 | elif [ $BRG -le 50 ]; then 13 | echo 93 > /sys/class/backlight/intel_backlight/brightness 14 | fi 15 | # KDE 16 | #if [ $BRG -ge 900 ]; then 17 | # echo 890 > /sys/class/backlight/intel_backlight/brightness 18 | #elif [ $BRG -le 50 ]; then 19 | # echo 94 > /sys/class/backlight/intel_backlight/brightness 20 | #fi 21 | -------------------------------------------------------------------------------- /slimbook-hello: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Instructions: 4 | # open a terminal and run: 5 | # sudo wget https://raw.githubusercontent.com/Slimbook-Team/slimbook/master/slimbook-hello -P /usr/bin && sudo chmod +x /usr/bin/slimbook-hello 6 | # Exec 7 | # slimbook-hello 8 | 9 | printf " 10 | ███████ ██ ██ ███ ███ ██████ ███████ ███████ ██ ██ 11 | ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ ██ 12 | ██████ ██ ██ ██ ████ ██ ██████ ██ ██ ██ ██ █████ 13 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 14 | ███████ ███████ ██ ██ ██ ██████ ███████ ███████ ██ ██ 15 | " 16 | lsb_release -ar 2>/dev/null 17 | echo "Kernel version: $(uname -r)" 18 | echo "Session type: $XDG_SESSION_TYPE" 19 | 20 | echo 21 | 22 | free -h 23 | 24 | echo 25 | 26 | lsblk /dev/sd* 2>/dev/null 27 | lsblk /dev/nvme* 2>/dev/null 28 | 29 | 30 | echo 31 | echo "Feel free to contribute with this code at https://github.com/Slimbook-Team/slimbook/blob/master/slimbook-hello to make this script look even better ;)" 32 | -------------------------------------------------------------------------------- /testing/drivers-3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | model(){ # Ciertos modelos necesitan el controlador qc71 3 | if [ "$(grep -E 'Prox|Executive|Titan|Hero|EVO|CREA' /sys/class/dmi/id/product_name)" ]; then 4 | eval "$1" 5 | fi 6 | if [ $(grep EVO /sys/class/dmi/id/product_name) ]; then 7 | eval "$2" 8 | fi 9 | if [ $(grep -E 'EVO|CREA') ] && [ ! $(grep wake /etc/default/grub) ]; then 10 | valor_actual=$(grep '^GRUB_CMDLINE_LINUX="' /etc/default/grub | cut -d'"' -f2) 11 | sed -i "s/^GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"${valor_actual} acpi.ec_no_wakeup=1\"/" /etc/default/grub 12 | eval "$3" 13 | fi 14 | } 15 | 16 | gpu(){ # Los modelos con gráfica dedicada de Nvidia requiren controladores adicionales 17 | if [ "$(lspci | grep VGA | grep -E 'NVIDIA|nvidia' | grep -E "$1")" ]; then 18 | eval "$3" # Gráfica Nvidia MX250 19 | elif [ "$(lspci | grep VGA | grep -E 'NVIDIA|nvidia' | grep -E '3050|3070')" ]; then 20 | eval "$2" # Gráficas Nvidia RTX 3050 y Nvidia RTX 3070 21 | elif [ "$(lspci | grep VGA | grep -E 'NVIDIA|nvidia')" ]; then 22 | eval "$1" # Cualquier gráfica Nvidia 23 | fi 24 | } 25 | 26 | desktop(){ # Se instala en algunas distribuciones el meta paquete para Gnome y Plasma 27 | case $XDG_SESSION_DESKTOP in 28 | GNOME|gnome) $1 install slimbook-meta-gnome -y 29 | gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com ;; # Con escritorio GNOME 30 | KDE|kde) $1 install slimbook-meta-plasma -y ;; # Con escritorio KDE 31 | esac 32 | } 33 | 34 | if [ ! "$UID" = "0" ]; then # Comprueba si se esta usando sudo o root 35 | echo Error: Debe usar sudo o root.; exit 36 | fi 37 | 38 | case $1 in 39 | model) model;; 40 | gpu) gpu;; 41 | desktop) desktop;; 42 | esac 43 | 44 | if [ $(command -v "apt") ]; then # Ubuntu 45 | if [ "$(grep Name="SlimbookOS" /etc/os-release)" ]; then # && [ "$(grep 24 /etc/os-release)" ]; then 46 | echo SlimbookOS # SlimbookOS 47 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 22 /etc/os-release)" ]; then 48 | echo Ubuntu 22 # Ubuntu 22 49 | add-apt-repository ppa:slimbook/slimbook 50 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 24 /etc/os-release)" ]; then 51 | echo Ubuntu 24 # Ubuntu 24 52 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 53 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 54 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 55 | mv -f slimbook.list /etc/apt/sources.list.d 56 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 12 /etc/os-release)" ] || \ 57 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 5 /etc/os-release)" ]; then 58 | echo Debian 12 # Debian 12 y Devuan 5 59 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE80F1EEB3838E61E42091B378A22399981017FC 60 | echo 'deb https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main 61 | deb-src https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main' > slimbook.list 62 | mv -f slimbook.list /etc/apt/sources.list.d 63 | apt install bash-completion -y 64 | desktop apt 65 | [ ! "$(grep completion ~/.bashrc)" ] && \ 66 | echo "if ! shopt -oq posix; then 67 | if [ -f /usr/share/bash-completion/bash_completion ]; then 68 | . /usr/share/bash-completion/bash_completion 69 | elif [ -f /etc/bash_completion ]; then 70 | . /etc/bash_completion 71 | fi 72 | fi" >> .bashrc 73 | gpu "apt install nvidia-driver -y" "apt install nvidia-driver-550-open -y" "apt install nvidia-driver-470 -y" 74 | 75 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 13 /etc/os-release)" ] || \ 76 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 6 /etc/os-release)" ]; then 77 | echo Debian 13 # Debian 13 y Devuan 6 78 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 79 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 80 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 81 | mv -f slimbook.list /etc/apt/sources.list.d 82 | desktop apt 83 | fi 84 | apt update 85 | apt install slimbook-service -y 86 | model "apt install linux-headers-amd64 slimbook-qc71-dkms -y" "apt install slimbook-yt6801-dkms -y" "update-grub" 87 | 88 | elif [ $(command -v "pacman") ]; then # Manjaro 89 | gpu "mhwd -a pci nonfree 0300" 90 | model "pacman -S slimbook-qc71-dkms linux-headers-meta dkms --noconfirm" "pamac install tuxedo-yt6801-dkms-git --no-confirm" "grub-mkconfig -o /boot/grub/grub.cfg" 91 | pacman -Syyuu slimbook_service python-dateutils --noconfirm 92 | 93 | elif [ $(command -v "dnf") ]; then # Fedora 94 | if [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 42 /etc/os-release) ]; then 95 | echo Fedora 42 # Fedora 42 96 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_42/home:Slimbook.repo 97 | dnf update -y --refresh 98 | elif [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 41 /etc/os-release) ]; then 99 | echo Fedora 41 # Fedora 41 100 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_41/home:Slimbook.repo 101 | dnf update -y --refresh 102 | fi 103 | desktop dnf 104 | dnf install slimbook-service 105 | model "dnf install slimbook-qc71-kmod slimbook-qc71-kmod-common -y" 106 | gpu "dnf install akmod-nvidia" 107 | grub 108 | 109 | elif [ $(command -v "zypper") ]; then # OpenSUSE 110 | zypper ar -f https://download.opensuse.org/repositories/home:/Slimbook/openSUSE_Tumbleweed/ slimbook 111 | zypper install slimbook-service -y 112 | model "zypper install slimbook-qc71-kmp -y" 113 | desktop zypper 114 | gpu "zypper install openSUSE-repos-Tumbleweed-NVIDIA -y && zypper install-new-recommends --repo repo-non-free -y" 115 | grub 116 | 117 | fi 118 | -------------------------------------------------------------------------------- /testing/drivers-4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | qc71="Prox|Executive|Titan|Hero|EVO|CREA" 3 | yt6801="EVO" 4 | ecnowakeup="EVO|CREA" 5 | 6 | model(){ # Ciertos modelos necesitan el controlador qc71 7 | if [ "$(grep -E "$1" /sys/class/dmi/id/product_name)" ]; then 8 | eval "$2" 9 | fi 10 | } 11 | 12 | grub(){ # Algunos modelos necesitan parámetros para que funcionen correctamente 13 | if [ $(grep -E "$1") ] && [ ! $(grep wake /etc/default/grub) ]; then 14 | cmdline_actual=$(grep '^GRUB_CMDLINE_LINUX="' /etc/default/grub | cut -d'"' -f2) 15 | sed -i "s/^GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"${cmdline_actual} acpi.ec_no_wakeup=1\"/" /etc/default/grub 16 | eval "$2" 17 | fi 18 | } 19 | 20 | gpu(){ # Los modelos con gráfica dedicada de Nvidia requiren controladores adicionales 21 | if [ "$(lspci | grep VGA | grep -E 'NVIDIA|nvidia' | grep -E "$1")" ]; then 22 | eval "$2" # Gráfica Nvidia 23 | fi 24 | } 25 | 26 | desktop(){ # Se instala en algunas distribuciones el meta paquete para Gnome y Plasma 27 | case $XDG_SESSION_DESKTOP in 28 | GNOME|gnome) $1 install slimbook-meta-gnome -y 29 | gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com ;; # Con escritorio GNOME 30 | KDE|kde) $1 install slimbook-meta-plasma -y ;; # Con escritorio KDE 31 | esac 32 | } 33 | 34 | if [ ! "$UID" = "0" ]; then # Comprueba si se esta usando sudo o root 35 | echo Error: Debe usar sudo o root.; exit 36 | fi 37 | 38 | case $1 in 39 | model) model;; 40 | gpu) gpu;; 41 | desktop) desktop;; 42 | grub) grub;; 43 | esac 44 | 45 | if [ $(command -v "apt") ]; then # Ubuntu 46 | if [ "$(grep Name="SlimbookOS" /etc/os-release)" ]; then # && [ "$(grep 24 /etc/os-release)" ]; then 47 | echo SlimbookOS # SlimbookOS 48 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 22 /etc/os-release)" ]; then 49 | echo Ubuntu 22 # Ubuntu 22 50 | add-apt-repository ppa:slimbook/slimbook 51 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 24 /etc/os-release)" ]; then 52 | echo Ubuntu 24 # Ubuntu 24 53 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 54 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 55 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 56 | mv -f slimbook.list /etc/apt/sources.list.d 57 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 12 /etc/os-release)" ] || \ 58 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 5 /etc/os-release)" ]; then 59 | echo Debian 12 # Debian 12 y Devuan 5 60 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE80F1EEB3838E61E42091B378A22399981017FC 61 | echo -e 'deb https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main\n# deb-src https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main' > slimbook.list 62 | mv -f slimbook.list /etc/apt/sources.list.d 63 | apt install bash-completion -y 64 | desktop apt 65 | [ ! "$(grep completion ~/.bashrc)" ] && \ 66 | echo "if ! shopt -oq posix; then 67 | if [ -f /usr/share/bash-completion/bash_completion ]; then 68 | . /usr/share/bash-completion/bash_completion 69 | elif [ -f /etc/bash_completion ]; then 70 | . /etc/bash_completion 71 | fi 72 | fi" >> .bashrc 73 | gpu "250" "apt install nvidia-driver-470 -y" 74 | gpu "3050|3070" "apt install nvidia-driver-550-open -y" 75 | gpu " otra " "apt install nvidia-driver -y" 76 | 77 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 13 /etc/os-release)" ] || \ 78 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 6 /etc/os-release)" ]; then 79 | echo Debian 13 # Debian 13 y Devuan 6 80 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 81 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 82 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 83 | mv -f slimbook.list /etc/apt/sources.list.d 84 | desktop apt 85 | fi 86 | apt update 87 | apt install slimbook-service -y 88 | model "$yt6801" "apt install slimbook-yt6801-dkms -y" 89 | model "$qc71" "apt install linux-headers-amd64 slimbook-qc71-dkms -y" 90 | grub "$ecnowakeup" "update-grub" 91 | 92 | elif [ $(command -v "pacman") ]; then # Manjaro 93 | gpu "" "mhwd -a pci nonfree 0300" 94 | model "pacman -S slimbook-qc71-dkms linux-headers-meta dkms --noconfirm" 95 | model "pamac install tuxedo-yt6801-dkms-git --no-confirm" 96 | grub "$ecnowakeup" "grub-mkconfig -o /boot/grub/grub.cfg" 97 | pacman -Syyuu slimbook_service python-dateutils --noconfirm 98 | 99 | elif [ $(command -v "dnf") ]; then # Fedora 100 | if [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 42 /etc/os-release) ]; then 101 | echo Fedora 42 # Fedora 42 102 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_42/home:Slimbook.repo 103 | dnf update -y --refresh 104 | elif [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 41 /etc/os-release) ]; then 105 | echo Fedora 41 # Fedora 41 106 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_41/home:Slimbook.repo 107 | dnf update -y --refresh 108 | fi 109 | desktop dnf 110 | dnf install slimbook-service 111 | model "$yt6801" "dnf install slimbook-yt6801-kmod -y" 112 | model "$qc71" "dnf install slimbook-qc71-kmod slimbook-qc71-kmod-common -y" 113 | gpu " otro " "dnf install akmod-nvidia" 114 | grub "$ecnowakeup" "grub2-mkconfig -o /boot/grub2/grub.cfg" 115 | 116 | elif [ $(command -v "zypper") ]; then # OpenSUSE 117 | zypper ar -f https://download.opensuse.org/repositories/home:/Slimbook/openSUSE_Tumbleweed/ slimbook 118 | zypper install slimbook-service -y 119 | model "zypper install slimbook-yt6801-kmod -y" 120 | model "zypper install slimbook-qc71-kmp -y" 121 | desktop zypper 122 | gpu " otro " "zypper install openSUSE-repos-Tumbleweed-NVIDIA -y && zypper install-new-recommends --repo repo-non-free -y" 123 | grub "$ecnowakeup" "grub2-mkconfig -o /boot/grub2/grub.cfg" 124 | 125 | fi 126 | -------------------------------------------------------------------------------- /testing/drivers-5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | model(){ # Ciertos modelos necesitan el controlador qc71 4 | if [ "$(grep -E "$1" /sys/class/dmi/id/product_name)" ]; then 5 | eval "$2" 6 | fi 7 | } 8 | 9 | grub(){ # Algunos modelos necesitan parámetros para que funcionen correctamente 10 | if [ $(grep -E "$1") ] && [ ! $(grep wake /etc/default/grub) ]; then 11 | cmdline_actual=$(grep '^GRUB_CMDLINE_LINUX="' /etc/default/grub | cut -d'"' -f2) 12 | sed -i "s/^GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"${cmdline_actual} acpi.ec_no_wakeup=1\"/" /etc/default/grub 13 | eval "$2" 14 | fi 15 | } 16 | 17 | gpu(){ # Los modelos con gráfica dedicada de Nvidia requiren controladores adicionales 18 | if [ "$(lspci | grep VGA | grep -E 'NVIDIA|nvidia' | grep -E "$1")" ]; then 19 | eval "$2" # Gráfica Nvidia 20 | fi 21 | } 22 | 23 | desktop(){ # Se instala en algunas distribuciones el meta paquete para Gnome y Plasma 24 | case $XDG_SESSION_DESKTOP in 25 | GNOME|gnome) $1 install slimbook-meta-gnome -y 26 | gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com ;; # Con escritorio GNOME 27 | KDE|kde) $1 install slimbook-meta-plasma -y ;; # Con escritorio KDE 28 | esac 29 | } 30 | 31 | if [ ! "$UID" = "0" ]; then # Comprueba si se esta usando sudo o root 32 | echo Error: Debe usar sudo o root.; exit 33 | fi 34 | 35 | case $1 in 36 | model) model;; 37 | gpu) gpu;; 38 | desktop) desktop;; 39 | grub) grub;; 40 | esac 41 | 42 | if [ $(command -v "apt") ]; then # Ubuntu 43 | if [ "$(grep Name="SlimbookOS" /etc/os-release)" ]; then # && [ "$(grep 24 /etc/os-release)" ]; then 44 | echo SlimbookOS # SlimbookOS 45 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 22 /etc/os-release)" ]; then 46 | echo Ubuntu 22 # Ubuntu 22 47 | add-apt-repository ppa:slimbook/slimbook 48 | elif [ "$(grep ID=Ubuntu /etc/os-release)" ] && [ "$(grep 24 /etc/os-release)" ]; then 49 | echo Ubuntu 24 # Ubuntu 24 50 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 51 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 52 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 53 | mv -f slimbook.list /etc/apt/sources.list.d 54 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 12 /etc/os-release)" ] || \ 55 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 5 /etc/os-release)" ]; then 56 | echo Debian 12 # Debian 12 y Devuan 5 57 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE80F1EEB3838E61E42091B378A22399981017FC 58 | echo -e 'deb https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main\n# deb-src https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main' > slimbook.list 59 | mv -f slimbook.list /etc/apt/sources.list.d 60 | apt install bash-completion -y 61 | desktop apt 62 | if [ ! "$(grep completion ~/.bashrc)" ]; then 63 | echo "# SLIMBOOK_INICIO 64 | if ! shopt -oq posix; then 65 | if [ -f /usr/share/bash-completion/bash_completion ]; then 66 | . /usr/share/bash-completion/bash_completion 67 | elif [ -f /etc/bash_completion ]; then 68 | . /etc/bash_completion 69 | fi 70 | fi" >> ~/.bashrc 71 | else 72 | echo "# SLIMBOOK_INICIO" >> ~/.bashrc 73 | fi 74 | 75 | gpu "250" "apt install nvidia-driver-470 -y" 76 | gpu "3050|3070" "apt install nvidia-driver-550-open -y" 77 | gpu " otra " "apt install nvidia-driver -y" 78 | 79 | elif [ "$(grep ID=Debian /etc/os-release)" ] && [ "$(grep 13 /etc/os-release)" ] || \ 80 | [ "$(grep ID=devuan /etc/os-release)" ] && [ "$(grep 6 /etc/os-release)" ]; then 81 | echo Debian 13 # Debian 13 y Devuan 6 82 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/sources/slimbook.list 83 | wget https://raw.githubusercontent.com/Slimbook-Team/slimbook-base-files/main/keys/slimbook.gpg 84 | mv -f slimbook.gpg /etc/apt/trusted.gpg.d 85 | mv -f slimbook.list /etc/apt/sources.list.d 86 | desktop apt 87 | fi 88 | apt update 89 | apt install slimbook-service -y 90 | model "EVO" "apt install slimbook-yt6801-dkms -y" 91 | model "Prox|Executive|Titan|Hero|EVO|CREA" "apt install linux-headers-amd64 slimbook-qc71-dkms -y" 92 | grub "EVO|CREA" "update-grub" 93 | 94 | elif [ $(command -v "pacman") ]; then # Manjaro 95 | gpu "" "mhwd -a pci nonfree 0300" 96 | model "pacman -S slimbook-qc71-dkms linux-headers-meta dkms --noconfirm" 97 | model "pamac install tuxedo-yt6801-dkms-git --no-confirm" 98 | grub "EVO|CREA" "grub-mkconfig -o /boot/grub/grub.cfg" 99 | pacman -Syyuu slimbook_service python-dateutils --noconfirm 100 | 101 | elif [ $(command -v "dnf") ]; then # Fedora 102 | if [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 42 /etc/os-release) ]; then 103 | echo Fedora 42 # Fedora 42 104 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_42/home:Slimbook.repo 105 | dnf update -y --refresh 106 | elif [ $(grep ID=Fedora /etc/os-release) ] && [ $(grep 41 /etc/os-release) ]; then 107 | echo Fedora 41 # Fedora 41 108 | dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Slimbook/Fedora_41/home:Slimbook.repo 109 | dnf update -y --refresh 110 | fi 111 | desktop dnf 112 | dnf install slimbook-service 113 | model "EVO" "dnf install slimbook-yt6801-kmod -y" 114 | model "Prox|Executive|Titan|Hero|EVO|CREA" "dnf install slimbook-qc71-kmod -y" 115 | gpu " otro " "dnf install akmod-nvidia" 116 | grub "EVO|CREA" "grub2-mkconfig -o /boot/grub2/grub.cfg" 117 | 118 | elif [ $(command -v "zypper") ]; then # OpenSUSE 119 | zypper ar -f https://download.opensuse.org/repositories/home:/Slimbook/openSUSE_Tumbleweed/ slimbook 120 | zypper install slimbook-service -y 121 | model "zypper install slimbook-yt6801-kmod -y" 122 | model "zypper install slimbook-qc71-kmp -y" 123 | desktop zypper 124 | gpu " otro " "zypper install openSUSE-repos-Tumbleweed-NVIDIA -y && zypper install-new-recommends --repo repo-non-free -y" 125 | grub "EVO|CREA" "grub2-mkconfig -o /boot/grub2/grub.cfg" 126 | 127 | fi 128 | -------------------------------------------------------------------------------- /testing/readme.md: -------------------------------------------------------------------------------- 1 | only for testing 2 | -------------------------------------------------------------------------------- /testing/slimbook-sleep-9.0: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case "$1" in 4 | pre) 5 | /usr/bin/slimbookctl config-store 6 | ;; 7 | post) 8 | /usr/bin/slimbookctl config-load 9 | if [ "$(slimbookctl info | grep family | cut -d ":" -f 2)" = "creative" ] || [ "$(grep CREA /sys/class/dmi/id/product_name)" ]; then 10 | echo Creative model detected 11 | if [ "$(dmesg --level err | tail -3 | grep "atkbd")" ]; then 12 | echo serio0 > /sys/bus/serio/drivers/atkbd/unbind 13 | if [ $( command -v "screen") ]; then 14 | echo screen used 15 | screen -dmS keyboard systemctl su 16 | else 17 | echo Install screen 18 | fi 19 | echo Keyboard: Fixed 20 | else 21 | echo Keyboard: Ok 22 | fi 23 | fi 24 | ;; 25 | esac 26 | 27 | exit 0 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /wireless-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This file is an adaptation by Slimbook TEAM ( www.slimbook.es ) 4 | # LAST UPDATE : 31 March 2016 5 | # This scrript work fine with ubuntu laptops with intel wifi drivers, and other laptops with other brands wifi cards 6 | 7 | # 8 | # Copyright (c) 2012 9 | # 10 | # Authors: Wild Man, Krytarik 11 | # Helpers: chili555 12 | # 13 | # This script gathers the infos necessary for troubleshooting a wireless 14 | # connection and saves them in a text file, wrapping it in an archive if it 15 | # exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums. 16 | # 17 | ############################################################################## 18 | # 19 | # This program is free software: you can redistribute it and/or modify 20 | # it under the terms of the GNU General Public License as published by 21 | # the Free Software Foundation, either version 3 of the License, or 22 | # (at your option) any later version. 23 | # 24 | # This program is distributed in the hope that it will be useful, 25 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | # GNU General Public License for more details. 28 | # 29 | # You should have received a copy of the GNU General Public License 30 | # along with this program. If not, see . 31 | # 32 | 33 | SCRIPTDATE="2016-03-31 20:34 +0200" 34 | FILEBASE="wireless-info" 35 | OUTPUTDIR="$PWD" 36 | OUTPUTDIRFB="/tmp" 37 | 38 | MODMATCHES="(air|ar5|at7|ath[^3]?|b43|bcma|brcm|carl|ipw|iwl|ndis|r(818|8192[eu]|871|92su)|rt[23567]|rtl|ssb|wl|(cfg|mac)80211)" 39 | LSMODMATCHES="(wmi|(dell|ideapad)[-_]laptop)" 40 | IFACEMATCHES="(wlan[0-9]|eth[0-9])" 41 | DMESGMATCHES="(firmware|[nN]etwork)" 42 | NMPROFMATCHES="\(\[connection\]\|id=\|type=\|permissions=\|autoconnect=\|\[802-11-wireless\]\|\[wifi\]\|ssid=\|bssid=\|mac-address\(-blacklist\)\?=\|mtu=\|\[802-1x\]\|[[:graph:]]*ca-certs\?=\|\[ipv[46]\]\|method=\)" 43 | 44 | DMESGEXCL="apparmor|(cfg|mac)80211" 45 | MODINFOEXCL="alias" 46 | MODPROBEXCL="(alsa-base|blacklist-(firewire|framebuffer|modem|oss|watchdog)|fglrx|nvidia|fbdev|bumblebee)" 47 | PMUTILSEXCL="/etc/pm/(power.d/(95hdparm-apm|intel-audio-powersave|sata_alpm)|sleep.d/(10_grub-common|10_unattended-upgrades.*|novatel_3g.*))" 48 | 49 | NETMGRNAMES=("NetworkManager" "Wicd" "ConnMan") 50 | NETMGRPATHS=("/usr/sbin/NetworkManager" "/usr/sbin/wicd" "/usr/sbin/connmand") 51 | DEC2BI=({0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}) 52 | DEC2HEX=($(printf "%02x " {0..255})) 53 | 54 | export LANG="en_US.UTF-8" 55 | export LANGUAGE="en_US:en" 56 | export LC_ALL="en_US.UTF-8" 57 | 58 | if [ -t 0 ]; then 59 | DIALOGAPP="terminal" 60 | DIALOGBREAK=" " 61 | TERMOUT="yes" 62 | elif [ -x /usr/bin/zenity ]; then 63 | DIALOGAPP="zenity" 64 | DIALOGBREAK="\n" 65 | elif [ -x /usr/bin/kdialog ]; then 66 | DIALOGAPP="kdialog" 67 | DIALOGBREAK="\n" 68 | else 69 | exit 1 70 | fi 71 | 72 | if [ -t 0 ]; then 73 | SUDO="sudo" 74 | elif [ -x /usr/bin/pkexec ]; then 75 | SUDO="pkexec" 76 | elif [ -x /usr/bin/gksudo ]; then 77 | SUDO="gksudo" 78 | GKSUDO="yes" 79 | elif [ -x /usr/bin/kdesudo ]; then 80 | SUDO="kdesudo" 81 | KDESUDO="yes" 82 | KDESUDOCMT=" needs administrative privileges. Please enter your password." 83 | fi 84 | 85 | dialog_info () { 86 | case $DIALOGAPP in 87 | terminal) 88 | printf "%b\n" "$1" 89 | ;; 90 | zenity) 91 | zenity --info --text="$1" 92 | ;; 93 | kdialog) 94 | kdialog --msgbox "$1" 95 | ;; 96 | esac 97 | } 98 | 99 | dialog_error () { 100 | case $DIALOGAPP in 101 | terminal) 102 | printf "%b\n" "$1" >&2 103 | ;; 104 | zenity) 105 | zenity --error --text="$1" 106 | ;; 107 | kdialog) 108 | kdialog --error "$1" 109 | ;; 110 | esac 111 | } 112 | 113 | dialog_question () { 114 | case $DIALOGAPP in 115 | terminal) 116 | local INPUT 117 | read -r -p "$1 [Y/n]: " INPUT 118 | echo "${INPUT,,}" 119 | ;; 120 | zenity) 121 | zenity --question --text="$1" || echo "no" 122 | ;; 123 | kdialog) 124 | kdialog --yesno "$1" || echo "no" 125 | ;; 126 | esac 127 | } 128 | 129 | ip6-mac () { 130 | for MAC in "$@"; do 131 | OCT1BI=${DEC2BI[0x${MAC:0:2}]} 132 | OCT1BI7=$((${OCT1BI:6:1} - 1)) 133 | OCT1BIM="${OCT1BI:0:6}${OCT1BI7#-}${OCT1BI:7}" 134 | IP6S+=${IP6S:+$'\n'}"${DEC2HEX[2#$OCT1BIM]}${MAC:3:2}:${MAC:6:2}ff:fe${MAC:9:2}:${MAC:12:2}${MAC:15:2}" 135 | done 136 | sed 's/\(^\|:\)0\+\([[:alnum:]]\)/\1\2/g;s/^\([0:]\+\)/\\(::\\|\1\\)/' <<< "$IP6S" 137 | } 138 | 139 | exec 3>&1 4>&2 140 | exec 1> "$OUTPUTDIR/$FILEBASE.txt" || { 141 | dialog_error "${TERMOUT+\n}Cannot write output file in \"$OUTPUTDIR\",${DIALOGBREAK}trying in \"$OUTPUTDIRFB\" instead.${TERMOUT+\n}" 142 | OUTPUTDIR="$OUTPUTDIRFB" 143 | exec 1> "$OUTPUTDIR/$FILEBASE.txt" || { 144 | dialog_error "${TERMOUT+\n}Cannot write output file in \"$OUTPUTDIR\" either, aborting.${TERMOUT+\n}" 145 | exit 1 146 | } 147 | } 148 | exec 2>&1 149 | 150 | printf "\n#### SLIMBOOK TEAM (www.slimbook.es) ####" 151 | 152 | 153 | printf "\n##### wireless info START ###############\n\n" 154 | 155 | REPORTDATE=$(date +"%d %b %Y %H:%M %Z %z") 156 | SCRIPTDATE=$(date -u -d "$SCRIPTDATE" +"%d %b %Y %H:%M %Z %z") 157 | LASTBOOTDT=$(last -FRn 1 reboot | sed -n 's/.*system boot[ ]\+\(.\+\) - .*$/\1/p') 158 | LASTBOOTDT=$(date -d "$LASTBOOTDT" +"%d %b %Y %H:%M %Z %z") 159 | printf "Report from: %s\n\n" "$REPORTDATE" 160 | printf "Booted last: %s\n\n" "$LASTBOOTDT" 161 | printf "Script from: %s\n" "$SCRIPTDATE" 162 | 163 | printf "\n##### release ###########################\n\n" 164 | lsb_release -idrc 165 | 166 | printf "\n##### kernel ############################\n\n" 167 | uname -srvmpio 168 | echo 169 | sed 's/root=[^ ]*//;s/[ ]\+/, /g;s/^BOOT_IMAGE=[^ ]*/Parameters:/' /proc/cmdline 170 | 171 | printf "\n##### desktop ###########################\n\n" 172 | if [ -n "$DESKTOP_SESSION" ]; then 173 | DESKTOP="$DESKTOP_SESSION" 174 | else 175 | #DESKTOP=$(sed -n 's/^Session=\(.\+\)$/\1/p' "$HOME/.dmrc") 176 | #DESKDMRC=" (from ~/.dmrc)" 177 | #cambios por si ejecutamos script desde root y no tiene escritorio 178 | USUARIO=$(last -w -1 | head -1 | awk '{print $1}') 179 | #ejecutando comando como otro usuario 180 | RUTADMRC=$(su -c 'echo "$HOME/.dmrc"' - $USUARIO) 181 | DESKDMRC=$(su -c 'echo "$HOME/.dmrc"' - $USUARIO) 182 | DESKTOP=$(sed -n 's/^Session=\(.\+\)$/\1/p' $RUTADMRC) 183 | #echo "$DESKTOP" 184 | fi 185 | if [ -n "$DESKTOP" ]; then 186 | if [ -f "/usr/share/xsessions/$DESKTOP.desktop" ]; then 187 | DESKTOP=$(sed -n 's/^Name=\(.\+\)$/\1/p' "/usr/share/xsessions/$DESKTOP.desktop") 188 | fi 189 | echo "${DESKTOP/ Session/}${DESKDMRC}" 190 | else 191 | printf "\nCould not be determined.\n" 192 | fi 193 | 194 | printf "\n##### lspci #############################\n\n" 195 | lspci -nnk | grep -iA 2 '^[^[:space:]].*net' | sed '/^--$/d; /^[^[:space:]]/ i\\' 196 | 197 | printf "\n##### lsusb #############################\n\n" 198 | lsusb 199 | 200 | printf "\n##### PCMCIA card info ##################\n\n" 201 | if [ -x /sbin/pccardctl ]; then 202 | pccardctl info 203 | else 204 | echo "'pccardctl' is not installed (package \"pcmciautils\")." 205 | fi 206 | 207 | printf "\n##### rfkill ############################\n\n" 208 | rfkill list all 209 | 210 | printf "\n##### lsmod #############################\n\n" 211 | LSMOD=$(lsmod | egrep "(^|[[:punct:] ])($MODMATCHES|$LSMODMATCHES)[^[:punct:] ]*([[:punct:] ]|$)") 212 | echo "$LSMOD" 213 | 214 | printf "\n##### interfaces ########################\n\n" 215 | sed '/^#/d;s/^wpa-psk [[:graph:]]\+/wpa-psk /' /etc/network/interfaces 216 | 217 | printf "\n##### ifconfig ##########################\n\n" 218 | IFCONFIG=$(ifconfig -a) 219 | sed '/^lo /,/^$/d' <<< "$IFCONFIG" 220 | IFACESETH=($(sed -n 's/^\([^ ]\+\)[ ]\+Link encap:Ethernet.*/\1/p' <<< "$IFCONFIG")) 221 | if (( ${#IFACESETH[@]} > 0 )); then 222 | IFETHMATCHES=${IFACESETH[@]} 223 | IFACEMATCHES="($IFACEMATCHES|(${IFETHMATCHES// /|}))" 224 | fi 225 | 226 | printf "\n##### iwconfig ##########################\n\n" 227 | iwconfig 228 | 229 | printf "\n##### route #############################\n\n" 230 | route -n 231 | 232 | printf "\n##### resolv.conf #######################\n\n" 233 | grep -v '^#' /etc/resolv.conf 234 | 235 | printf "\n##### network managers ##################\n\n" 236 | printf "Installed:\n\n" 237 | for NETMGRNR in "${!NETMGRPATHS[@]}"; do 238 | if [ -f "${NETMGRPATHS[$NETMGRNR]}" ]; then 239 | NETMGRINST+=("${NETMGRNAMES[$NETMGRNR]}") 240 | fi 241 | done 242 | printf "\t%s\n" "${NETMGRINST[@]:-None found.}" 243 | NETMGRMATCHES=${NETMGRPATHS[@]/#*\//|} 244 | NETMGRMATCHES=${NETMGRMATCHES// |/|} 245 | NETMGRMATCHES="(${NETMGRMATCHES#|})" 246 | printf "\nRunning:\n\n" 247 | ps -ef | egrep "( |/)$NETMGRMATCHES($| )" || printf "\tNone found.\n" 248 | 249 | printf "\n##### NetworkManager info ###############\n\n" 250 | if [ -x /usr/bin/nm-tool ]; then 251 | nm-tool 252 | elif [ -x /usr/bin/nmcli ]; then 253 | nmcli -f all device show | sed '/^GENERAL.DEVICE:[ ]\+lo$/,/^$/d; /^AP\[[0-9]\+\]\./d' 254 | echo 255 | nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,ACTIVE,IN-USE device wifi list 256 | else 257 | echo "NetworkManager is not installed (package \"network-manager\")." 258 | fi 259 | 260 | printf "\n##### NetworkManager.state ##############\n\n" 261 | cat -s /var/lib/NetworkManager/NetworkManager.state 262 | 263 | printf "\n##### NetworkManager.conf ###############\n\n" 264 | grep -v '^#' /etc/NetworkManager/NetworkManager.conf 265 | if [ -f /etc/NetworkManager/nm-system-settings.conf ]; then 266 | printf "\nnm-system-settings.conf (used up to Ubuntu 10.04):\n\n" 267 | grep -v '^#' /etc/NetworkManager/nm-system-settings.conf 268 | fi 269 | 270 | printf "\n##### NetworkManager profiles ###########\n\n" 271 | if [ -d /etc/NetworkManager/system-connections ]; then 272 | if [ -n "$SUDO" ]; then 273 | trap "" 2 3 274 | NMPROFILES=$(find /etc/NetworkManager/system-connections -maxdepth 1 -type f -exec $SUDO${GKSUDO+ -D grep --}${KDESUDO+ -d --comment "grep$KDESUDOCMT" --} grep -vH '^$' {} +) && SUDOSUCCESS="yes" || SUDOSUCCESS="no" 275 | trap 2 3 276 | if [ "$SUDOSUCCESS" = "yes" ]; then 277 | ORIGIFS="$IFS" 278 | IFS=$'\n' 279 | for NMWLPRFFILE in $(sed -n 's/^\(.\+\):type=\(802-11-wireless\|wifi\).*$/\1/p' <<< "$NMPROFILES"); do 280 | NMWLPRFFLPERMS=$(stat -c "%a %U" "$NMWLPRFFILE") 281 | NMWLPROFILE=($(sed -n "s;^$NMWLPRFFILE:\($NMPROFMATCHES.*\)$;\1 |;p" <<< "$NMPROFILES")) 282 | NMWLPROFSOUT+="[[$NMWLPRFFILE]] ($NMWLPRFFLPERMS)"$'\n'"${NMWLPROFILE[@]}"$'\n\n' 283 | done 284 | IFS="$ORIGIFS" 285 | sed 's# | \[#\n\[#g;s#\] |#\]#g;s/ |$//' <<< "$NMWLPROFSOUT" | sed '/^\[[^]]*\]$/d' 286 | else 287 | printf "\nAcquisition of admin privileges failed.\n" 288 | fi 289 | else 290 | echo "No way to acquire admin privileges found." 291 | fi 292 | else 293 | echo "No NetworkManager profiles found." 294 | fi 295 | 296 | printf "\n##### iw reg get ########################\n\n" 297 | if [ -x /sbin/iw ]; then 298 | if IWREGGET=$(iw reg get 2>&1) && [ -f /etc/timezone ]; then 299 | REGION=$(cat /etc/timezone) 300 | printf "Region: %s (based on set time zone)\n\n" "$REGION" 301 | fi 302 | echo "$IWREGGET" 303 | else 304 | echo "'iw' is not installed (package \"iw\")." 305 | fi 306 | 307 | printf "\n##### iwlist channels ###################\n\n" 308 | if [ -x /sbin/iwlist ]; then 309 | iwlist chan 310 | else 311 | echo "'iwlist' is not installed (package \"wireless-tools\")." 312 | fi 313 | 314 | printf "\n##### iwlist scan #######################\n\n" 315 | if [ -x /sbin/iwlist ]; then 316 | if [ -n "$SUDO" ]; then 317 | trap "" 2 3 318 | IWLISTSCAN=$($SUDO${KDESUDO+ -d} iwlist scan) && SUDOSUCCESS="yes" || SUDOSUCCESS="no" 319 | trap 2 3 320 | if [ "$SUDOSUCCESS" = "yes" ]; then 321 | if [[ $IWLISTSCAN = *Frequency:* ]]; then 322 | printf "Channel occupancy:\n\n" 323 | grep '^[ ]*Frequency:' <<< "$IWLISTSCAN" | sort | uniq -c | sed 's/^[ ]\+\([ ][0-9]\+\)[ ]\+/ \1 APs on /' 324 | echo 325 | fi 326 | grep -v '^[ ]*IE: Unknown:' <<< "$IWLISTSCAN" 327 | else 328 | printf "\nAcquisition of admin privileges failed.\n" 329 | fi 330 | else 331 | echo "No way to acquire admin privileges found." 332 | fi 333 | else 334 | echo "'iwlist' is not installed (package \"wireless-tools\")." 335 | fi 336 | 337 | printf "\n##### module infos ######################\n\n" 338 | MODULES=$(egrep -o "^$MODMATCHES[^ ]*" <<< "$LSMOD") 339 | for MODULE in $MODULES; do 340 | MODINFO=$(modinfo $MODULE | egrep -v "^$MODINFOEXCL:") 341 | printf "[%s]\n%s\n\n" "$MODULE" "$MODINFO" 342 | done 343 | 344 | printf "\n##### module parameters #################\n\n" 345 | for MODULE in $MODULES; do 346 | if [ -d /sys/module/$MODULE/parameters ]; then 347 | MODPARAMS=$(grep -H '^[[:graph:]]' /sys/module/$MODULE/parameters/* | sed 's#^.*/##;s/:/: /') 348 | printf "[%s]\n%s\n\n" "$MODULE" "$MODPARAMS" 349 | fi 350 | done 351 | 352 | printf "\n##### /etc/modules ######################\n\n" 353 | grep -v '^#' /etc/modules 354 | 355 | printf "\n##### modprobe options ##################\n\n" 356 | for MODPROBEFILE in $(find /etc/modprobe.{conf,d} -name "*.conf" -regextype posix-egrep -not -regex ".*$MODPROBEXCL.*" 2> /dev/null | sort); do 357 | MODPROBEOPTS=$(egrep -v '^(#|$)' $MODPROBEFILE) 358 | if [ -n "$MODPROBEOPTS" ]; then 359 | printf "[%s]\n%s\n\n" "$MODPROBEFILE" "$MODPROBEOPTS" 360 | fi 361 | done 362 | 363 | printf "\n##### rc.local ##########################\n\n" 364 | grep -v '^#' /etc/rc.local 365 | 366 | printf "\n##### pm-utils ##########################\n\n" 367 | for PMUTILSFILE in $(find /etc/pm/*.d \( -type f -o -type l \) -regextype posix-egrep -not -regex "$PMUTILSEXCL" | sort); do 368 | PMUTFLCONT=$(egrep -v '^(#|$)' $PMUTILSFILE) 369 | if [ -n "$PMUTFLCONT" ]; then 370 | PMUTFLPERMS=$(stat -c "%a %U" $PMUTILSFILE) 371 | printf "[%s] (%s)\n%s\n\n" "$PMUTILSFILE" "$PMUTFLPERMS" "$PMUTFLCONT" 372 | fi 373 | done 374 | 375 | printf "\n##### udev rules ########################\n\n" 376 | for UDEVRLFILE in /etc/udev/rules.d/*net*.rules; do 377 | UDEVRULES=$(grep -B1 '^[^#]' $UDEVRLFILE | egrep -v '^(--)?$') 378 | if [ -n "$UDEVRULES" ]; then 379 | printf "[%s]\n%s\n\n" "$UDEVRLFILE" "$UDEVRULES" 380 | fi 381 | done 382 | 383 | printf "\n##### dmesg #############################\n\n" 384 | dmesg | tail -n 100 | egrep "[[:punct:] ]($MODMATCHES|$IFACEMATCHES|$DMESGMATCHES)[^[:punct:] ]*[[:punct:] ]" | egrep -v "$DMESGEXCL" | uniq -cf 2 | sed 's/^[ ]\+1[ ]\+//;s/^[ ]\+\([0-9]\+\)[ ]\+\(.\+\)$/\2 (repeated \1 times)/' 385 | 386 | printf "\n##### dmesg | grep iwl #############################\n\n" 387 | 388 | dmesg | grep iwl 389 | 390 | printf "\n##### dmesg | grep blue (of bluetooth or blueman or bluez) #############################\n\n" 391 | 392 | dmesg | grep blue 393 | 394 | printf "\n##### lspci -vvvv (list of controllers) #############################\n\n" 395 | 396 | sudo lspci -vvvv 397 | 398 | printf "\n########## wireless info END ############\n\n" 399 | 400 | exec 2>&4 4>&- 401 | exec 1>&3 3>&- 402 | 403 | ##### MAC address masking ##### 404 | 405 | RESULTS=$(cat -s "$OUTPUTDIR/$FILEBASE.txt")$'\n' 406 | 407 | ORIGIFS="$IFS" 408 | IFS=$'\n' 409 | 410 | IFACESIDS=($(sed -n "s/^\([^ ]\+\)[ ]\+.*HWaddr.*/'\1' [IF]/p" <<< "$IFCONFIG")) 411 | IFACESMACS=($(sed -n 's/^[^ ]\+[ ]\+.*HWaddr \([^ ]\+\)[ ]*/\1/p' <<< "$IFCONFIG")) 412 | IFACESIP6S=($(ip6-mac "${IFACESMACS[@]}")) 413 | 414 | WLAPSIWLIDS=($(sed -n "/^[ ]*Cell [0-9]\+/,/^[ ]*ESSID:/ {/^[ ]*Cell [0-9]\+/h; /^[ ]*ESSID:/ {H;g;s/^[ ]*Cell 0\?\([0-9]\+\).*ESSID:\"\(.*\)\"$/'\2' [AC\1]/p}}" <<< "$IWLISTSCAN")) 415 | WLAPSIWLMACS=($(sed -n 's/^[ ]*Cell [0-9]\+.*Address: \([^ ]\+\)/\1/p' <<< "$IWLISTSCAN")) 416 | WLAPSIWLIP6S=($(ip6-mac "${WLAPSIWLMACS[@]}")) 417 | 418 | WLAPSNMRAW=$(sed -n '/^##### NetworkManager info #####/,/^##### / {/^[ ]*Wireless Access Points/,/^$/ {/Wireless Access Points/d;s/^[ ]\+\*\?//;s/:[ ]\+/\t/;p}; /^SSID[ ]\+BSSID[ ]\+/,/^$/ {/^SSID[ ]\{2,\}BSSID[ ]\{2,\}/d;s/[ ]\{2,\}/\t/;p}}' <<< "$RESULTS") 419 | WLAPSNMIDS=($(awk -F '\t' '{printf "'\''%s'\'' [AN%d]\n", $1, NR}' <<< "$WLAPSNMRAW")) 420 | WLAPSNMMACS=($(grep -o '\([[:alnum:]]\{2\}:\)\{5\}[[:alnum:]]\{2\}' <<< "$WLAPSNMRAW")) 421 | WLAPSNMIP6S=($(ip6-mac "${WLAPSNMMACS[@]}")) 422 | 423 | IFS="$ORIGIFS" 424 | 425 | for IFACENR in "${!IFACESMACS[@]}"; do 426 | MACMASKSED+="s;${IFACESMACS[$IFACENR]};;I;" 427 | MACMASKSED+=" /${IFACESIP6S[$IFACENR]}/ s;${IFACESIP6S[$IFACENR]/#\\(::/\(};;I;" 428 | done 429 | 430 | for WLAPIWLNR in "${!WLAPSIWLMACS[@]}"; do 431 | MACMASKSED+="s;${WLAPSIWLMACS[$WLAPIWLNR]};;I;" 432 | MACMASKSED+=" /${WLAPSIWLIP6S[$WLAPIWLNR]}/ s;${WLAPSIWLIP6S[$WLAPIWLNR]/#\\(::/\(};;I;" 433 | done 434 | 435 | for WLAPNMNR in "${!WLAPSNMMACS[@]}"; do 436 | MACMASKSED+="s;${WLAPSNMMACS[$WLAPNMNR]};;I;" 437 | MACMASKSED+=" /${WLAPSNMIP6S[$WLAPNMNR]}/ s;${WLAPSNMIP6S[$WLAPNMNR]/#\\(::/\(};;I;" 438 | done 439 | 440 | sed "$MACMASKSED /\([[:alnum:]]\{2\}:\)\{6,\}/! s/\([[:alnum:]]\{2\}:\)\{5\}[[:alnum:]]\{2\}//" <<< "$RESULTS" > "$OUTPUTDIR/$FILEBASE.txt" 441 | 442 | ##### The End ##### 443 | 444 | dialog_info "${TERMOUT+\n}Resultados de los test guardados en la ruta \"$OUTPUTDIR/$FILEBASE.txt\".${TERMOUT+}" 445 | 446 | dialog_info "${TERMOUT+}Abriendo el archivo con tu editor gráfico por defecto. Si falla accede al fichero desde el explorador de archivos. ${TERMOUT+\n}" 447 | 448 | xdg-open $OUTPUTDIR/$FILEBASE.txt 449 | 450 | if (( $(stat -c %s "$OUTPUTDIR/$FILEBASE.txt") > 119968 )); then 451 | tar -czf "$OUTPUTDIR/$FILEBASE.tar.gz" -C "$OUTPUTDIR" "$FILEBASE.txt" && \ 452 | dialog_info "Results also archived in \"$OUTPUTDIR/$FILEBASE.tar.gz\",${DIALOGBREAK}as they exceed the 19.5 kB size limit for \".txt\" attachments${DIALOGBREAK}on the Ubuntu Forums.${TERMOUT+\n}" || \ 453 | dialog_error "Results exceed the 19.5 kB size limit for \".txt\" attachments${DIALOGBREAK}on the Ubuntu Forums, but archive could not be created.${TERMOUT+\n}" 454 | fi 455 | 456 | if [ -x /usr/bin/pastebin ] && ping -nc 3 -w 6 -i 0.2 paste.ubuntu.com > /dev/null 2>&1; then 457 | PASTEBIN=$(dialog_question "Do you also want to post them${DIALOGBREAK}to your default 'pastebinit' provider?") 458 | if [[ ! $PASTEBIN =~ ^no?$ ]]; then 459 | PASTERESULT=$(pastebinit -i "$OUTPUTDIR/$FILEBASE.txt" -f text 2>&1) && PASTESUCCESS="yes" 460 | if [ "$PASTESUCCESS" = "yes" ]; then 461 | dialog_info "${TERMOUT+\n}Pastebin successful:\n\n${PASTERESULT}${TERMOUT+\n}" 462 | else 463 | if [ -n "$PASTERESULT" ]; then 464 | dialog_error "${TERMOUT+\n}Pastebin failed, error message is:\n\n${PASTERESULT}${TERMOUT+\n}" 465 | else 466 | dialog_error "${TERMOUT+\n}Pastebin failed, no error message given.${TERMOUT+\n}" 467 | fi 468 | fi 469 | else 470 | echo 471 | fi 472 | fi 473 | --------------------------------------------------------------------------------