├── .devcontainer ├── Dockerfile ├── README.md ├── basic-dev-vnchost │ ├── Dockerfile │ ├── devcontainer.json │ └── library-scripts │ │ └── _doc │ │ └── deleteme ├── devcontainer.json └── library-scripts │ └── _doc │ └── deleteme ├── .gattributes ├── .github ├── FUNDING.yml └── workflows │ ├── _ref │ └── scrap.md │ ├── _removeTag-oldReleases.yml │ ├── _renameTag-build_to_internal.yml │ ├── _renameTag-internal_to_internal-date.yml │ ├── build.yml │ ├── factory-docker_push.yml │ ├── test.yml │ ├── zExperiment.yml │ └── zUpgrade.yml ├── .gitignore ├── .gitmodules ├── CC0_license.txt ├── README.html ├── README.md ├── README.pdf ├── README.sh ├── README.sh.out.txt ├── README_template_agpl.sh ├── README_template_gpl.sh ├── _anchor ├── _anchor.bat ├── _anchor_simple_winehere ├── _bash-core.bat ├── _bash.bat ├── _bash_bat_lnk.zip ├── _bin.bat ├── _bin ├── .ubrgbin.sh ├── MAKEDEV ├── dockerHello.tar ├── getIdle ├── gosu-amd64 ├── gosu-amd64.asc ├── gosu-armel ├── gosu-armel.asc ├── gosu-i386 ├── gosu-i386.asc ├── gosudev.asc └── hello ├── _call ├── _config ├── README.md └── _config │ ├── netvars.sh │ ├── netvars.sh.png │ └── netvars.sh.xml ├── _demand_broadcastPipe_page.bat ├── _diag └── data │ └── vmdkRawExample │ └── vmvdiraw.vmdk ├── _doc ├── equations-space │ └── README.sh ├── queue │ ├── broadcastPipe │ │ └── README.md │ └── database │ │ ├── input │ │ └── ops-db.sh └── virtualization │ ├── chroot │ └── mountchroot │ │ ├── mountchroot.pdf │ │ └── mountchroot.xoj │ └── image │ └── mountimage │ ├── mountimage.pdf │ └── mountimage.xoj ├── _false ├── _false.bat ├── _lib ├── _build-fallback-ops.sh ├── app │ ├── README.md │ ├── atom.disabled │ │ └── home │ │ │ ├── .atom │ │ │ └── .gitignore │ │ │ └── .config │ │ │ └── Atom │ │ │ └── deleteme │ └── emacs.moved │ │ ├── .emacs │ │ └── home │ │ └── emacs.d │ │ └── deleteme ├── daemon │ └── ethereum_mine │ │ ├── mine.desktop │ │ └── ops ├── desktop │ ├── README.md │ ├── fileAssociations │ │ ├── README.md │ │ ├── kate-dir.desktop │ │ └── kate-files.desktop │ ├── kwin-rules │ │ └── dev │ │ │ ├── 001-workaround-GNUoctave-ineffective.kwinrule │ │ │ ├── 005-workaround-GNUelectric-ineffective.kwinrule │ │ │ ├── 010-workaround-freecad_1.kwinrule │ │ │ ├── 011-workaround-freecad_2.kwinrule │ │ │ ├── 015-workaround-arduino.kwinrule │ │ │ ├── 200-optional-temp-opaque.kwinrule │ │ │ ├── 210-optional-gimp-opaque.kwinrule │ │ │ ├── 210-optional-obs-opaque.kwinrule │ │ │ ├── 220-optional-smplayer-opaque.kwinrule │ │ │ ├── 220-optional-vlc-opaque.kwinrule │ │ │ ├── 250-optional-audacious-custom.kwinrule │ │ │ ├── 300-tag-daemon-opaque.kwinrule │ │ │ ├── 300-tag-picturewidget-opaque.kwinrule │ │ │ ├── 300-tag-videowidget-opaque.kwinrule │ │ │ ├── 500-glass.kwinrule │ │ │ ├── 600-opaque.kwinrule │ │ │ ├── 800-daemon-xterm.kwinrule │ │ │ ├── 850-bypass-yakuake.kwinrule │ │ │ ├── 860-bypass-eclipse.kwinrule │ │ │ ├── 860-bypass-qemu.kwinrule │ │ │ ├── 860-bypass-vbox_1.kwinrule │ │ │ ├── 860-bypass-vbox_2.kwinrule │ │ │ ├── 860-bypass-vnc.kwinrule │ │ │ ├── README.md │ │ │ └── _ref │ │ │ ├── export │ │ │ ├── 001-workaround-GNUoctave-ineffective.kwinrule │ │ │ ├── 005-workaround-GNUelectric-ineffective.kwinrule │ │ │ ├── 010-workaround-freecad_1.kwinrule │ │ │ ├── 011-workaround-freecad_2.kwinrule │ │ │ ├── 015-workaround-arduino.kwinrule │ │ │ ├── 020-workaround-java-ineffective.kwinrule │ │ │ ├── 200-optional-temp-opaque.kwinrule │ │ │ ├── 210-optional-gimp-opaque.kwinrule │ │ │ ├── 210-optional-obs-opaque.kwinrule │ │ │ ├── 220-optional-smplayer-opaque.kwinrule │ │ │ ├── 220-optional-vlc-opaque.kwinrule │ │ │ ├── 250-optional-audacious-custom.kwinrule │ │ │ ├── 300-tag-daemon-opaque.kwinrule │ │ │ ├── 300-tag-picturewidget-opaque.kwinrule │ │ │ ├── 300-tag-videowidget-opaque.kwinrule │ │ │ ├── 500-glass.kwinrule │ │ │ ├── 600-opaque.kwinrule │ │ │ ├── 800-daemon-xterm.kwinrule │ │ │ ├── 850-bypass-yakuake.kwinrule │ │ │ ├── 860-bypass-eclipse.kwinrule │ │ │ ├── 860-bypass-qemu.kwinrule │ │ │ ├── 860-bypass-vbox_1.kwinrule │ │ │ ├── 860-bypass-vbox_2.kwinrule │ │ │ ├── 860-bypass-vnc.kwinrule │ │ │ ├── 970-optional-position-dolphinfilemanager.kwinrule │ │ │ ├── 971-optional-size-dolphinfilemanager-large.kwinrule │ │ │ ├── 972-optional-size-firefox-vertical.kwinrule │ │ │ └── 980-optional-size-default.kwinrule │ │ │ └── kwinrulesrc │ └── kwrite │ │ ├── Breeze Dark - Contrast.kateschema │ │ ├── Breeze Dark - Contrast.theme │ │ └── README.md ├── docker │ └── debian │ │ └── ubvrt │ │ └── Dockerfile ├── kit │ ├── README.md │ ├── all │ │ ├── .git-mandatory │ │ │ └── hooks │ │ │ │ ├── decompress_recompress.py │ │ │ │ └── pre-commit │ │ └── .gitignore │ ├── backup-github │ │ ├── backup-github.sh │ │ └── genisoimage.sh │ ├── containment │ │ └── _prog │ │ │ ├── core.sh │ │ │ ├── core.sh.png │ │ │ ├── core.sh.xml │ │ │ ├── generate_bash_prog.sh │ │ │ ├── installation_prog.sh │ │ │ └── program.sh │ ├── install │ │ ├── cloud │ │ │ ├── cloud-init │ │ │ │ ├── direct │ │ │ │ │ ├── _user │ │ │ │ │ │ └── mirage335 │ │ │ │ │ │ │ └── cloud-config-errata.cfg │ │ │ │ │ ├── debian11 │ │ │ │ │ │ └── cloud-config.cfg │ │ │ │ │ └── ubuntu20 │ │ │ │ │ │ └── cloud-config.cfg │ │ │ │ └── zRotten │ │ │ │ │ ├── debian11 │ │ │ │ │ └── deleteme │ │ │ │ │ ├── id_rsa_nologin_bogus.pub │ │ │ │ │ ├── specialized │ │ │ │ │ └── croc │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── cloud-config.cfg │ │ │ │ │ │ ├── rotten_install.sh │ │ │ │ │ │ └── rotten_install_compressed.sh │ │ │ │ │ └── zMinimal │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── README.md │ │ │ │ │ ├── WARNING-dependency.txt │ │ │ │ │ ├── cloud-config.cfg │ │ │ │ │ ├── rotten_install.sh │ │ │ │ │ └── rotten_install_compressed.sh │ │ │ └── zSpecial │ │ │ │ └── msw │ │ │ │ └── build_ubcp │ │ │ │ └── build_ubcp_powershell.ps1 │ │ └── distro │ │ │ └── debian │ │ │ └── README.md │ ├── mod │ │ ├── _anchor │ │ ├── _lib │ │ │ ├── app │ │ │ │ └── udev │ │ │ │ │ └── rules │ │ │ │ │ └── deleteme │ │ │ └── modules │ │ │ │ ├── _ref │ │ │ │ └── README.md │ │ │ │ ├── overlay │ │ │ │ └── deleteme │ │ │ │ └── splice │ │ │ │ └── gitdiff │ │ │ │ └── deleteme │ │ ├── _prog │ │ │ ├── core.sh │ │ │ ├── generate_bash_prog.sh │ │ │ ├── installation_prog.sh │ │ │ └── specglobalvars.sh │ │ ├── _ubdb │ │ └── _ubide │ ├── raspi │ │ ├── README.md │ │ ├── _doc │ │ │ ├── 10_doc_ipo_user.sh │ │ │ ├── 60_doc_ipo_cautossh.sh │ │ │ └── 70_doc_ipo_cautossh_limited.sh │ │ ├── _local │ │ │ ├── ops.sh │ │ │ └── vm-raspbian.img │ │ └── _prog │ │ │ ├── 100_core_custom.sh │ │ │ ├── 110_core_custom_user.sh │ │ │ ├── 115_core_custom_fs.sh │ │ │ ├── 130_core_custom_manage.sh │ │ │ ├── 160_core_custom_cautossh.sh │ │ │ ├── 170_core_custom_cautossh_limited.sh │ │ │ ├── 190_core_custom_infrastructure.sh │ │ │ ├── 199_core_custom_config.sh │ │ │ ├── 200_core_export.sh │ │ │ ├── 300_core_live.sh │ │ │ ├── compile_bash_prog.sh │ │ │ └── specglobalvars.sh │ ├── ssh │ │ └── .gitignore │ └── virtualization │ │ ├── device │ │ ├── raspbian │ │ │ └── ops.sh │ │ ├── x64-bios │ │ │ └── ops.sh │ │ └── x64-efi │ │ │ └── ops.sh │ │ ├── image │ │ ├── raspbian │ │ │ └── ops.sh │ │ ├── x64-bios │ │ │ └── ops.sh │ │ └── x64-efi │ │ │ └── ops.sh │ │ ├── wine │ │ ├── .gitignore │ │ ├── _anchor │ │ ├── _app │ │ └── _prog │ │ │ ├── core.sh │ │ │ ├── generate_bash_prog.sh │ │ │ ├── installation_prog.sh │ │ │ └── program.sh │ │ └── zSpecial │ │ └── msw │ │ └── ops.sh ├── sample │ └── metaengine │ │ └── mebase.tar ├── ssh │ ├── README.md │ ├── ops.png │ ├── ops.sh │ ├── ops.xml │ └── xorg.conf └── ssh_modular │ ├── README.md │ └── ops.sh ├── _local └── ubcp │ ├── .gitignore │ ├── README.md │ ├── _upstream │ ├── .gitignore │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── LICENSE.txt │ ├── README.md │ ├── _config.yml │ ├── cygwin-portable-installer.cmd │ └── docs │ │ └── img │ │ ├── launch_script.png │ │ └── tabbed_terminal.png │ ├── agpl-3.0.txt │ ├── cygwin-portable-installer-config.cmd │ ├── gpl-2.0.txt │ ├── gpl-3.0.txt │ ├── license.txt │ ├── overlay │ └── cygwin │ │ └── etc │ │ └── bash.bash_logout │ ├── ubcp-cygwin-portable-installer.cmd │ ├── ubcp_rename-to-enable.cmd │ ├── zDANGER-symlinks.txt │ └── zWARNING-path.txt ├── _meta ├── _packetDriveDevice.bat ├── _packetDriveDevice_remove.bat ├── _presentation └── MAKEDEV │ ├── GPL │ ├── copyright │ └── makedev_2.3.1-93_all.deb ├── _setupUbiquitous.bat ├── _setupUbiquitous_nonet.bat ├── _setup_ubcp.bat ├── _setup_ubiquitousBash_cygwin.bat ├── _terminate_broadcastPipe_page.bat ├── _test ├── _test.bat ├── _true ├── _true.bat ├── _ubdb ├── agpl-3.0.txt ├── ai ├── dataset │ ├── _ref │ │ └── OBSOLETE-corpus.sh │ ├── convert.sh │ ├── corpus.sh │ ├── corpus_bash.sh │ ├── format-special.sh │ ├── format.sh │ └── here_convert.sh ├── knowledge.sh ├── ollama │ └── ollama.sh ├── researchEngine.sh └── semanticAssist │ ├── distill_semanticAssist.sh │ ├── here_semanticAssist.sh │ ├── semanticAssist.sh │ └── semanticAssist_bash.sh ├── blockchain ├── blockchain.sh └── ethereum │ ├── ethereum.sh │ └── ethereum_parity.sh ├── build ├── bash │ ├── compile_bash.sh │ ├── compile_bash_prog.sh │ ├── generate_bash.sh │ ├── generate_bash_prog.sh │ ├── include_bash.sh │ ├── include_bash_prog.sh │ └── ubiquitous │ │ ├── depsubiquitous.sh │ │ └── discoverubiquitous.sh ├── haskell │ ├── README.html │ ├── README.md │ ├── README.mediawiki.txt │ ├── README.pdf │ ├── README.sh │ ├── README_presentation.html │ └── haskell.sh ├── python │ ├── python.sh │ └── python_lean_here.sh └── zSpecial │ └── build-ops.sh ├── compile.sh ├── fork ├── generic ├── condition.sh ├── config │ └── mustcarry.sh ├── filesystem │ ├── absolutepaths.sh │ ├── allLogic.sh │ ├── destroylock.sh │ ├── discoverresource.sh │ ├── finddir.sh │ ├── getext.sh │ ├── internal.sh │ ├── mounts │ │ ├── bindmountmanager.sh │ │ ├── mountchecks.sh │ │ └── waitumount.sh │ ├── moveconfirm.sh │ ├── permissions │ │ └── checkpermissions.sh │ ├── relink.sh │ └── safedelete.sh ├── findInfrastructure.sh ├── gather.sh ├── generic.sh ├── hello │ ├── hello.c │ └── hello.sh ├── messaging.sh ├── minimalheader.sh ├── net │ ├── clog │ │ └── clog.sh │ ├── command │ │ ├── command.sh │ │ └── synergy │ │ │ ├── here_synergy.sh │ │ │ └── synergy.sh │ ├── fetch.sh │ ├── findport.sh │ ├── fw │ │ ├── fw.sh │ │ └── hosts.sh │ ├── proxy │ │ ├── proxyrouter │ │ │ ├── here_proxyrouter.sh │ │ │ └── proxyrouter.sh │ │ ├── ssh │ │ │ ├── autossh.sh │ │ │ ├── here_ssh.sh │ │ │ ├── ssh.sh │ │ │ └── sshvars.sh │ │ ├── tor │ │ │ └── tor.sh │ │ └── vnc │ │ │ ├── vnc_vncserver_operations.sh │ │ │ ├── vnc_vncviewer_operations.sh │ │ │ ├── vnc_x11vnc_operations.sh │ │ │ └── vnchost.sh │ ├── smbmount.sh │ └── waitport.sh ├── preserveLog.sh ├── process │ ├── channel.sh │ ├── daemon.sh │ ├── embed.sh │ ├── embed_here.sh │ ├── getIdle │ ├── getIdle.c │ ├── idle.sh │ ├── priority.sh │ ├── remotesig.sh │ ├── terminate.sh │ ├── timeout.sh │ └── waitforprocess.sh ├── rottenheader.sh ├── serial │ ├── forwardPort-service.sh │ ├── forwardPort.sh │ └── terminal.sh ├── showCommand.sh ├── ubiquitousheader.sh ├── uid.sh └── validaterequest.sh ├── gpl-3.0.txt ├── hardware ├── gpdWinMini2024_8840U │ └── gpdWinMini2024_8840U_fan.sh ├── measurement │ └── live_hash.sh ├── peripherial │ └── h1060p │ │ └── h1060p.sh ├── w540 │ ├── w540_display.sh │ └── w540_fan.sh └── x220t │ └── x220_display.sh ├── instrumentation ├── bashdb │ ├── bashdb.sh │ └── bashdb_header.sh └── profiling │ └── stopwatch.sh ├── lab ├── labels ├── basicvarLabel.sh ├── shortcutsLabel.sh └── utilitiesLabel.sh ├── lean.py ├── lean.sh ├── license.txt ├── license.txt.agpl ├── license.txt.gpl ├── metaengine ├── __build │ ├── compile_meta.sh │ └── deps_meta.sh ├── env │ ├── metaengine_diag.sh │ ├── metaengine_here.sh │ ├── metaengine_local.sh │ ├── metaengine_parm.sh │ └── metaengine_vars.sh ├── example │ ├── example_metaengine_chain.sh │ └── example_metaengine_object.sh ├── metaengine.sh └── typical │ ├── typical_metaengine_buffer.sh │ ├── typical_metaengine_chain.sh │ ├── typical_metaengine_divert.sh │ ├── typical_metaengine_object.sh │ └── typical_metaengine_page.sh ├── os ├── distro │ ├── cygwin │ │ └── getMost_cygwin.sh │ ├── debian │ │ ├── _ref │ │ │ ├── debian_bullseye.sh │ │ │ ├── debian_buster.sh │ │ │ └── debian_stretch.sh │ │ └── getDep_debian.sh │ ├── getMinimal.sh │ ├── getMinimal_special.sh │ ├── getMost.sh │ ├── getMost_special.sh │ ├── getMost_special_npm.sh │ ├── getMost_special_veracrypt.sh │ ├── getMost_special_zWorkarounds.sh │ ├── ubuntu │ │ ├── _ref │ │ │ └── deleteme │ │ └── getDep_ubuntu.sh │ └── unix │ │ └── openssl │ │ └── splice_openssl.sh ├── getDep.sh ├── nixos.sh ├── override │ ├── _doc-mitigate.sh │ ├── _scrap-mitigate.sh │ ├── override.sh │ ├── override_cygwin.sh │ ├── override_prog.sh │ └── override_wsl.sh └── unix │ ├── systemd │ ├── here_systemd.sh │ └── hook_systemd.sh │ └── x11 │ └── findx11.sh ├── queue ├── __build │ ├── compile_queue.sh │ └── deps_queue.sh ├── aggregator │ ├── README.md │ ├── aggregator_read.sh │ ├── aggregator_write.sh │ ├── dyanamic │ │ └── scrap.txt │ ├── fifo_aggregator.sh │ └── static │ │ ├── benchmark_broadcastPipe_aggregatorStatic.sh │ │ ├── broadcastPipe_aggregatorStatic.sh │ │ ├── demand_broadcastPipe_aggregatorStatic.sh │ │ ├── scrap.txt │ │ ├── test_broadcastPipe_aggregatorStatic.sh │ │ └── test_scope_aggregatorStatic.sh ├── queue.sh ├── queue_vars.sh ├── queue_vars_default.sh ├── scrap.txt ├── test_queue.sh ├── tripleBuffer │ ├── benchmark_broadcastPipe_page.sh │ ├── benchmark_page.sh │ ├── broadcastPipe_page.sh │ ├── broadcastPipe_page_here.sh │ ├── demand_broadcastPipe_page.sh │ ├── page_read.sh │ ├── page_read_single.sh │ ├── page_write.sh │ ├── page_write_single.sh │ ├── scrap.txt │ └── test_broadcastPipe_page.sh ├── zDatabase │ ├── database.sh │ └── scrap.txt ├── zInteractive │ ├── interactive.sh │ └── scrap.txt └── zSocket │ ├── aggregatorStatic_socket_tcp.sh │ ├── aggregatorStatic_socket_unix.sh │ ├── page_socket_tcp.sh │ └── page_socket_unix.sh ├── rotten.sh ├── rotten_compressed.sh ├── scrap-cygwin.txt ├── server ├── coordinatorWorker.sh └── wireguard.sh ├── shortcuts ├── ai │ ├── augment │ │ └── augment.sh │ └── ollama │ │ ├── LICENSE-Llama-3.1.txt │ │ ├── license.txt │ │ └── ollama.sh ├── blockchain │ └── ethereum │ │ └── ethereum.sh ├── bup │ └── bup.sh ├── cloud-build │ ├── _custom │ │ ├── debian │ │ │ └── debian_build.sh │ │ └── gentoo │ │ │ └── gentoo_build.sh │ ├── cloudNativeBuildpack │ │ └── cloudNativeBuildpack_build.sh │ ├── docker │ │ └── docker_build.sh │ └── vagrant │ │ └── vagrant_build.sh ├── cloud │ ├── bridge │ │ ├── apacheLibcloud │ │ │ └── apacheLibcloud.sh │ │ ├── croc │ │ │ └── croc.sh │ │ ├── nubo │ │ │ └── nubo.sh │ │ ├── paramiko │ │ │ └── paramiko.sh │ │ ├── rclone │ │ │ ├── rclone.sh │ │ │ └── rclone_limited.sh │ │ └── terraform │ │ │ └── terraform.sh │ ├── cloud.sh │ ├── cloud_abstraction.sh │ ├── self │ │ ├── libvirt_self.sh │ │ ├── phpvirtualbox_self.sh │ │ ├── screenScraper │ │ │ ├── screenScraper-msw.sh │ │ │ └── screenScraper-nix.sh │ │ ├── ubVirt │ │ │ └── ubVirt_self.sh │ │ └── virtualbox_self.sh │ ├── service │ │ ├── aws │ │ │ └── aws.sh │ │ ├── azure │ │ │ └── azure.sh │ │ ├── gcloud │ │ │ └── gcloud.sh │ │ ├── ibm │ │ │ └── ibm.sh │ │ ├── oracle │ │ │ └── oracle.sh │ │ └── vps │ │ │ ├── digitalocean │ │ │ └── digitalocean.sh │ │ │ └── linode │ │ │ └── linode.sh │ └── storage │ │ ├── aws │ │ └── aws_s3_compatible.sh │ │ └── blackblaze │ │ └── blackblaze.sh ├── dev │ ├── ai │ │ ├── claude_code.sh │ │ └── codex.sh │ ├── app │ │ ├── calculators │ │ │ ├── gnuoctave.sh │ │ │ ├── gnuoctave_extra.sh │ │ │ ├── qalculate.sh │ │ │ └── scriptedIllustrator_terminal.sh │ │ ├── devatom.sh │ │ ├── devemacs.sh │ │ ├── eclipse │ │ │ ├── _deveclipse_legacy.sh │ │ │ ├── deveclipse_app.sh │ │ │ ├── deveclipse_bin_.sh │ │ │ ├── deveclipse_env.sh │ │ │ ├── deveclipse_example.sh │ │ │ ├── deveclipse_example_export.sh │ │ │ └── deveclipse_java.sh │ │ ├── repo │ │ │ ├── disc │ │ │ │ └── growisofs.sh │ │ │ ├── disk │ │ │ │ └── dd.sh │ │ │ └── mktorrent │ │ │ │ └── mktorrent.sh │ │ └── search │ │ │ ├── recoll │ │ │ └── recoll.sh │ │ │ └── search.sh │ ├── devsearch.sh │ ├── query │ │ └── devquery.sh │ └── scope │ │ ├── devscope.sh │ │ ├── devscope_app.sh │ │ └── devscope_here.sh ├── distro │ ├── debian │ │ ├── createDebian.sh │ │ └── updateDebian.sh │ ├── distro.sh │ ├── msw │ │ └── msw.sh │ └── raspbian │ │ └── createRaspbian.sh ├── docker │ ├── dockerassets.sh │ ├── dockercontainer.sh │ ├── dockerconvert.sh │ ├── dockercreate.sh │ ├── dockerdelete.sh │ ├── dockerparse.sh │ └── dockerportation.sh ├── factory │ ├── factory-ops.sh │ ├── factory.sh │ ├── factoryCreate.sh │ └── factoryCreate_here.sh ├── git │ ├── _doc-wget_githubRelease.sh │ ├── _ref │ │ ├── _scratch-diag_aria2c-010-wget_githubRelease_internal.txt │ │ ├── _scratch-diag_aria2c-020-wget_githubRelease_internal.txt │ │ ├── _scratch-diag_aria2c-021-wget_githubRelease_internal.txt │ │ ├── _scratch-diag_aria2c-030-wget_githubRelease_internal.txt │ │ ├── gitCompendium-OBSOLETE.sh │ │ ├── wget_githubRelease_internal-OBSOLETE.sh │ │ └── wget_githubRlease_internal-join-slot-OBSOLETE.sh │ ├── git.sh │ ├── gitBare.sh │ ├── gitBest.sh │ ├── gitCompendium.sh │ ├── gitMad.sh │ ├── gitVars.sh │ ├── wget_githubRelease_internal.sh │ └── wget_githubRelease_tag.sh ├── github │ ├── github_removeHTTPS.sh │ └── github_upload_parts.sh ├── image │ ├── disc │ │ └── pattern_recovery.sh │ ├── gparted.sh │ └── packetDrive.sh ├── importShortcuts.sh ├── linux │ ├── bfq.sh │ ├── kernelConfig.sh │ ├── kernelConfig_here.sh │ └── kernelConfig_platform.sh ├── mkboot │ ├── here_mkboot.sh │ └── mkboot.sh ├── os │ └── unix │ │ ├── nice │ │ └── renice.sh │ │ └── systemd │ │ └── systemd_cleanup.sh ├── prompt │ ├── _ref │ │ └── chat-NVIDIA GPU Memory Reporting.md │ └── visualPrompt.sh ├── remoteShortcuts.sh ├── setupUbiquitous.sh ├── setupUbiquitous_accessories.sh ├── setupUbiquitous_accessories_here.sh ├── setupUbiquitous_here.sh ├── setupUbiquitous_root.sh ├── vbox │ └── vboxconvert.sh └── x11 │ ├── clipboard │ └── x11ClipboardImage.sh │ ├── desktop │ └── kde4x │ │ └── kde4x.sh │ ├── testx11.sh │ ├── xinput.sh │ └── xscale.sh ├── special ├── gosu │ └── gosu.sh ├── ingredients.sh ├── java │ └── java.sh ├── machineinfo │ └── machinevars.sh ├── mustberoot.sh ├── mustgetsudo.sh └── uuid.sh ├── structure ├── build.sh ├── entry.sh ├── globalvars.sh ├── installation.sh ├── localenv.sh ├── localfs.sh ├── overrides.sh ├── overrides_disable.sh ├── program.sh └── resetvars.sh ├── ubcore.sh ├── ubiquitous_bash.sh ├── virtualization ├── abstractfs │ ├── abstractfs.sh │ ├── abstractfs_appdir.sh │ ├── abstractfs_appdir_specific.sh │ └── abstractfsvars.sh ├── bios │ ├── createvm.sh │ └── live.sh ├── chroot │ ├── dropchroot.sh │ ├── enterchroot.sh │ ├── mountchroot.sh │ ├── mountchrootuser.sh │ ├── procchroot.sh │ ├── testchroot.sh │ ├── ubdistchroot.sh │ └── userchroot.sh ├── docker │ ├── dockerchecks.sh │ ├── dockerdrop.sh │ ├── dockertest.sh │ ├── dockeruser.sh │ ├── dockervars.sh │ └── here_docker.sh ├── dosbox │ ├── dosbox.sh │ └── here_dosbox.sh ├── dumbpath │ └── dumbpath_vars.sh ├── fakehome │ ├── fakehome.sh │ ├── fakehomemake.sh │ ├── fakehomereset.sh │ ├── fakehomeuser.sh │ └── fakehomevars.sh ├── findInfrastructure_virt.sh ├── image │ ├── bootdisc.sh │ ├── createImage.sh │ ├── here_bootdisc.sh │ ├── imagevars.sh │ ├── mountimage.sh │ ├── transferimage.sh │ └── userpersistenthome.sh ├── libIdentification.sh ├── localPathTranslation.sh ├── osTranslation.sh ├── python │ ├── .gitignore │ ├── README.md │ ├── _ref │ │ ├── chat-Bash Lock File Function Review.md │ │ └── chat-Python Portability - Hugging Face CLI Installation.md │ ├── override_cygwin_python.sh │ ├── override_msw_python.sh │ ├── override_nix_python.sh │ └── special_python.sh ├── qemu │ ├── qemu-raspi-raspi.sh │ ├── qemu-x64-raspi.sh │ ├── qemu-x64-x64.sh │ └── qemu.sh ├── vbox │ ├── vboxlab.sh │ ├── vboxmount.sh │ ├── vboxtest.sh │ ├── vboxuser.sh │ └── vboxvars.sh ├── virtenv.sh ├── virtvars.sh ├── wine │ └── wine.sh ├── wsl2 │ ├── here_wsl2.sh │ ├── here_wsl2_gui.sh │ ├── wsl2.sh │ ├── wsl2_gui_internal.sh │ ├── wsl2_internal.sh │ └── wsl2_setup.sh └── wsl2vars.sh ├── zImage_commandPrompt.png ├── zImage_queue_experiment.jpg ├── zImage_userQemu_window_nix.png └── zImage_userVBox_window_MSW.png /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-16-buster 2 | #FROM mcr.microsoft.com/devcontainers/base:ubuntu 3 | FROM mcr.microsoft.com/vscode/devcontainers/universal 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.devcontainer/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | https://github.com/devcontainers/templates/blob/main/src/universal/.devcontainer/devcontainer.json 7 | 8 | https://containers.dev/guide/dockerfile 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.devcontainer/basic-dev-vnchost/Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-16-buster 2 | #FROM mcr.microsoft.com/devcontainers/base:ubuntu 3 | FROM mcr.microsoft.com/vscode/devcontainers/universal 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.devcontainer/basic-dev-vnchost/devcontainer.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "ubiquitous_bash-codespace-basic-dev-vnchost", 4 | "build": { 5 | "dockerfile": "Dockerfile" 6 | }, 7 | "features": { 8 | "ghcr.io/devcontainers/features/github-cli:1": {} 9 | }, 10 | "postCreateCommand": "wget 'https://raw.githubusercontent.com/mirage335/ubiquitous_bash/master/ubiquitous_bash.sh' ; ./ubiquitous_bash.sh _setupUbiquitous ; ./ubiquitous_bash.sh _vnchost-setup", 11 | "forwardPorts": [51001, 51002], 12 | "customizations": { 13 | "codespaces": { 14 | "repositories": { 15 | "my_org/my_repo": { 16 | "permissions": { 17 | "actions": "none", 18 | "checks": "none", 19 | "contents": "read", 20 | "issues": "none", 21 | "packages": "none", 22 | "pull_requests": "none", 23 | "repository_projects": "none", 24 | "security_events": "none", 25 | "statuses": "none", 26 | "metadata": "read" 27 | } 28 | } 29 | } 30 | } 31 | } 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /.devcontainer/basic-dev-vnchost/library-scripts/_doc/deleteme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/.devcontainer/basic-dev-vnchost/library-scripts/_doc/deleteme -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "ubiquitous_bash-codespace-basic-dev", 4 | "build": { 5 | "dockerfile": "Dockerfile" 6 | }, 7 | "features": { 8 | "ghcr.io/devcontainers/features/github-cli:1": {} 9 | }, 10 | "postCreateCommand": "cd ; wget 'https://raw.githubusercontent.com/mirage335/ubiquitous_bash/master/ubiquitous_bash.sh' ; chmod u+x ./ubiquitous_bash.sh ; ./ubiquitous_bash.sh _setupUbiquitous", 11 | "forwardPorts": [51001, 51002], 12 | "customizations": { 13 | "codespaces": { 14 | "repositories": { 15 | "my_org/my_repo": { 16 | "permissions": { 17 | "actions": "none", 18 | "checks": "none", 19 | "contents": "read", 20 | "issues": "none", 21 | "packages": "none", 22 | "pull_requests": "none", 23 | "repository_projects": "none", 24 | "security_events": "none", 25 | "statuses": "none", 26 | "metadata": "read" 27 | } 28 | } 29 | } 30 | } 31 | } 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /.devcontainer/library-scripts/_doc/deleteme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/.devcontainer/library-scripts/_doc/deleteme -------------------------------------------------------------------------------- /.gattributes: -------------------------------------------------------------------------------- 1 | _bin/* linguist-vendored 2 | _diag/* linguist-vendored 3 | _lib/* linguist-vendored 4 | _presentation/* linguist-vendored 5 | USAGE.HTML linguist-vendored 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | github: mirage335 5 | 6 | # Replace with a single Patreon username 7 | patreon: mirage335 8 | 9 | 10 | open_collective: # Replace with a single Open Collective username 11 | ko_fi: # Replace with a single Ko-fi username 12 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 13 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 14 | liberapay: # Replace with a single Liberapay username 15 | issuehunt: # Replace with a single IssueHunt username 16 | otechie: # Replace with a single Otechie username 17 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 18 | 19 | custom: mirage335.member.hacdc.org 20 | -------------------------------------------------------------------------------- /.github/workflows/_ref/scrap.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Attempt to default pushed docker package to public instead of private... 7 | 8 | ```yaml 9 | # ATTRIBUTION-AI: ChatGPT o3 (high) 2025-05-01 10 | - name: Log in to GHCR 11 | uses: docker/login-action@v3 12 | with: 13 | registry: ghcr.io 14 | username: ${{ github.actor }} 15 | password: ${{ secrets.GITHUB_TOKEN }} 16 | 17 | # ATTRIBUTION-AI: ChatGPT o3 (high) 2025-05-01 18 | #${{ github.repository_owner }} 19 | - uses: docker/build-push-action@v5 20 | with: 21 | context: . 22 | push: true 23 | tags: ghcr.io/${{ github.repository }}/runpod-pytorch-heavy:latest 24 | labels: | 25 | org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} 26 | 27 | # WARNING: May be untested. 28 | ## ATTRIBUTION-AI: ChatGPT o3 (high) 2025-05-01 29 | ## ---- make GHCR package public --------------------------------------- 30 | #- name: Make GHCR package public 31 | ## run only on default branch pushes or manual runs that resulted in a successful push 32 | #if: success() 33 | #env: 34 | #GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 35 | #run: | 36 | ## The gh CLI is available by default on GitHub-hosted runners 37 | ## PATCH /user/packages/container/{package_name}/visibility → {visibility: public} 38 | #gh api --method PATCH \ 39 | #-H "Accept: application/vnd.github+json" \ 40 | #/user/packages/container/runpod-pytorch-heavy/visibility \ 41 | #-f visibility=public 42 | ``` 43 | -------------------------------------------------------------------------------- /.github/workflows/_removeTag-oldReleases.yml: -------------------------------------------------------------------------------- 1 | 2 | name: _removeTag-oldRelease 3 | 4 | 5 | # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions 6 | permissions: 7 | actions: write 8 | checks: read 9 | contents: write 10 | deployments: read 11 | issues: read 12 | packages: read 13 | pull-requests: read 14 | repository-projects: read 15 | security-events: none 16 | statuses: read 17 | 18 | 19 | 20 | on: 21 | workflow_dispatch: 22 | #inputs: 23 | #source_tag: 24 | #description: 'Source Tag' 25 | #required: true 26 | #target_tag: 27 | #description: 'Target Tag' 28 | #required: true 29 | 30 | 31 | jobs: 32 | remove-release: 33 | runs-on: ubuntu-latest 34 | steps: 35 | 36 | 37 | 38 | - name: Checkout code 39 | uses: actions/checkout@v2 40 | with: 41 | fetch-depth: 0 # we need fetch-depth: 0 to fetch all tags 42 | 43 | 44 | - uses: dev-drprasad/delete-older-releases@v0.2.0 45 | with: 46 | #repo: / # defaults to current repo 47 | keep_latest: 10 48 | delete_tags: true 49 | #delete_tag_pattern: "build" 50 | env: 51 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "_lib/kit/app/researchEngine"] 2 | path = _lib/kit/app/researchEngine 3 | url = https://github.com/mirage335-special/kit-researchEngine.git 4 | [submodule "_lib/.python_wheels"] 5 | path = _lib/.python_wheels 6 | url = https://github.com/mirage335-special/.python_wheels.git 7 | -------------------------------------------------------------------------------- /README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/README.pdf -------------------------------------------------------------------------------- /_bash-core.bat: -------------------------------------------------------------------------------- 1 | @rem(){ :;};@rem echo ' 2 | @echo off 3 | @goto b 4 | ' > /dev/null 2>&1 ; 5 | rem(){ :;};rem 6 | 7 | # ATTENION: NOTICE: No production use! Different from other 'anchor' scripts and unusual in that this specifically calls only the bash environment at the standard "$HOME"/core/infrastructure , 'p/zCore/infrastructure' locations normally used for development of 'ubiquitous_bash' itself . 8 | 9 | # Useful for 'factory' development and use, for which '_factory*' and '__factoryCreate*' function code is more often revised . 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | # UNIX/Linux 20 | export force_profileScriptLocation="$HOME"/core/infrastructure/ubiquitous_bash/ubcore.sh 21 | export force_profileScriptFolder="$HOME"/core/infrastructure/ubiquitous_bash 22 | "$HOME"/core/infrastructure/ubiquitous_bash/_bash.bat "$@" 23 | exit "$?" 24 | 25 | 26 | 27 | exit 1 28 | 29 | :b 30 | 31 | 32 | 33 | 34 | REM Cygwin/MSW 35 | set "force_profileScriptLocation=/cygdrive/c/q/p/zCore/infrastructure/ubiquitous_bash/ubcore.sh" 36 | set "force_profileScriptFolder=/cygdrive/c/q/p/zCore/infrastructure/ubiquitous_bash" 37 | CALL "C:\q\p\zCore\infrastructure\ubiquitous_bash\_bash.bat" %* 38 | EXIT /B 39 | 40 | 41 | 42 | goto :end 43 | 44 | :end 45 | -------------------------------------------------------------------------------- /_bash_bat_lnk.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bash_bat_lnk.zip -------------------------------------------------------------------------------- /_bin/.ubrgbin.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # WARNING Changes to this script's API may necessitate changes to several ubiquitous_bash functions. 4 | 5 | #Copies only smaller binaries necessary for general purpose shell glue or virtualization operations, leaving out specialized applications which may inflate embedded resources (eg. bootdisc) or cause interference (setupUbiquitous). 6 | #"$1" == "$scriptBin" 7 | #"$2" == destination 8 | _ubrgbin_cpA() { 9 | mkdir -p "$2" 10 | 11 | cp -a "$1"/dockerHello.tar "$2" 12 | cp -a "$1"/getIdle "$2" 13 | cp -a "$1"/gosu-amd64 "$2" 14 | cp -a "$1"/gosu-amd64.asc "$2" 15 | cp -a "$1"/gosu-armel "$2" 16 | cp -a "$1"/gosu-armel.asc "$2" 17 | cp -a "$1"/gosu-i386 "$2" 18 | cp -a "$1"/gosu-i386.asc "$2" 19 | cp -a "$1"/gosudev.asc "$2" 20 | cp -a "$1"/hello "$2" 21 | cp -a "$1"/MAKEDEV "$2" 22 | 23 | [[ -e "$1"/b85 ]] && cp -a "$1"/b85 "$2" 24 | 25 | cp -a "$1"/.ubrgbin.sh "$2" 26 | } 27 | 28 | 29 | #Launch internal commands as parameters. 30 | if [[ "$1" == '_'* ]] 31 | then 32 | "$@" 33 | ubrgbin_exitStatus="$?" 34 | #Exit if not imported into existing shell, or bypass requested, else fall through to subsequent return. 35 | if ! [[ "${BASH_SOURCE[0]}" != "${0}" ]] || ! [[ "$1" != "--bypass" ]] 36 | then 37 | exit "$ubrgbin_exitStatus" 38 | fi 39 | fi 40 | -------------------------------------------------------------------------------- /_bin/dockerHello.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/dockerHello.tar -------------------------------------------------------------------------------- /_bin/getIdle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/getIdle -------------------------------------------------------------------------------- /_bin/gosu-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-amd64 -------------------------------------------------------------------------------- /_bin/gosu-amd64.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-amd64.asc -------------------------------------------------------------------------------- /_bin/gosu-armel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-armel -------------------------------------------------------------------------------- /_bin/gosu-armel.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-armel.asc -------------------------------------------------------------------------------- /_bin/gosu-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-i386 -------------------------------------------------------------------------------- /_bin/gosu-i386.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/gosu-i386.asc -------------------------------------------------------------------------------- /_bin/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_bin/hello -------------------------------------------------------------------------------- /_config/README.md: -------------------------------------------------------------------------------- 1 | Rare cases (eg. network information for standalone SSH use) may make it undesirable to pull configuration data from a separate file (ie. "ops"), necessitating "hardcoding" of information within the monolithic shell script output. 2 | 3 | Place relevant files here to be hardcoded in at compile time, and update the compile script if necessary. 4 | 5 | Keep in mind, even such hardcoded configuration information may still be treated as defaults to be overridden by "ops". 6 | 7 | DANGER: Do NOT place files with names or paths identical to internal ubiquitous_bash scripts, unless intending to override these files! 8 | -------------------------------------------------------------------------------- /_config/_config/netvars.sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_config/_config/netvars.sh.png -------------------------------------------------------------------------------- /_diag/data/vmdkRawExample/vmvdiraw.vmdk: -------------------------------------------------------------------------------- 1 | # Disk DescriptorFile 2 | version=1 3 | CID=6a6be5e1 4 | parentCID=ffffffff 5 | createType="fullDevice" 6 | 7 | # Extent description 8 | RW 12582912 FLAT "/dev/loop0" 0 9 | 10 | # The disk Data Base 11 | #DDB 12 | 13 | ddb.virtualHWVersion = "4" 14 | ddb.adapterType="ide" 15 | ddb.geometry.cylinders="12483" 16 | ddb.geometry.heads="16" 17 | ddb.geometry.sectors="63" 18 | ddb.uuid.image="422655b4-8639-4e0b-81f6-5d0ec9ef4263" 19 | ddb.uuid.parent="00000000-0000-0000-0000-000000000000" 20 | ddb.uuid.modification="00000000-0000-0000-0000-000000000000" 21 | ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" 22 | -------------------------------------------------------------------------------- /_doc/queue/database/input: -------------------------------------------------------------------------------- 1 | declare -x ubdb_uk4uPhB663kVcygT0q_x="value" 2 | -------------------------------------------------------------------------------- /_doc/queue/database/ops-db.sh: -------------------------------------------------------------------------------- 1 | declare -x ubdb_uk4uPhB663kVcygT0q_name="value" 2 | declare -x ubdb_uk4uPhB663kVcygT0q_x="value" 3 | -------------------------------------------------------------------------------- /_doc/virtualization/chroot/mountchroot/mountchroot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_doc/virtualization/chroot/mountchroot/mountchroot.pdf -------------------------------------------------------------------------------- /_doc/virtualization/chroot/mountchroot/mountchroot.xoj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_doc/virtualization/chroot/mountchroot/mountchroot.xoj -------------------------------------------------------------------------------- /_doc/virtualization/image/mountimage/mountimage.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_doc/virtualization/image/mountimage/mountimage.pdf -------------------------------------------------------------------------------- /_doc/virtualization/image/mountimage/mountimage.xoj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_doc/virtualization/image/mountimage/mountimage.xoj -------------------------------------------------------------------------------- /_lib/app/README.md: -------------------------------------------------------------------------------- 1 | 2 | # emacs 3 | 4 | Mostly (if not entirely) exists as a usable configuration for bash debug functionality. 5 | 6 | Moved to bundle. 7 | 8 | 9 | # atom 10 | 11 | Essentially deprecated by 'panelVM' functionality, which is far more powerful (having basically the same layout but using actual UNIX GUI applications like Okular, LibreOffice, FireFox, etc, shell scripts, etc). 12 | 13 | Mostly kept as a possible reference in case atom text editor may prove useful for Arduino/SAMD debug (though atom was not at all found reliable when thoroughly tested for such use cases) . 14 | 15 | Removed at approximately 2021-10-19, due to occupying ~100MB in repository, unnecessarily causing projects using 'ubiquitous bash' as a submodule to also occupy approximately that much space. 16 | 17 | -------------------------------------------------------------------------------- /_lib/app/atom.disabled/home/.atom/.gitignore: -------------------------------------------------------------------------------- 1 | blob-store 2 | compile-cache 3 | dev 4 | storage 5 | .apm 6 | .node-gyp 7 | .npm 8 | -------------------------------------------------------------------------------- /_lib/app/atom.disabled/home/.config/Atom/deleteme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_lib/app/emacs.moved/.emacs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_lib/app/emacs.moved/home/emacs.d/deleteme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_lib/daemon/ethereum_mine/mine.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=/path/to/blockchain/ubiquitous_bash.sh _idle 3 | Icon=exec 4 | Type=Application 5 | -------------------------------------------------------------------------------- /_lib/daemon/ethereum_mine/ops: -------------------------------------------------------------------------------- 1 | export ethaddr=hexStringAddress 2 | export rigname=unknown 3 | 4 | main() { 5 | _ethereum_mine 6 | } 7 | -------------------------------------------------------------------------------- /_lib/desktop/README.md: -------------------------------------------------------------------------------- 1 | Author 'mirage335' is aware of the position apparently taken by 'Red Hat' on 'KDE Plasma' . 2 | 3 | https://access.redhat.com/discussions/4861961#comment-1745271 4 | 5 | 6 | As of 2021-04-25, this position is not compelling, at least not as long as Python widgets are not used. 'KDE Plasma' on 'Debian Stable' has demonstrated many years of reliability and adequate functionality from a few specific 'widgets' and 'applications' . 7 | 8 | Such reliability and functionality is adequate to be used in 'PanelVM' and similar with typical redundancy as appropriate. Anything less should not be using GUI 'applications' at all, and perhaps not even an 'operating system' either (ie. framebuffer graphics drawn by SDL, microcontroller, etc). 9 | 10 | 11 | 12 | *) SysMon 13 | *) FolderView 14 | 15 | *) Dolphin File Manager 16 | *) Kwrite/Kate 17 | 18 | *) Kwin 19 | 20 | 21 | -------------------------------------------------------------------------------- /_lib/desktop/fileAssociations/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Kate 3 | 4 | ## kate-files 5 | 6 | Allows multiple text files (including shell script files) to be selected and opened simultaneously in a 'kate' window independent of any other 'kate' 'projects' . 7 | 8 | Highly effective way to get a tabbed text editor with 'Documents' and 'Projects' file browser side-panels , when the full functionality of a 'PanelVM' may be superfluous. Additionally, this may be useful *within* 'PanelVM' to achieve another layer of file browsing, especially when text search/replace across a specific set of files may be desired. 9 | 10 | 11 | ## kate-dir 12 | 13 | Mostly a dummy function, barely providing useful functionality. Within 'kate', the (usually nonexistent) 'garbage' file can be used as a file name to paste (most of) into the 'File Browser' . Mildly inconvenient, yet effective. 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /_lib/desktop/fileAssociations/kate-dir.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Comment=kate-dir 3 | Exec=bash -c 'cd '%U' ; kate -n --startanon ./garbage' 4 | Icon=kate 5 | Name=kate 6 | NoDisplay=false 7 | Path[$e]= 8 | StartupNotify=true 9 | Terminal=0 10 | TerminalOptions= 11 | Type=Application 12 | X-KDE-SubstituteUID=false 13 | X-KDE-Username= 14 | -------------------------------------------------------------------------------- /_lib/desktop/fileAssociations/kate-files.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Comment=kate-files 3 | Exec=kate -n --startanon %F 4 | Icon=kate 5 | Name=kate 6 | NoDisplay=false 7 | Path[$e]= 8 | StartupNotify=true 9 | Terminal=0 10 | TerminalOptions= 11 | Type=Application 12 | X-KDE-SubstituteUID=false 13 | X-KDE-Username= 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/001-workaround-GNUoctave-ineffective.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for GNU Octave - Ineffective] 2 | Description=Settings for GNU Octave - Ineffective 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | placement=UnderMouse 6 | placementrule=2 7 | title=Octave 8 | titlematch=2 9 | types=1 10 | wmclass=octave-gui gnu octave 11 | wmclasscomplete=true 12 | wmclassmatch=2 13 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/005-workaround-GNUelectric-ineffective.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for GNUelectric - Ineffective] 2 | Description=Settings for GNUelectric - Ineffective 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | placement=UnderMouse 6 | placementrule=2 7 | position=-2147483648,-2147483648 8 | positionrule=4 9 | title=***NONE*** 10 | titlematch=0 11 | types=1 12 | windowrole=disabled-thy7tirimav2sudnmw 13 | windowrolematch=1 14 | wmclass=com-sun-electric-launcher 15 | wmclasscomplete=true 16 | wmclassmatch=2 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/010-workaround-freecad_1.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for freecad] 2 | Description=Settings for freecad 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | fpplevel=0 6 | fpplevelrule=2 7 | fsplevel=0 8 | fsplevelrule=2 9 | placement=NoPlacement 10 | placementrule=2 11 | title=FreeCAD\s 12 | titlematch=2 13 | types=1 14 | wmclass=freecad 15 | wmclasscomplete=false 16 | wmclassmatch=2 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/011-workaround-freecad_2.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for freecad] 2 | Description=Settings for freecad 3 | above=true 4 | aboverule=2 5 | clientmachine=localhost 6 | clientmachinematch=0 7 | title=&Constraint Properties 8 | titlematch=2 9 | wmclass=freecad 10 | wmclasscomplete=false 11 | wmclassmatch=2 12 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/015-workaround-arduino.kwinrule: -------------------------------------------------------------------------------- 1 | [FORCE - arduino] 2 | Description=FORCE - arduino 3 | clientmachine= 4 | clientmachinematch=0 5 | ignoregeometry=true 6 | ignoregeometryrule=2 7 | placement=UnderMouse 8 | placementrule=2 9 | position=-2147483648,-2147483648 10 | positionrule=1 11 | title=Arduino 12 | titlematch=2 13 | wmclass=processing-app-base 14 | wmclasscomplete=false 15 | wmclassmatch=2 16 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/200-optional-temp-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [temp - opaque] 2 | Description=temp - opaque 3 | below=true 4 | belowrule=2 5 | clientmachine= 6 | clientmachinematch=0 7 | opacityactive=100 8 | opacityactiverule=2 9 | opacityinactive=100 10 | opacityinactiverule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=DISABLED - DISABLED 18 | titlematch=1 19 | wmclass=disabled - disabled 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/210-optional-gimp-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [gimp - opaque] 2 | Description=gimp - opaque 3 | clientmachine= 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=GIMP 10 | titlematch=2 11 | wmclass=gimp 12 | wmclasscomplete=false 13 | wmclassmatch=2 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/210-optional-obs-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [obs - opaque] 2 | Description=obs - opaque 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=DISABLED - OBS 10 | titlematch=2 11 | wmclass=disabled - obs 12 | wmclasscomplete=false 13 | wmclassmatch=1 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/220-optional-smplayer-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [smplayer - opaque] 2 | Description=smplayer - opaque 3 | below=true 4 | belowrule=2 5 | minimize=false 6 | minimizerule=2 7 | opacityactive=100 8 | opacityactiverule=2 9 | opacityinactive=100 10 | opacityinactiverule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=SMPlayer 18 | titlematch=2 19 | wmclass=smplayer 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/220-optional-vlc-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [vlc - opaque] 2 | Description=vlc - opaque 3 | opacityactive=100 4 | opacityactiverule=2 5 | opacityinactive=100 6 | opacityinactiverule=2 7 | title=VLC media player 8 | titlematch=2 9 | wmclass=vlc 10 | wmclasscomplete=false 11 | wmclassmatch=1 12 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/250-optional-audacious-custom.kwinrule: -------------------------------------------------------------------------------- 1 | [audacious - background] 2 | Description=audacious - background 3 | acceptfocus=true 4 | acceptfocusrule=2 5 | below=true 6 | belowrule=2 7 | clientmachine= 8 | clientmachinematch=0 9 | desktop=-1 10 | desktoprule=1 11 | minimize=false 12 | minimizerule=2 13 | opacityactive=70 14 | opacityactiverule=2 15 | opacityinactive=35 16 | opacityinactiverule=2 17 | skippager=true 18 | skippagerrule=2 19 | skipswitcher=true 20 | skipswitcherrule=2 21 | skiptaskbar=true 22 | skiptaskbarrule=2 23 | title=Audacious 24 | titlematch=2 25 | type=0 26 | typerule=2 27 | wmclass=audacious 28 | wmclasscomplete=true 29 | wmclassmatch=2 30 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/300-tag-daemon-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [tag - daemon - opaque] 2 | Description=tag - daemon - opaque 3 | below=true 4 | belowrule=1 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=m58nOgWA 10 | titlematch=2 11 | types=1 12 | wmclass= 13 | wmclasscomplete=false 14 | wmclassmatch=0 15 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/300-tag-picturewidget-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [picturewidget-opaque] 2 | Description=picturewidget-opaque 3 | activity=00000000-0000-0000-0000-000000000000 4 | activityrule=2 5 | below=true 6 | belowrule=2 7 | desktop=-1 8 | desktoprule=2 9 | opacityactive=100 10 | opacityactiverule=2 11 | opacityinactive=100 12 | opacityinactiverule=2 13 | skippager=true 14 | skippagerrule=2 15 | skipswitcher=true 16 | skipswitcherrule=2 17 | skiptaskbar=true 18 | skiptaskbarrule=2 19 | title=picturewidget 20 | titlematch=1 21 | types=1 22 | wmclass= 23 | wmclasscomplete=false 24 | wmclassmatch=0 25 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/300-tag-videowidget-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [videowidget-opaque] 2 | Description=videowidget-opaque 3 | activity=00000000-0000-0000-0000-000000000000 4 | activityrule=2 5 | below=true 6 | belowrule=2 7 | desktop=-1 8 | desktoprule=2 9 | fullscreen=true 10 | fullscreenrule=3 11 | opacityactive=100 12 | opacityactiverule=2 13 | opacityinactive=100 14 | opacityinactiverule=2 15 | screen=2 16 | screenrule=2 17 | skippager=true 18 | skippagerrule=2 19 | skipswitcher=true 20 | skipswitcherrule=2 21 | skiptaskbar=true 22 | skiptaskbarrule=2 23 | title=videowidget 24 | titlematch=1 25 | types=1 26 | wmclass=mplayer 27 | wmclasscomplete=false 28 | wmclassmatch=0 29 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/500-glass.kwinrule: -------------------------------------------------------------------------------- 1 | [glass] 2 | Description=glass 3 | clientmachine=disabled 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=85 8 | opacityinactiverule=2 9 | title=DISABLED 10 | titlematch=0 11 | types=953 12 | windowrole=disabled 13 | windowrolematch=0 14 | wmclass=disabled 15 | wmclasscomplete=false 16 | wmclassmatch=0 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/600-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [opaque] 2 | Description=opaque 3 | opacityactive=100 4 | opacityactiverule=2 5 | opacityinactive=100 6 | opacityinactiverule=2 7 | wmclass=disabled 8 | wmclasscomplete=false 9 | wmclassmatch=0 10 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/800-daemon-xterm.kwinrule: -------------------------------------------------------------------------------- 1 | [daemon - XTerm] 2 | Description=daemon - XTerm 3 | below=true 4 | belowrule=2 5 | blockcompositing=true 6 | blockcompositingrule=1 7 | clientmachine= 8 | clientmachinematch=0 9 | desktop=12 10 | desktoprule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=ethminer 18 | titlematch=0 19 | wmclass=xterm 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/850-bypass-yakuake.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - yakuake] 2 | Description=bypass - yakuake 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=32767,32767 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=1,1 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=0 42 | opacityactiverule=1 43 | opacityinactive=0 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=2048,0 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | size=960,532 56 | sizerule=1 57 | skippager=false 58 | skippagerrule=1 59 | skipswitcher=false 60 | skipswitcherrule=1 61 | skiptaskbar=false 62 | skiptaskbarrule=1 63 | strictgeometry=false 64 | strictgeometryrule=1 65 | title=Yakuake 66 | titlematch=0 67 | type=0 68 | typerule=1 69 | wmclass=yakuake 70 | wmclasscomplete=false 71 | wmclassmatch=1 72 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/860-bypass-eclipse.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - Eclipse] 2 | Description=bypass - Eclipse 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | position=2689,917 6 | positionrule=1 7 | size=205,280 8 | sizerule=1 9 | title=Eclipse 10 | titlematch=2 11 | wmclass=eclipse 12 | wmclasscomplete=false 13 | wmclassmatch=2 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/860-bypass-qemu.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - qemu] 2 | Description=bypass - qemu 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | clientmachine= 14 | clientmachinematch=0 15 | closeable=false 16 | closeablerule=1 17 | decocolor=Breeze 18 | decocolorrule=1 19 | desktop=1 20 | desktoprule=1 21 | disableglobalshortcuts=false 22 | disableglobalshortcutsrule=1 23 | fpplevel=0 24 | fpplevelrule=1 25 | fsplevel=0 26 | fsplevelrule=1 27 | fullscreen=false 28 | fullscreenrule=1 29 | ignoregeometry=false 30 | ignoregeometryrule=1 31 | maximizehoriz=false 32 | maximizehorizrule=1 33 | maximizevert=false 34 | maximizevertrule=1 35 | maxsize=960,532 36 | maxsizerule=1 37 | minimize=false 38 | minimizerule=1 39 | minsize=960,532 40 | minsizerule=1 41 | noborder=false 42 | noborderrule=1 43 | opacityactive=100 44 | opacityactiverule=1 45 | opacityinactive=100 46 | opacityinactiverule=1 47 | placement=Default 48 | placementrule=1 49 | position=2307,1388 50 | positionrule=1 51 | screen=0 52 | screenrule=1 53 | shade=false 54 | shaderule=1 55 | shortcut= 56 | shortcutrule=1 57 | size=2048,1152 58 | sizerule=1 59 | skippager=false 60 | skippagerrule=1 61 | skipswitcher=false 62 | skipswitcherrule=1 63 | skiptaskbar=false 64 | skiptaskbarrule=1 65 | strictgeometry=false 66 | strictgeometryrule=1 67 | title=QEMU 68 | titlematch=0 69 | type=0 70 | typerule=1 71 | wmclass=qemu-system-x86_64 72 | wmclasscomplete=false 73 | wmclassmatch=2 74 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/860-bypass-vbox_1.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - VBox] 2 | Description=bypass - VBox 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=646,546 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=646,546 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=100 42 | opacityactiverule=1 43 | opacityinactive=100 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=2599,728 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | size=646,546 56 | sizerule=1 57 | skippager=false 58 | skippagerrule=1 59 | skipswitcher=false 60 | skipswitcherrule=1 61 | skiptaskbar=false 62 | skiptaskbarrule=1 63 | strictgeometry=false 64 | strictgeometryrule=1 65 | title=Oracle VM VirtualBox 66 | titlematch=2 67 | type=0 68 | typerule=1 69 | wmclass=box 70 | wmclasscomplete=false 71 | wmclassmatch=2 72 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/860-bypass-vbox_2.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - VBox] 2 | Description=bypass - VBox 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=32767,32767 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=1,1 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=0 42 | opacityactiverule=1 43 | opacityinactive=0 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=-2147483648,-2147483648 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | skippager=false 56 | skippagerrule=1 57 | skipswitcher=false 58 | skipswitcherrule=1 59 | skiptaskbar=false 60 | skiptaskbarrule=1 61 | strictgeometry=false 62 | strictgeometryrule=1 63 | title=VirtualBox 64 | titlematch=2 65 | type=0 66 | typerule=1 67 | wmclass=virtualbox 68 | wmclasscomplete=false 69 | wmclassmatch=2 70 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/860-bypass-vnc.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - vnc] 2 | Description=bypass - vnc 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | clientmachine= 14 | clientmachinematch=0 15 | closeable=false 16 | closeablerule=1 17 | decocolor=Breeze 18 | decocolorrule=1 19 | desktop=1 20 | desktoprule=1 21 | disableglobalshortcuts=false 22 | disableglobalshortcutsrule=1 23 | fpplevel=0 24 | fpplevelrule=1 25 | fsplevel=0 26 | fsplevelrule=1 27 | fullscreen=false 28 | fullscreenrule=1 29 | ignoregeometry=false 30 | ignoregeometryrule=1 31 | maximizehoriz=false 32 | maximizehorizrule=1 33 | maximizevert=false 34 | maximizevertrule=1 35 | maxsize=32767,32767 36 | maxsizerule=1 37 | minimize=false 38 | minimizerule=1 39 | minsize=1,1 40 | minsizerule=1 41 | noborder=false 42 | noborderrule=1 43 | opacityactive=0 44 | opacityactiverule=1 45 | opacityinactive=0 46 | opacityinactiverule=1 47 | placement=Default 48 | placementrule=1 49 | position=3006,528 50 | positionrule=1 51 | screen=0 52 | screenrule=1 53 | shade=false 54 | shaderule=1 55 | shortcut= 56 | shortcutrule=1 57 | size=960,532 58 | sizerule=1 59 | skippager=false 60 | skippagerrule=1 61 | skipswitcher=false 62 | skipswitcherrule=1 63 | skiptaskbar=false 64 | skiptaskbarrule=1 65 | strictgeometry=false 66 | strictgeometryrule=1 67 | title=TightVNC: 68 | titlematch=0 69 | type=0 70 | typerule=1 71 | wmclass=ncviewer 72 | wmclasscomplete=false 73 | wmclassmatch=2 74 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/README.md: -------------------------------------------------------------------------------- 1 | KWin rules mostly intended for software/hardware design workstations. Mostly causes 'inactive' 'windows' to have slight transparency, using a 'window rule' instead of a 'desktop effect' to allow workarounds where appropriate. 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/001-workaround-GNUoctave-ineffective.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for GNU Octave - Ineffective] 2 | Description=Settings for GNU Octave - Ineffective 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | placement=UnderMouse 6 | placementrule=2 7 | title=Octave 8 | titlematch=2 9 | types=1 10 | wmclass=octave-gui gnu octave 11 | wmclasscomplete=true 12 | wmclassmatch=2 13 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/005-workaround-GNUelectric-ineffective.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for GNUelectric - Ineffective] 2 | Description=Settings for GNUelectric - Ineffective 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | placement=UnderMouse 6 | placementrule=2 7 | position=-2147483648,-2147483648 8 | positionrule=4 9 | title=***NONE*** 10 | titlematch=0 11 | types=1 12 | windowrole=disabled-thy7tirimav2sudnmw 13 | windowrolematch=1 14 | wmclass=com-sun-electric-launcher 15 | wmclasscomplete=true 16 | wmclassmatch=2 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/010-workaround-freecad_1.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for freecad] 2 | Description=Settings for freecad 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | fpplevel=0 6 | fpplevelrule=2 7 | fsplevel=0 8 | fsplevelrule=2 9 | placement=NoPlacement 10 | placementrule=2 11 | title=FreeCAD\s 12 | titlematch=2 13 | types=1 14 | wmclass=freecad 15 | wmclasscomplete=false 16 | wmclassmatch=2 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/011-workaround-freecad_2.kwinrule: -------------------------------------------------------------------------------- 1 | [Settings for freecad] 2 | Description=Settings for freecad 3 | above=true 4 | aboverule=2 5 | clientmachine=localhost 6 | clientmachinematch=0 7 | title=&Constraint Properties 8 | titlematch=2 9 | wmclass=freecad 10 | wmclasscomplete=false 11 | wmclassmatch=2 12 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/015-workaround-arduino.kwinrule: -------------------------------------------------------------------------------- 1 | [FORCE - arduino] 2 | Description=FORCE - arduino 3 | clientmachine= 4 | clientmachinematch=0 5 | ignoregeometry=true 6 | ignoregeometryrule=2 7 | placement=UnderMouse 8 | placementrule=2 9 | position=-2147483648,-2147483648 10 | positionrule=1 11 | title=Arduino 12 | titlematch=2 13 | wmclass=processing-app-base 14 | wmclasscomplete=false 15 | wmclassmatch=2 16 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/020-workaround-java-ineffective.kwinrule: -------------------------------------------------------------------------------- 1 | [FORCE - Java - disabled] 2 | Description=FORCE - Java - disabled 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=32767,32767 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=1,1 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=0 42 | opacityactiverule=1 43 | opacityinactive=0 44 | opacityinactiverule=1 45 | placement=UnderMouse 46 | placementrule=1 47 | position=-2147483648,-2147483648 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | skippager=false 56 | skippagerrule=1 57 | skipswitcher=false 58 | skipswitcherrule=1 59 | skiptaskbar=false 60 | skiptaskbarrule=1 61 | strictgeometry=false 62 | strictgeometryrule=1 63 | title=Java 64 | titlematch=2 65 | type=0 66 | typerule=1 67 | windowrole=disabled-jaglopjd7txbmfs9xu 68 | windowrolematch=0 69 | wmclass=disabled-jaglopjd7txbmfs9xu 70 | wmclasscomplete=false 71 | wmclassmatch=1 72 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/200-optional-temp-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [temp - opaque] 2 | Description=temp - opaque 3 | below=true 4 | belowrule=2 5 | clientmachine= 6 | clientmachinematch=0 7 | opacityactive=100 8 | opacityactiverule=2 9 | opacityinactive=100 10 | opacityinactiverule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=DISABLED - DISABLED 18 | titlematch=1 19 | wmclass=disabled - disabled 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/210-optional-gimp-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [gimp - opaque] 2 | Description=gimp - opaque 3 | clientmachine= 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=GIMP 10 | titlematch=2 11 | wmclass=gimp 12 | wmclasscomplete=false 13 | wmclassmatch=2 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/210-optional-obs-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [obs - opaque] 2 | Description=obs - opaque 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=DISABLED - OBS 10 | titlematch=2 11 | wmclass=disabled - obs 12 | wmclasscomplete=false 13 | wmclassmatch=1 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/220-optional-smplayer-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [smplayer - opaque] 2 | Description=smplayer - opaque 3 | below=true 4 | belowrule=2 5 | minimize=false 6 | minimizerule=2 7 | opacityactive=100 8 | opacityactiverule=2 9 | opacityinactive=100 10 | opacityinactiverule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=SMPlayer 18 | titlematch=2 19 | wmclass=smplayer 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/220-optional-vlc-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [vlc - opaque] 2 | Description=vlc - opaque 3 | opacityactive=100 4 | opacityactiverule=2 5 | opacityinactive=100 6 | opacityinactiverule=2 7 | title=VLC media player 8 | titlematch=2 9 | wmclass=vlc 10 | wmclasscomplete=false 11 | wmclassmatch=1 12 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/250-optional-audacious-custom.kwinrule: -------------------------------------------------------------------------------- 1 | [audacious - background] 2 | Description=audacious - background 3 | acceptfocus=true 4 | acceptfocusrule=2 5 | below=true 6 | belowrule=2 7 | clientmachine= 8 | clientmachinematch=0 9 | desktop=-1 10 | desktoprule=1 11 | minimize=false 12 | minimizerule=2 13 | opacityactive=70 14 | opacityactiverule=2 15 | opacityinactive=35 16 | opacityinactiverule=2 17 | skippager=true 18 | skippagerrule=2 19 | skipswitcher=true 20 | skipswitcherrule=2 21 | skiptaskbar=true 22 | skiptaskbarrule=2 23 | title=Audacious 24 | titlematch=2 25 | type=0 26 | typerule=2 27 | wmclass=audacious 28 | wmclasscomplete=true 29 | wmclassmatch=2 30 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/300-tag-daemon-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [tag - daemon - opaque] 2 | Description=tag - daemon - opaque 3 | below=true 4 | belowrule=1 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=100 8 | opacityinactiverule=2 9 | title=m58nOgWA 10 | titlematch=2 11 | types=1 12 | wmclass= 13 | wmclasscomplete=false 14 | wmclassmatch=0 15 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/300-tag-picturewidget-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [picturewidget-opaque] 2 | Description=picturewidget-opaque 3 | activity=00000000-0000-0000-0000-000000000000 4 | activityrule=2 5 | below=true 6 | belowrule=2 7 | desktop=-1 8 | desktoprule=2 9 | opacityactive=100 10 | opacityactiverule=2 11 | opacityinactive=100 12 | opacityinactiverule=2 13 | skippager=true 14 | skippagerrule=2 15 | skipswitcher=true 16 | skipswitcherrule=2 17 | skiptaskbar=true 18 | skiptaskbarrule=2 19 | title=picturewidget 20 | titlematch=1 21 | types=1 22 | wmclass= 23 | wmclasscomplete=false 24 | wmclassmatch=0 25 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/300-tag-videowidget-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [videowidget-opaque] 2 | Description=videowidget-opaque 3 | activity=00000000-0000-0000-0000-000000000000 4 | activityrule=2 5 | below=true 6 | belowrule=2 7 | desktop=-1 8 | desktoprule=2 9 | fullscreen=true 10 | fullscreenrule=3 11 | opacityactive=100 12 | opacityactiverule=2 13 | opacityinactive=100 14 | opacityinactiverule=2 15 | screen=2 16 | screenrule=2 17 | skippager=true 18 | skippagerrule=2 19 | skipswitcher=true 20 | skipswitcherrule=2 21 | skiptaskbar=true 22 | skiptaskbarrule=2 23 | title=videowidget 24 | titlematch=1 25 | types=1 26 | wmclass=mplayer 27 | wmclasscomplete=false 28 | wmclassmatch=0 29 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/500-glass.kwinrule: -------------------------------------------------------------------------------- 1 | [glass] 2 | Description=glass 3 | clientmachine=disabled 4 | clientmachinematch=0 5 | opacityactive=100 6 | opacityactiverule=2 7 | opacityinactive=85 8 | opacityinactiverule=2 9 | title=DISABLED 10 | titlematch=0 11 | types=953 12 | windowrole=disabled 13 | windowrolematch=0 14 | wmclass=disabled 15 | wmclasscomplete=false 16 | wmclassmatch=0 17 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/600-opaque.kwinrule: -------------------------------------------------------------------------------- 1 | [opaque] 2 | Description=opaque 3 | opacityactive=100 4 | opacityactiverule=2 5 | opacityinactive=100 6 | opacityinactiverule=2 7 | wmclass=disabled 8 | wmclasscomplete=false 9 | wmclassmatch=0 10 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/800-daemon-xterm.kwinrule: -------------------------------------------------------------------------------- 1 | [daemon - XTerm] 2 | Description=daemon - XTerm 3 | below=true 4 | belowrule=2 5 | blockcompositing=true 6 | blockcompositingrule=1 7 | clientmachine= 8 | clientmachinematch=0 9 | desktop=12 10 | desktoprule=2 11 | skippager=true 12 | skippagerrule=2 13 | skipswitcher=true 14 | skipswitcherrule=2 15 | skiptaskbar=true 16 | skiptaskbarrule=2 17 | title=ethminer 18 | titlematch=0 19 | wmclass=xterm 20 | wmclasscomplete=false 21 | wmclassmatch=1 22 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/850-bypass-yakuake.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - yakuake] 2 | Description=bypass - yakuake 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=32767,32767 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=1,1 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=0 42 | opacityactiverule=1 43 | opacityinactive=0 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=2048,0 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | size=960,532 56 | sizerule=1 57 | skippager=false 58 | skippagerrule=1 59 | skipswitcher=false 60 | skipswitcherrule=1 61 | skiptaskbar=false 62 | skiptaskbarrule=1 63 | strictgeometry=false 64 | strictgeometryrule=1 65 | title=Yakuake 66 | titlematch=0 67 | type=0 68 | typerule=1 69 | wmclass=yakuake 70 | wmclasscomplete=false 71 | wmclassmatch=1 72 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/860-bypass-eclipse.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - Eclipse] 2 | Description=bypass - Eclipse 3 | clientmachine=localhost 4 | clientmachinematch=0 5 | position=2689,917 6 | positionrule=1 7 | size=205,280 8 | sizerule=1 9 | title=Eclipse 10 | titlematch=2 11 | wmclass=eclipse 12 | wmclasscomplete=false 13 | wmclassmatch=2 14 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/860-bypass-qemu.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - qemu] 2 | Description=bypass - qemu 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | clientmachine= 14 | clientmachinematch=0 15 | closeable=false 16 | closeablerule=1 17 | decocolor=Breeze 18 | decocolorrule=1 19 | desktop=1 20 | desktoprule=1 21 | disableglobalshortcuts=false 22 | disableglobalshortcutsrule=1 23 | fpplevel=0 24 | fpplevelrule=1 25 | fsplevel=0 26 | fsplevelrule=1 27 | fullscreen=false 28 | fullscreenrule=1 29 | ignoregeometry=false 30 | ignoregeometryrule=1 31 | maximizehoriz=false 32 | maximizehorizrule=1 33 | maximizevert=false 34 | maximizevertrule=1 35 | maxsize=960,532 36 | maxsizerule=1 37 | minimize=false 38 | minimizerule=1 39 | minsize=960,532 40 | minsizerule=1 41 | noborder=false 42 | noborderrule=1 43 | opacityactive=100 44 | opacityactiverule=1 45 | opacityinactive=100 46 | opacityinactiverule=1 47 | placement=Default 48 | placementrule=1 49 | position=2307,1388 50 | positionrule=1 51 | screen=0 52 | screenrule=1 53 | shade=false 54 | shaderule=1 55 | shortcut= 56 | shortcutrule=1 57 | size=2048,1152 58 | sizerule=1 59 | skippager=false 60 | skippagerrule=1 61 | skipswitcher=false 62 | skipswitcherrule=1 63 | skiptaskbar=false 64 | skiptaskbarrule=1 65 | strictgeometry=false 66 | strictgeometryrule=1 67 | title=QEMU 68 | titlematch=0 69 | type=0 70 | typerule=1 71 | wmclass=qemu-system-x86_64 72 | wmclasscomplete=false 73 | wmclassmatch=2 74 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/860-bypass-vbox_1.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - VBox] 2 | Description=bypass - VBox 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=646,546 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=646,546 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=100 42 | opacityactiverule=1 43 | opacityinactive=100 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=2599,728 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | size=646,546 56 | sizerule=1 57 | skippager=false 58 | skippagerrule=1 59 | skipswitcher=false 60 | skipswitcherrule=1 61 | skiptaskbar=false 62 | skiptaskbarrule=1 63 | strictgeometry=false 64 | strictgeometryrule=1 65 | title=Oracle VM VirtualBox 66 | titlematch=2 67 | type=0 68 | typerule=1 69 | wmclass=box 70 | wmclasscomplete=false 71 | wmclassmatch=2 72 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/860-bypass-vbox_2.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - VBox] 2 | Description=bypass - VBox 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | closeable=false 14 | closeablerule=1 15 | decocolor=Breeze 16 | decocolorrule=1 17 | desktop=1 18 | desktoprule=1 19 | disableglobalshortcuts=false 20 | disableglobalshortcutsrule=1 21 | fpplevel=0 22 | fpplevelrule=1 23 | fsplevel=0 24 | fsplevelrule=1 25 | fullscreen=false 26 | fullscreenrule=1 27 | ignoregeometry=false 28 | ignoregeometryrule=1 29 | maximizehoriz=false 30 | maximizehorizrule=1 31 | maximizevert=false 32 | maximizevertrule=1 33 | maxsize=32767,32767 34 | maxsizerule=1 35 | minimize=false 36 | minimizerule=1 37 | minsize=1,1 38 | minsizerule=1 39 | noborder=false 40 | noborderrule=1 41 | opacityactive=0 42 | opacityactiverule=1 43 | opacityinactive=0 44 | opacityinactiverule=1 45 | placement=Default 46 | placementrule=1 47 | position=-2147483648,-2147483648 48 | positionrule=1 49 | screen=0 50 | screenrule=1 51 | shade=false 52 | shaderule=1 53 | shortcut= 54 | shortcutrule=1 55 | skippager=false 56 | skippagerrule=1 57 | skipswitcher=false 58 | skipswitcherrule=1 59 | skiptaskbar=false 60 | skiptaskbarrule=1 61 | strictgeometry=false 62 | strictgeometryrule=1 63 | title=VirtualBox 64 | titlematch=2 65 | type=0 66 | typerule=1 67 | wmclass=virtualbox 68 | wmclasscomplete=false 69 | wmclassmatch=2 70 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/860-bypass-vnc.kwinrule: -------------------------------------------------------------------------------- 1 | [bypass - vnc] 2 | Description=bypass - vnc 3 | above=false 4 | aboverule=1 5 | acceptfocus=false 6 | acceptfocusrule=1 7 | activity=00000000-0000-0000-0000-000000000000 8 | activityrule=1 9 | below=false 10 | belowrule=1 11 | blockcompositing=false 12 | blockcompositingrule=1 13 | clientmachine= 14 | clientmachinematch=0 15 | closeable=false 16 | closeablerule=1 17 | decocolor=Breeze 18 | decocolorrule=1 19 | desktop=1 20 | desktoprule=1 21 | disableglobalshortcuts=false 22 | disableglobalshortcutsrule=1 23 | fpplevel=0 24 | fpplevelrule=1 25 | fsplevel=0 26 | fsplevelrule=1 27 | fullscreen=false 28 | fullscreenrule=1 29 | ignoregeometry=false 30 | ignoregeometryrule=1 31 | maximizehoriz=false 32 | maximizehorizrule=1 33 | maximizevert=false 34 | maximizevertrule=1 35 | maxsize=32767,32767 36 | maxsizerule=1 37 | minimize=false 38 | minimizerule=1 39 | minsize=1,1 40 | minsizerule=1 41 | noborder=false 42 | noborderrule=1 43 | opacityactive=0 44 | opacityactiverule=1 45 | opacityinactive=0 46 | opacityinactiverule=1 47 | placement=Default 48 | placementrule=1 49 | position=3006,528 50 | positionrule=1 51 | screen=0 52 | screenrule=1 53 | shade=false 54 | shaderule=1 55 | shortcut= 56 | shortcutrule=1 57 | size=960,532 58 | sizerule=1 59 | skippager=false 60 | skippagerrule=1 61 | skipswitcher=false 62 | skipswitcherrule=1 63 | skiptaskbar=false 64 | skiptaskbarrule=1 65 | strictgeometry=false 66 | strictgeometryrule=1 67 | title=TightVNC: 68 | titlematch=0 69 | type=0 70 | typerule=1 71 | wmclass=ncviewer 72 | wmclasscomplete=false 73 | wmclassmatch=2 74 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/970-optional-position-dolphinfilemanager.kwinrule: -------------------------------------------------------------------------------- 1 | [position - launch] 2 | Description=position - launch 3 | maximizevert=true 4 | maximizevertrule=3 5 | position=0,1080 6 | positionrule=3 7 | size=960,1024 8 | sizerule=3 9 | title=Dolphin 10 | titlematch=2 11 | types=1 12 | wmclass=dolphin 13 | wmclasscomplete=false 14 | wmclassmatch=1 15 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/971-optional-size-dolphinfilemanager-large.kwinrule: -------------------------------------------------------------------------------- 1 | [size - large] 2 | Description=size - large 3 | clientmachine= 4 | clientmachinematch=0 5 | size=1920,1064 6 | sizerule=3 7 | title=Mozilla Firefox 8 | titlematch=0 9 | types=1 10 | windowrole=disabled 11 | windowrolematch=0 12 | wmclass=.*irefox.* 13 | wmclasscomplete=false 14 | wmclassmatch=3 15 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/972-optional-size-firefox-vertical.kwinrule: -------------------------------------------------------------------------------- 1 | [size - vertical] 2 | Description=size - vertical 3 | size=960,1024 4 | sizerule=3 5 | title=Dolphin 6 | titlematch=2 7 | types=1 8 | wmclass=dolphin 9 | wmclasscomplete=false 10 | wmclassmatch=1 11 | -------------------------------------------------------------------------------- /_lib/desktop/kwin-rules/dev/_ref/export/980-optional-size-default.kwinrule: -------------------------------------------------------------------------------- 1 | [size - default] 2 | Description=size - default 3 | maximizehoriz=false 4 | maximizehorizrule=3 5 | maximizevert=false 6 | maximizevertrule=3 7 | size=960,532 8 | sizerule=3 9 | types=1 10 | windowrole=disabled 11 | windowrolematch=0 12 | wmclass= 13 | wmclasscomplete=false 14 | wmclassmatch=0 15 | -------------------------------------------------------------------------------- /_lib/desktop/kwrite/README.md: -------------------------------------------------------------------------------- 1 | 2 | Kwrite/Kate theme simultaneously intended to reduce both sleep disruption and eyestrain for both computer monitor and VR headset users. 3 | 4 | 5 | Derived from 'KDE' 'Breeze Dark' color scheme provided with 'Debian GNU/Linux 10' . Relevant packages and corresponding upstream source code available from Debian repositories. 6 | 7 | https://packages.debian.org/buster/kde/kde-style-breeze 8 | https://packages.debian.org/buster/kde/kde-style-breeze-qt4 9 | 10 | 11 | - 12 | 13 | Subsequently converted with 'theme-converter.py' . 14 | 15 | https://blog.sgorava.xyz/memory/2020/09/usage-of-kateschema-converter/ 16 | https://git.sgorava.xyz/Miscellaneous/kscheme-converter/raw/branch/master/theme_converter.py 17 | 18 | 19 | -------------------------------------------------------------------------------- /_lib/docker/debian/ubvrt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubvrt/debian:jessie 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ 4 | ca-certificates \ 5 | curl \ 6 | x11-apps \ 7 | libgl1-mesa-glx libgl1-mesa-dri mesa-utils \ 8 | wget \ 9 | gnupg2 \ 10 | file \ 11 | build-essential \ 12 | fuse \ 13 | hicolor-icon-theme \ 14 | nano \ 15 | vim 16 | 17 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install default-jre 18 | 19 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install grub2 makedev linux-image-amd64 20 | 21 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install cifs-utils nmap smbclient 22 | 23 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install lxde-core lxde task-lxde-desktop 24 | 25 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y install kde-plasma-desktop kde-standard kde-full task-kde-desktop 26 | -------------------------------------------------------------------------------- /_lib/kit/README.md: -------------------------------------------------------------------------------- 1 | Overwrite or patch forks of Ubiquitous Bash with these kits, either to modify behavior, or as a starting point for a specific type of project. 2 | -------------------------------------------------------------------------------- /_lib/kit/all/.git-mandatory/hooks/decompress_recompress.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import zipfile 5 | import io 6 | 7 | # ATTRIBUTION: Github Copilot 2024-03-20 8 | 9 | def decompress_zip(input_zip): 10 | with zipfile.ZipFile(input_zip, 'r') as zip_ref: 11 | return {name: zip_ref.read(name) for name in zip_ref.namelist()} 12 | 13 | def recompress_zip(output_zip, files): 14 | with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_STORED) as zipf: 15 | for name, data in files.items(): 16 | zipf.writestr(name, data) 17 | 18 | def main(): 19 | input_zip = sys.argv[1] 20 | output_zip = sys.argv[2] 21 | 22 | with open(input_zip, 'rb') as f: 23 | files = decompress_zip(io.BytesIO(f.read())) 24 | 25 | output_data = io.BytesIO() 26 | recompress_zip(output_data, files) 27 | 28 | with open(output_zip, 'wb') as f: 29 | f.write(output_data.getvalue()) 30 | 31 | if __name__ == "__main__": 32 | main() -------------------------------------------------------------------------------- /_lib/kit/containment/_prog/core.sh: -------------------------------------------------------------------------------- 1 | #all2="" 2 | 3 | #command 4 | _app_command() { 5 | "$scriptAbsoluteFolder"/_local/setups/appExe "$@" 6 | } 7 | 8 | #edit 9 | _app_edit() { 10 | "$scriptAbsoluteLocation" _editFakeHome "$scriptAbsoluteLocation" _app_command "$@" 11 | } 12 | 13 | #user 14 | _app_user() { 15 | "$scriptAbsoluteLocation" _userFakeHome "$scriptAbsoluteLocation" _app_command "$@" 16 | } 17 | 18 | #virtualized 19 | _v_app() { 20 | _userQemu "$scriptAbsoluteLocation" _app_user "$@" 21 | } 22 | 23 | #default 24 | _app() { 25 | if ! _check_prog 26 | then 27 | _messageNormal 'Launch: _v'${FUNCNAME[0]} 28 | _v${FUNCNAME[0]} "$@" 29 | return 30 | fi 31 | _app_user "$@" && return 0 32 | 33 | #_messageNormal 'Launch: _v'${FUNCNAME[0]} 34 | #_v${FUNCNAME[0]} "$@" 35 | } 36 | 37 | #duplicate _anchor 38 | _refresh_anchors() { 39 | _refresh_anchors_ubiquitous 40 | 41 | cp -a "$scriptAbsoluteFolder"/_anchor "$scriptAbsoluteFolder"/_app 42 | } 43 | 44 | 45 | #####^ Core 46 | -------------------------------------------------------------------------------- /_lib/kit/containment/_prog/core.sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_lib/kit/containment/_prog/core.sh.png -------------------------------------------------------------------------------- /_lib/kit/containment/_prog/generate_bash_prog.sh: -------------------------------------------------------------------------------- 1 | _generate_compile_bash_prog() { 2 | "$scriptAbsoluteLocation" _true 3 | 4 | rm "$scriptAbsoluteFolder"/ubiquitous_bash.sh 5 | 6 | #"$scriptAbsoluteLocation" _compile_bash cautossh cautossh 7 | #"$scriptAbsoluteLocation" _compile_bash lean lean.sh 8 | 9 | "$scriptAbsoluteLocation" _compile_bash core ubiquitous_bash.sh 10 | 11 | #"$scriptAbsoluteLocation" _compile_bash "" "" 12 | #"$scriptAbsoluteLocation" _compile_bash ubiquitous_bash ubiquitous_bash.sh 13 | 14 | #"$scriptAbsoluteLocation" _package 15 | } 16 | -------------------------------------------------------------------------------- /_lib/kit/containment/_prog/installation_prog.sh: -------------------------------------------------------------------------------- 1 | _check_prog() { 2 | ! _typeDep dependency && return 1 3 | 4 | return 0 5 | } 6 | 7 | _test_prog() { 8 | _getDep dependency 9 | 10 | ! _check_prog && echo 'missing: dependency mismatch' && stop 1 11 | return 0 12 | } 13 | -------------------------------------------------------------------------------- /_lib/kit/containment/_prog/program.sh: -------------------------------------------------------------------------------- 1 | #####Program 2 | 3 | #Typically launches an application - ie. through virtualized container. 4 | _launch() { 5 | _app "$@" 6 | } 7 | 8 | #Typically gathers command/variable scripts from other (ie. yaml) file types (ie. AppImage recipes). 9 | _collect() { 10 | false 11 | } 12 | 13 | #Typical program entry point, absent any instancing support. 14 | _enter() { 15 | _launch "$@" 16 | } 17 | 18 | #Typical program entry point. 19 | _main() { 20 | _start 21 | 22 | _collect 23 | 24 | _enter "$@" 25 | 26 | _stop 27 | } 28 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/direct/_user/mirage335/cloud-config-errata.cfg: -------------------------------------------------------------------------------- 1 | 2 | users: 3 | - default 4 | - name: user 5 | gecos: user 6 | sudo: ALL=(ALL) NOPASSWD:ALL 7 | primary_group: user 8 | groups: users, sudo, wheel, wireshark, cdrom, floppy, audio, dip, video, plugdev, netdev, bluetooth, lpadmin, scanner, disk, dialout, vboxusers, libvirt, docker 9 | ssh_import_id: 10 | - gh:mirage335 11 | lock_passwd: true 12 | ssh_authorized_keys: 13 | - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCgow4raO0NvxarkPzohs5bH3CL6IH7ygJnNhzZzj3SN6jUQ70HyH6bId99SSfR7+D69rn9pGwAwTOKcr+wNMSZrLfa3bOCS4MzdYlmUkE88BbLKYG1ZPpf/iu6e8IFwncM1nT0CRlLgp4tsrDo7Y2gFJTr2XVd2NYqrtcA/7P6d6sDHMsAY4JLnjPZzQrgJExQmqR6/YbZrqsrXwDaLVRMz6s8kWIQnIAQD+Kyxy7do2pW8DtdAhJ/Oy+pWDMk4Oo5ZN+0qoN+f1S39kuyFtvwHaGfKzUR8eMDaGqcmB9xf+32hE0YpkC40pznHxqziOdC9mgavfdZk+bOLu35MN81pNb+maFNQ05IDdDn2ipNttE1cw3YI3BHfBlUWrP6XO/EBY8bs1dPHxi1em+z4j/LrqwxZi1S0Mzdi0WqAi5dQ5pfmRmuCJjiHF+oMHwvyDRxduxuY4tfQDXmXtkWbk0Z4S5K3pTllsJjmB7Q+lQsDzrI7Z8cS6Fq2a+qZdveC2NU8+sKeTWcEPCAo9Oj02eDpbTeTWsNCn3UKj4TyovFbXWvEYiGjxJJnWb389mBxQpE5iLNBOeKJEqh7e6QPmlLPKVHcpnAP6b76OCjxYLD0WsHSHNAXY6rOYpxfSD4judWsA5/kipKjCzOq3yzyH8LhWap3Ybsb0nNy8fF9m1TBQ== commonadmin@morgan 14 | shell: /bin/bash 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/debian11/deleteme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/id_rsa_nologin_bogus.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDX47al6zAIy+5JggK1Ym7u+P0SU9pcCAhH56o4pSTi4MEz3YsbOVxAYqcjkm+HMcXGiwL5vLZslb40r2l/pn71xZCgv6THEXozN9Eb/W0PUU19rC/sT4JVMt0Q7OSN82S7UqD8krJz76mFUo7NS+GQtch+Bc6Co+MKfrfXGCaFZwgQ+WZBygYLTnQqTIXYqM1kVm1nyCEklFRI1fhBWzkBFC+ntpwGNW+f90S4DKqzY0vUGeOy9E+SLiZKSgtLIc2xLsf7JBJOb2JVly+K8X6LnWbOmQ3ehtXNcRNiJmgFzZ379LYa37NZICtTK9b0Srd6YjKRrO8rnx4FsVVmvXUJ+S5FmtJfVuCk8y+mm7k9sBL1oU5qrg0jX9bzgVBxkgxx7KbVt9GxgX23TG9jxzYW6YTJWxWXzYkzXbYgx7WBwtjk67bJ9GXjR+L/ok3H1oSNvlFDoTpkrCLK5AQi6gXmUOhNSaK60nACcOVqeyFmYFZUDM3/ItqptVab212s4nah31uAIscJ1qEWS3Z5f+mFvkY2mZaZ1kCjHBf23ntCEeU/yoIXb4JukPjWleR+R8S6FUlRybkdeUduM74fpTqlKt/dhWmVtbWJOSAVgc8saMTbaa6G3obu7WIph2Uf1PXjvkdc+pstE+9eXlyz9yWLYA/F/fyzyXgNnlZG3T4KEQ== nologin@bogus 2 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/specialized/croc/README.md: -------------------------------------------------------------------------------- 1 | 2 | Paste one of these three scripts as 'user data' (or similar) to a cloud provider, Debian, Ubuntu, or similar server OS. A 'croc' relay will run on port 9009 within approximately two minutes, and will also run after reboot if necessary. No login necessary. 3 | 4 | 5 | croc --relay '' --relay6 '' send ./file 6 | 7 | 8 | 9 | 10 | 11 | nmap '' -p 9009 -Pn 12 | 13 | Apparently usable as-is with Digital Ocean and Hetzner. With Vultur, did not seem to open the correct ports (eg. 9009). Expected usable as-is with other cloud providers (eg. Azure) as well. 14 | 15 | Please beware these scripts may be derived from much more complete upstream scripts. Please see '_lib/kit/install/cloud/cloud-init/zRotten/special/croc' from 'ubiquitous_bash' . 16 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/zMinimal/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #cloud-config.cfg 3 | #rotten_install_compressed.sh 4 | #rotten_compressed.sh 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/zMinimal/README.md: -------------------------------------------------------------------------------- 1 | 2 | ``` 3 | # If 'user data', 'cloud init', copy/paste of script to cloud provider unavailable or irrelevant. 4 | # User password will be changed to random. 5 | # Obviously may install third-party products. May install products of Soaring Distributions LLC. 6 | 7 | #wget https://raw.githubusercontent.com/mirage335/ubiquitous_bash/master/_lib/kit/install/cloud/cloud-init/zRotten/zMinimal/rotten_install_compressed.sh 8 | 9 | 10 | wget https://bit.ly/rotInsSh 11 | chmod u+x rotInsSh 12 | ./rotInSSh _custom_kernel 13 | ./rotInsSh _install_and_run 14 | 15 | # optional 16 | ./rotInsSh _custom_core_drop 17 | 18 | 19 | ``` 20 | -------------------------------------------------------------------------------- /_lib/kit/install/cloud/cloud-init/zRotten/zMinimal/WARNING-dependency.txt: -------------------------------------------------------------------------------- 1 | 2 | WARNING 3 | 4 | Files here may be a dependency (eg. of ubDistBuild , etc). 5 | -------------------------------------------------------------------------------- /_lib/kit/install/distro/debian/README.md: -------------------------------------------------------------------------------- 1 | 2 | See ' _install_debian11 ' . 3 | 4 | At least some files from '_bin' (ie. 'gosu' and similar) will be required. 5 | 6 | 7 | -------------------------------------------------------------------------------- /_lib/kit/mod/_lib/app/udev/rules/deleteme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_lib/kit/mod/_lib/modules/_ref/README.md: -------------------------------------------------------------------------------- 1 | Do NOT attempt to manually overlay these files. 2 | 3 | Automatically generated from other modules, kept as examples only. Only intended in case of severe compatibility issues with future upstream codebases. 4 | -------------------------------------------------------------------------------- /_lib/kit/mod/_lib/modules/overlay/deleteme: -------------------------------------------------------------------------------- 1 | placeholder for git 2 | 3 | delete if folder not empty 4 | -------------------------------------------------------------------------------- /_lib/kit/mod/_lib/modules/splice/gitdiff/deleteme: -------------------------------------------------------------------------------- 1 | placeholder for git 2 | 3 | delete if folder not empty 4 | -------------------------------------------------------------------------------- /_lib/kit/mod/_prog/generate_bash_prog.sh: -------------------------------------------------------------------------------- 1 | _generate_compile_bash_prog() { 2 | "$scriptAbsoluteLocation" _true 3 | 4 | rm "$scriptAbsoluteFolder"/ubiquitous_bash.sh 5 | 6 | #"$scriptAbsoluteLocation" _compile_bash cautossh cautossh 7 | #"$scriptAbsoluteLocation" _compile_bash lean lean.sh 8 | 9 | "$scriptAbsoluteLocation" _compile_bash core ubiquitous_bash.sh 10 | 11 | #"$scriptAbsoluteLocation" _compile_bash "" "" 12 | #"$scriptAbsoluteLocation" _compile_bash ubiquitous_bash ubiquitous_bash.sh 13 | 14 | #"$scriptAbsoluteLocation" _package 15 | } 16 | -------------------------------------------------------------------------------- /_lib/kit/mod/_prog/installation_prog.sh: -------------------------------------------------------------------------------- 1 | _check_prog() { 2 | ! _typeDep true && return 1 3 | 4 | return 0 5 | } 6 | 7 | _test_prog() { 8 | _getDep true 9 | 10 | ! _check_prog && echo 'missing: dependency mismatch' && _stop 1 11 | return 0 12 | } 13 | 14 | _test_build_prog() { 15 | true 16 | } 17 | 18 | # WARNING: Only use this function to retrieve initial sources, as documenation.. Do NOT perform update (ie. git submodule) operations. Place those instructions under _update_mod . 19 | _fetch_prog() { 20 | true 21 | } 22 | 23 | _build_prog() { 24 | _fetch_prog 25 | 26 | true 27 | } 28 | 29 | _setup_udev() { 30 | ! _wantSudo && echo 'denied: sudo' && _stop 1 31 | 32 | sudo -n bash -c '[[ -e /etc/udev/rules.d/ ]]' && sudo -n cp "$scriptLib"/app/udev/rules/. /etc/udev/rules.d/ 33 | 34 | 35 | sudo -n usermod -a -G plugdev "$USER" 36 | } 37 | 38 | _setup_prog() { 39 | _setup_udev 40 | } 41 | -------------------------------------------------------------------------------- /_lib/kit/mod/_prog/specglobalvars.sh: -------------------------------------------------------------------------------- 1 | export app_orig="$scriptLib"/app 2 | export app_mod="$scriptLib"/modName 3 | 4 | 5 | 6 | export scriptModules="$scriptLib"/modules 7 | 8 | export overlay="$scriptModules"/overlay 9 | 10 | export splice="$scriptModules"/splice 11 | export spliceGitdiff="$scriptModules"/splice/gitdiff 12 | 13 | export spliceTmp="$safeTmp"/splice 14 | export spliceTmpGitdiff="$spliceTmp"/gitdiff 15 | 16 | _prepare_splice() { 17 | mkdir -p "$spliceTmp" 18 | mkdir -p "$spliceTmpGitdiff" 19 | } 20 | 21 | _prepare_prog() { 22 | true 23 | } 24 | -------------------------------------------------------------------------------- /_lib/kit/raspi/README.md: -------------------------------------------------------------------------------- 1 | 2 | WARNING: At least parly OBSOLETE . Much has been copied to upstream 'ubiquitous bash', improved, and some other code may have become part of 'ubDistBuild', also may be improved. 3 | 4 | Nonetheless, this 'kit' remains an example illustrating how to modify *existing* raspi, BIOS, VM, etc, images. 5 | 6 | 7 | # Usage 8 | 9 | Requires specific files to be installed in specific locations. See "_doc" for brief specifications. 10 | 11 | Typically intended for embedded computers, such as raspi . 12 | 13 | Support for x64, and even x64 specific features, may be included. 14 | 15 | Despite the name "raspi", this kit is designed to, but not guaranteed to be tested to, modify standard bootable x64 images as well. Rather, "raspi" is the original primarily supported device. 16 | 17 | 18 | # Special 19 | 20 | EFI OS may require the 'default' 'bootloader' file, such as 'EFI/ubuntu/grubx64.efi' to be copied to 'EFI/BOOT/bootx64.efi' , to allow booting by other computers (including virtual machines). 21 | 22 | https://askubuntu.com/questions/380447/uefi-boot-fails-when-cloning-image-to-new-machine 23 | 24 | 25 | # Exceptions 26 | 27 | Not all files in this kit need be copied. 28 | 29 | * "README.md" 30 | Describes kit, not any resulting project. 31 | 32 | * "_doc" 33 | Syntax highlighted documentation. Retain in submodule. 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /_lib/kit/raspi/_doc/10_doc_ipo_user.sh: -------------------------------------------------------------------------------- 1 | # ATTENTION: Syntax highlighted documentation. Description of typical [Input]-[Process]-[Output] (IPO) . 2 | 3 | 4 | # INPUT - USER 5 | _INPUT_COMMENT() { 6 | 7 | # "$1" == current_username 8 | # stdin = password 9 | #_custom_construct_user() { } 10 | 11 | "$scriptLocal"/ssh_pub_"$current_username"/*.pub 12 | 13 | "$scriptLocal"/_custom/crontab # Typically deleted at start of '_custom' . 14 | 15 | } 16 | 17 | # OUTPUT - USER 18 | _OUTPUT_COMMENT() { 19 | 20 | "$globalVirtFS"/home/"$current_username"/.ssh/authorized_keys 21 | 22 | crontab -u "$custom_user" 23 | 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /_lib/kit/raspi/_doc/60_doc_ipo_cautossh.sh: -------------------------------------------------------------------------------- 1 | # ATTENTION: Syntax highlighted documentation. Description of typical [Input]-[Process]-[Output] (IPO) . 2 | 3 | 4 | 5 | # INPUT - CAUTOSSH 6 | _INPUT_COMMENT() { 7 | 8 | "$custom_netName" 9 | "$custom_user" 10 | 11 | "$scriptLib"/"$custom_cautossh_dirname" 12 | /cautossh 13 | /_config/_config/ 14 | netvars.sh # OPTIONAL reference, MANDATORY compile ! 15 | /_local/ 16 | /ssh/ 17 | /entity/ # OPTIONAL ! 18 | id_rsa.pub # OPTIONAL ! 19 | id_rsa.pub 20 | ops.sh 21 | known_hosts # Offending entries removed. OPTIONAL ! 22 | ... 23 | ... 24 | 25 | } 26 | 27 | # OUTPUT - CAUTOSSH 28 | _OUTPUT_COMMENT() { 29 | 30 | "$globalVirtFS"/home/"$custom_user"/core/"$custom_cautossh_dirname" 31 | ... 32 | 33 | "$scriptLocal"/_custom/crontab 34 | 35 | } 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /_lib/kit/raspi/_doc/70_doc_ipo_cautossh_limited.sh: -------------------------------------------------------------------------------- 1 | # ATTENTION: Syntax highlighted documentation. Description of typical [Input]-[Process]-[Output] (IPO) . 2 | # DANGER: Adhere to this specification. 3 | 4 | 5 | # INPUT - CAUTOSSH LIMITED 6 | _INPUT_COMMENT() { 7 | 8 | "$custom_netName" 9 | "$custom_user" 10 | "$custom_hostname" 11 | 12 | export custom_cautossh_limited_dirname="$custom_netName"-limited 13 | export custom_cautossh_limited_reversePort_all=( $("$custom_cautossh_limited_src_exe" _show_reversePorts '*' 2> /dev/null) ) 14 | 15 | "$scriptLib"/"$custom_cautossh_limited_dirname" 16 | /cautossh 17 | /_config/_config/ 18 | netvars.sh # Define at most two 'reversePort' - desired and default . OPTIONAL reference, MANDATORY compile ! 19 | /_local/ 20 | /ssh/ # NO IDENTITY FILES ! 21 | ops.sh # Gateways only. 22 | known_hosts # Gateways only. Offending entries removed. OPTIONAL ! 23 | /tor/sshd/ # ONLY one, matching 'reversePort' . 24 | ... 25 | /compile.sh # OPTIONAL ! 26 | /_lib/ # OPTIONAL ! 27 | /_prog/ # OPTIONAL ! 28 | 29 | } 30 | 31 | # OUTPUT - CAUTOSSH LIMITED 32 | _OUTPUT_COMMENT() { 33 | 34 | "$globalVirtFS"/home/"$custom_user"/core/"$custom_cautossh_limited_dirname" 35 | /_local/ 36 | /ssh/ 37 | /entity/ # OPTIONAL ! 38 | id_rsa # OPTIONAL ! 39 | id_rsa.pub # OPTIONAL ! 40 | id_rsa 41 | id_rsa.pub 42 | ... 43 | 44 | "$scriptLocal"/self 45 | id_rsa 46 | id_rsa.pub # Does NOT grant login to constructed machine. 47 | 48 | "$scriptLocal"/_custom/crontab 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /_lib/kit/raspi/_local/vm-raspbian.img: -------------------------------------------------------------------------------- 1 | PLACEHOLDER 2 | -------------------------------------------------------------------------------- /_lib/kit/raspi/_prog/specglobalvars.sh: -------------------------------------------------------------------------------- 1 | #Disable search if "vm.img" and related files are missing. 2 | export ubVirtImageLocal="true" 3 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/device/raspbian/ops.sh: -------------------------------------------------------------------------------- 1 | #Enable search if "vm.img" and related files are missing. 2 | export ubVirtImageLocal="true" 3 | 4 | 5 | ### 6 | 7 | # ATTENTION: Override with 'ops', env, or similar. 8 | # DANGER: NOT respected (and possibly not needed) by some virtualization backends. 9 | # DANGER: Root image/device/partiton must be correct! 10 | # WARNING: Implies 'true' "ubVirtImageLocal" . 11 | 12 | # WARNING: Implies blank "ubVirtImagePartition" . 13 | export ubVirtImageIsRootPartition='true' 14 | 15 | export ubVirtImageIsDevice='true' 16 | export ubVirtImageOverride='/dev/disk/by-id/identifier-part2' 17 | 18 | # ATTENTION: Device file pointing to full disk, including partition table, for full booting. 19 | # Will take precedence over "ubVirtImageOverride" with virtualization backends capable of full booting. 20 | # vbox , qemu 21 | #export ubVirtDeviceOverride='/dev/disk/by-id/identifier' 22 | 23 | 24 | # ATTENTION: Explicitly override platform. Not all backends support all platforms. 25 | # chroot , qemu 26 | # x64-bios , raspbian , x64-efi 27 | export ubVirtPlatformOverride='raspbian' 28 | 29 | ### 30 | 31 | 32 | 33 | ### 34 | 35 | # ATTENTION: Override with 'ops' or similar. 36 | # WARNING: Do not override unnecessarily. Default rules are expected to accommodate typical requirements. 37 | 38 | # WARNING: Only applies to imagedev (text) loopback device. 39 | # x64 bios , raspbian , x64 efi (respectively) 40 | #export ubVirtImagePartition='p1' 41 | #export ubVirtImagePartition='p2' 42 | #export ubVirtImagePartition='p3' 43 | 44 | ### 45 | 46 | 47 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/image/raspbian/ops.sh: -------------------------------------------------------------------------------- 1 | #Enable search if "vm.img" and related files are missing. 2 | export ubVirtImageLocal="true" 3 | 4 | 5 | ### 6 | 7 | # ATTENTION: Override with 'ops', env, or similar. 8 | # DANGER: NOT respected (and possibly not needed) by some virtualization backends. 9 | # DANGER: Root image/device/partiton must be correct! 10 | # WARNING: Implies 'true' "ubVirtImageLocal" . 11 | 12 | # WARNING: Implies blank "ubVirtImagePartition" . 13 | #export ubVirtImageIsRootPartition='true' 14 | 15 | #export ubVirtImageIsDevice='true' 16 | #export ubVirtImageOverride='/dev/disk/by-id/identifier-part2' 17 | 18 | # ATTENTION: Device file pointing to full disk, including partition table, for full booting. 19 | # Will take precedence over "ubVirtImageOverride" with virtualization backends capable of full booting. 20 | # vbox , qemu 21 | ##export ubVirtDeviceOverride='/dev/disk/by-id/identifier' 22 | 23 | 24 | # ATTENTION: Explicitly override platform. Not all backends support all platforms. 25 | # chroot , qemu 26 | # x64-bios , raspbian , x64-efi 27 | export ubVirtPlatformOverride='raspbian' 28 | 29 | ### 30 | 31 | 32 | 33 | ### 34 | 35 | # ATTENTION: Override with 'ops' or similar. 36 | # WARNING: Do not override unnecessarily. Default rules are expected to accommodate typical requirements. 37 | 38 | # WARNING: Only applies to imagedev (text) loopback device. 39 | # x64 bios , raspbian , x64 efi (respectively) 40 | #export ubVirtImagePartition='p1' 41 | #export ubVirtImagePartition='p2' 42 | #export ubVirtImagePartition='p3' 43 | 44 | ### 45 | 46 | 47 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/wine/.gitignore: -------------------------------------------------------------------------------- 1 | /ops 2 | 3 | .c_* 4 | .c_*/ 5 | c_*/ 6 | 7 | .e_* 8 | .e_*/ 9 | e_*/ 10 | .m_* 11 | .m_*/ 12 | m_*/ 13 | 14 | .s_* 15 | .s_*/ 16 | s_*/ 17 | 18 | q_*/ 19 | 20 | w_*/ 21 | v_*/ 22 | h_*/ 23 | 24 | *_history 25 | 26 | vm.vdi 27 | vm.img 28 | vm*.img 29 | WARNING 30 | *.log 31 | devtask* 32 | devtask/ 33 | USAGE.*.html 34 | _buried 35 | 36 | #_local 37 | _index 38 | 39 | **/_wbottle/.update-timestamp 40 | **/_wbottle/dosdevices 41 | **/_wbottle/drive_c/users 42 | 43 | 44 | \#*\# 45 | *~ 46 | *.bak 47 | *swp 48 | *.kate-swp 49 | 50 | nohup.out 51 | 52 | *.log 53 | *.ldb 54 | 55 | **/*cache* 56 | **/*Cache* 57 | **/*LOG* 58 | **/*Log* 59 | **/*log* 60 | 61 | **/.pki 62 | **/.nv 63 | 64 | **/.Xauthority 65 | **/.bash_history 66 | **/.bashrc 67 | **/.gitconfig 68 | **/.ssh 69 | **/.ubcore 70 | **/Desktop 71 | **/Documents 72 | **/Downloads 73 | **/Music 74 | **/Pictures 75 | **/Public 76 | **/Templates 77 | **/Videos 78 | **/bin 79 | **/core 80 | **/project 81 | **/projects 82 | **/realHome 83 | 84 | **/.java 85 | **/.oracle_jre* 86 | 87 | _local/h/.arduino15/staging/ 88 | 89 | _local/h 90 | _local/templates 91 | 92 | **/node_modules/pty.js/build/Makefile 93 | **/node_modules/pty.js/build/config.gypi 94 | **/node_modules/pty.js/build/pty.target.mk 95 | 96 | **/.atom/.apm 97 | 98 | **/.config/Atom/QuotaManager 99 | **/.config/Atom/QuotaManager-journal 100 | **/.config/Atom/QuotaManager* 101 | **/.config/Atom/Local Storage/ 102 | **/.config/Atom/databases 103 | **/.config/Atom/Cookies 104 | **/.config/Atom/Cookies-journal 105 | **/.config/Atom/Cookies* 106 | **/.config/Atom/IndexedDB/ 107 | 108 | 109 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/wine/_prog/core.sh: -------------------------------------------------------------------------------- 1 | ##### Core 2 | 3 | _app() { 4 | _wine "$scriptLocal"/"_wbottle/drive_c/Program Files (x86)/app/app.exe" "$@" 5 | } 6 | 7 | _refresh_anchors() { 8 | cp -a "$scriptAbsoluteFolder"/_anchor "$scriptAbsoluteFolder"/_app 9 | } 10 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/wine/_prog/generate_bash_prog.sh: -------------------------------------------------------------------------------- 1 | _generate_compile_bash_prog() { 2 | "$scriptAbsoluteLocation" _true 3 | 4 | #return 5 | 6 | rm "$scriptAbsoluteFolder"/ubiquitous_bash.sh 7 | 8 | #"$scriptAbsoluteLocation" _compile_bash cautossh cautossh 9 | #"$scriptAbsoluteLocation" _compile_bash lean lean.sh 10 | 11 | "$scriptAbsoluteLocation" _compile_bash core ubiquitous_bash.sh 12 | 13 | #"$scriptAbsoluteLocation" _compile_bash "" "" 14 | #"$scriptAbsoluteLocation" _compile_bash ubiquitous_bash ubiquitous_bash.sh 15 | 16 | #"$scriptAbsoluteLocation" _package 17 | } 18 | -------------------------------------------------------------------------------- /_lib/kit/virtualization/wine/_prog/installation_prog.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_lib/kit/virtualization/wine/_prog/installation_prog.sh -------------------------------------------------------------------------------- /_lib/kit/virtualization/wine/_prog/program.sh: -------------------------------------------------------------------------------- 1 | #####Program 2 | 3 | #Typically launches an application - ie. through virtualized container. 4 | _launch() { 5 | _app "$@" 6 | } 7 | 8 | #Typically gathers command/variable scripts from other (ie. yaml) file types (ie. AppImage recipes). 9 | _collect() { 10 | false 11 | } 12 | 13 | #Typical program entry point, absent any instancing support. 14 | _enter() { 15 | _launch "$@" 16 | } 17 | 18 | #Typical program entry point. 19 | _main() { 20 | _start 21 | 22 | _collect 23 | 24 | _enter "$@" 25 | 26 | _stop 27 | } 28 | -------------------------------------------------------------------------------- /_lib/ssh/README.md: -------------------------------------------------------------------------------- 1 | A subset of the ubiquitous bash functionality is offered by the CoreAutoSSH project, which also includes additional documentation. 2 | 3 | # Configuration 4 | Configuration of ubiquitous bash SSH functionality can be done through an "ops.sh" file alone. 5 | 6 | # Virtual Display 7 | A "Headless Ghost" device is recommended for machines which cannot be attached to real displays for VNC sessions. Performance may be vastly improved, even if all drivers are open source. At least one Intel system is known to have this requirement. 8 | 9 | Alternatively, Xorg may be configured by an "xorg.cfg" file, with the xserver-xorg-video-dummy driver installed. 10 | 11 | Neither of these workarounds are required if nonpersistent desktops are used. However, these may suffer performance degradation with a few (usually low-power) systems. 12 | 13 | # WARNING 14 | Example "ops.sh" provided here is an unconfigured example documenting only available functionality. For a complete, configured, example, compliant to an informal standard suitable for high-fidelity simulation, see the "CoreAutoSSH" project. 15 | 16 | 17 | # Reference 18 | * https://github.com/mirage335/CoreAutoSSH 19 | * https://lxtreme.nl/blog/headless-x11/ 20 | -------------------------------------------------------------------------------- /_lib/ssh/ops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_lib/ssh/ops.png -------------------------------------------------------------------------------- /_lib/ssh/xorg.conf: -------------------------------------------------------------------------------- 1 | #https://lxtreme.nl/blog/headless-x11/ 2 | 3 | Section "Device" 4 | Identifier "Dummy" 5 | Driver "dummy" 6 | VideoRam 256000 7 | Option "IgnoreEDID" "true" 8 | Option "NoDDC" "true" 9 | EndSection 10 | 11 | Section "Monitor" 12 | Identifier "Monitor" 13 | HorizSync 15.0-100.0 14 | VertRefresh 15.0-200.0 15 | EndSection 16 | 17 | Section "Screen" 18 | Identifier "Screen" 19 | Monitor "Monitor" 20 | Device "Dummy" 21 | DefaultDepth 24 22 | SubSection "Display" 23 | Depth 24 24 | Modes "1920x1080" "1280x1024" 25 | EndSubSection 26 | EndSection 27 | -------------------------------------------------------------------------------- /_lib/ssh_modular/README.md: -------------------------------------------------------------------------------- 1 | Modular version of the "ops.sh" file typically used to configure "CoreAutoSSH" . 2 | -------------------------------------------------------------------------------- /_local/ubcp/.gitignore: -------------------------------------------------------------------------------- 1 | .settings/ 2 | .project 3 | **/.*.md.html 4 | conemu/ 5 | cygwin/ 6 | cygwin-portable.cmd 7 | cygwin-portable-updater.cmd 8 | cygwin-portable-installer-config.cmd 9 | 10 | ubcp.cmd 11 | 12 | package_ubcp-cygwinOnly*.tar.gz 13 | -------------------------------------------------------------------------------- /_local/ubcp/_upstream/.gitignore: -------------------------------------------------------------------------------- 1 | .settings/ 2 | .project 3 | **/.*.md.html 4 | conemu/ 5 | cygwin/ 6 | cygwin-portable.cmd 7 | cygwin-portable-updater.cmd 8 | cygwin-portable-installer-config.cmd -------------------------------------------------------------------------------- /_local/ubcp/_upstream/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thanks for your interest in contributing to this project! 4 | 5 | We want to make contributing as easy and transparent as possible. 6 | 7 | 8 | ## Code of Conduct 9 | 10 | Our code of conduct is described in [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). 11 | 12 | 13 | ## Issues 14 | 15 | We use GitHub issues to track bugs and feature requests. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue. 16 | 17 | 18 | ## Pull Requests 19 | 20 | Before you make a substantial pull request, please file an issue and make sure someone from the team agrees that there is a problem or room for improvement. 21 | 22 | 23 | ## License 24 | 25 | By contributing your code, you agree to license your contribution under the [Apache License 2.0](LICENSE.txt). 26 | -------------------------------------------------------------------------------- /_local/ubcp/_upstream/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /_local/ubcp/_upstream/docs/img/launch_script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_local/ubcp/_upstream/docs/img/launch_script.png -------------------------------------------------------------------------------- /_local/ubcp/_upstream/docs/img/tabbed_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_local/ubcp/_upstream/docs/img/tabbed_terminal.png -------------------------------------------------------------------------------- /_local/ubcp/overlay/cygwin/etc/bash.bash_logout: -------------------------------------------------------------------------------- 1 | 2 | # DANGER: Disabled, contrary to upstream Cygwin comment regarding 'to increase privacy'. 3 | # Presumably, if a user needs to clear the screen for their own visibility reasons, 4 | # this can be done manually, and any possibility of unintentionally saved history 5 | # is already extensively to be expected under MSW. 6 | 7 | 8 | 9 | # To the extent possible under law, the author(s) have dedicated all 10 | # copyright and related and neighboring rights to this software to the 11 | # public domain worldwide. This software is distributed without any warranty. 12 | # You should have received a copy of the CC0 Public Domain Dedication along 13 | # with this software. 14 | # If not, see . 15 | 16 | # Portions of this file may be part of Cygwin , and retain the associated copyright and LGPLv3 license. 17 | 18 | # base-files version 4.3-2 19 | 20 | # /etc/bash.bash_logout: executed by bash(1) when login shell exits. 21 | 22 | # The latest version as installed by the Cygwin Setup program can 23 | # always be found at /etc/defaults/etc/bash.bash_logout 24 | 25 | # Modifying /etc/bash.bash_logout directly will prevent 26 | # setup from updating it. 27 | 28 | # System-wide bashrc file 29 | 30 | # when leaving the console clear the screen to increase privacy 31 | #if [ "$SHLVL" = 1 ]; then 32 | # [ -x /usr/bin/clear ] && /usr/bin/clear 33 | #fi 34 | 35 | -------------------------------------------------------------------------------- /_local/ubcp/zDANGER-symlinks.txt: -------------------------------------------------------------------------------- 1 | 2 | Cygwin, if privileged, may create 'native' MSW symlinks by default. Package compression/decompression software for MSW may not commonly support this (although packages created within Cygwin such as 'cygwinOnly' packages *do*), effectively adding another cause of subtle, severe, deficiencies. 3 | 4 | To possibly create more reliable packages of portable Cygwin/MSW filesystems, *always* change all occurrences of 5 | 'set CYGWIN=nodosfilewarning' or similar 6 | to (or similar) 7 | set "CYGWIN=winsymlinks:lnk nodosfilewarning" 8 | . 9 | 10 | Also interesting may be 'winsymlinks:sys' . 11 | 12 | https://cygwin.com/cygwin-ug-net/using-cygwinenv.html 13 | 14 | - 15 | 16 | find . -not -path "./_local/*" -name '*.cmd' -type f -size -3000k -exec grep -n 'set CYGWIN=' '{}' /dev/null \; | grep -v 'winsymlinks:lnk 17 | 18 | 19 | -------------------------------------------------------------------------------- /_local/ubcp/zWARNING-path.txt: -------------------------------------------------------------------------------- 1 | 2 | Upstream 'cygwin portable' may not include path from MSW for performance reasons. 3 | 4 | Adding ';%PATH%' to 'set PATH' in 'ubcp_rename-to-enable.cmd' may improve usability, especially for developers. 5 | 6 | Better is to set 'MSWEXTPATH=%PATH%' in 'ubcp_rename-to-enable.cmd', so this can be used only for interactive shells and only appended after preferable Cygwin (ie. ~/bin) PATH . 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /_presentation/MAKEDEV/makedev_2.3.1-93_all.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/_presentation/MAKEDEV/makedev_2.3.1-93_all.deb -------------------------------------------------------------------------------- /blockchain/blockchain.sh: -------------------------------------------------------------------------------- 1 | _findPort_opsauto_blockchain() { 2 | if ! _findPort 63800 63850 "$@" >> "$scriptLocal"/opsauto 3 | then 4 | _stop 1 5 | fi 6 | } 7 | 8 | _opsauto_blockchain_sequence() { 9 | _start 10 | 11 | export opsautoGenerationMode="true" 12 | 13 | echo "" > "$scriptLocal"/opsauto 14 | 15 | echo -n 'export parity_ui_port=' >> "$scriptLocal"/opsauto 16 | _findPort_opsauto_blockchain 17 | 18 | echo -n 'export parity_port=' >> "$scriptLocal"/opsauto 19 | _findPort_opsauto_blockchain 20 | 21 | echo -n 'export parity_jasonrpc_port=' >> "$scriptLocal"/opsauto 22 | _findPort_opsauto_blockchain 23 | 24 | echo -n 'export parity_ws_port=' >> "$scriptLocal"/opsauto 25 | _findPort_opsauto_blockchain 26 | 27 | echo -n 'export parity_ipfs_api_port=' >> "$scriptLocal"/opsauto 28 | _findPort_opsauto_blockchain 29 | 30 | echo -n 'export parity_secretstore_port=' >> "$scriptLocal"/opsauto 31 | _findPort_opsauto_blockchain 32 | 33 | echo -n 'export parity_secretstore_http_port=' >> "$scriptLocal"/opsauto 34 | _findPort_opsauto_blockchain 35 | 36 | echo -n 'export parity_stratum_port=' >> "$scriptLocal"/opsauto 37 | _findPort_opsauto_blockchain 38 | 39 | #echo -n 'export parity_dapps_port=' >> "$scriptLocal"/opsauto 40 | #_findPort_opsauto_blockchain 41 | 42 | _stop 0 43 | } 44 | 45 | _opsauto_blockchain() { 46 | "$scriptAbsoluteLocation" _opsauto_blockchain_sequence 47 | } 48 | -------------------------------------------------------------------------------- /blockchain/ethereum/ethereum_parity.sh: -------------------------------------------------------------------------------- 1 | _test_ethereum_parity() { 2 | _if_cygwin && return 0 3 | 4 | _getDep gcc 5 | _getDep g++ 6 | 7 | _getDep openssl/ssl.h 8 | 9 | _getDep libudev.h 10 | _getDep libudev.so 11 | } 12 | 13 | _test_ethereum_parity_built() { 14 | _checkDep parity 15 | } 16 | 17 | _test_ethereum_parity_build() { 18 | _getDep rustc 19 | _getDep cargo 20 | } 21 | 22 | _build_ethereum_parity_sequence() { 23 | _start 24 | 25 | cd "$safeTmp" 26 | 27 | git clone https://github.com/paritytech/parity 28 | cd parity 29 | cargo build --release 30 | 31 | cp ./target/release/parity "$scriptBundle"/ 32 | 33 | cd "$safeTmp"/.. 34 | _stop 35 | } 36 | 37 | _build_ethereum_parity() { 38 | #Do not rebuild geth unnecessarily, as build is slow. 39 | _typeDep parity && echo "already have parity" && return 0 40 | 41 | "$scriptAbsoluteLocation" _build_ethereum_parity_sequence 42 | } 43 | 44 | _parity() { 45 | if [[ "$parity_ui_port" != "" ]] && [[ "$parity_port" != "" ]] && [[ "$parity_jasonrpc_port" != "" ]] && [[ "$parity_ws_port" != "" ]] && [[ "$parity_ipfs_api_port" != "" ]] && [[ "$parity_secretstore_port" != "" ]] && [[ "$parity_secretstore_http_port" != "" ]] && [[ "$parity_stratum_port" != "" ]] 46 | then 47 | _ethereum_home parity --ui-port="$parity_ui_port" --port="$parity_port" --jsonrpc-port="$parity_jasonrpc_port" --ws-port="$parity_ws_port" --ipfs-api-port="$parity_ipfs_api_port" --secretstore-port="$parity_secretstore_port" --secretstore-http-port="$parity_secretstore_http_port" --stratum-port="$parity_stratum_port" "$@" 48 | else 49 | _ethereum_home parity "$@" 50 | fi 51 | } 52 | 53 | _parity_attach() { 54 | _ethereum_home _geth attach ~/.local/share/io.parity.ethereum/jsonrpc.ipc "$@" 55 | } 56 | -------------------------------------------------------------------------------- /build/bash/generate_bash_prog.sh: -------------------------------------------------------------------------------- 1 | _generate_compile_bash_prog() { 2 | "$scriptAbsoluteLocation" _true 3 | 4 | return 5 | 6 | rm "$scriptAbsoluteFolder"/ubiquitous_bash.sh 7 | 8 | #"$scriptAbsoluteLocation" _compile_bash cautossh cautossh 9 | #"$scriptAbsoluteLocation" _compile_bash lean lean.sh 10 | 11 | "$scriptAbsoluteLocation" _compile_bash core ubiquitous_bash.sh 12 | 13 | #"$scriptAbsoluteLocation" _compile_bash "" "" 14 | #"$scriptAbsoluteLocation" _compile_bash ubiquitous_bash ubiquitous_bash.sh 15 | 16 | #"$scriptAbsoluteLocation" _package 17 | } 18 | -------------------------------------------------------------------------------- /build/bash/include_bash_prog.sh: -------------------------------------------------------------------------------- 1 | # WARNING: Untested. 2 | #_includeScript_prog() { 3 | # false 4 | 5 | # WARNING: Not recommended. Create folders and submodules under "_prog" instead, as in "_prog/libName". 6 | #_includeFile "$scriptLib"/libName/"$includeScriptSubdirectory"/"$includeScriptFilename" && return 0 7 | #_includeFile "$scriptLib"/libName/"$includeScriptFilename" && return 0 8 | 9 | #return 1 10 | #} 11 | -------------------------------------------------------------------------------- /build/bash/ubiquitous/discoverubiquitous.sh: -------------------------------------------------------------------------------- 1 | _findUbiquitous() { 2 | export ubiquitousLibDir="$scriptAbsoluteFolder" 3 | export ubiquitiousLibDir="$ubiquitousLibDir" 4 | 5 | local scriptBasename=$(basename "$scriptAbsoluteFolder") 6 | if [[ "$scriptBasename" == "ubiquitous_bash" ]] 7 | then 8 | return 0 9 | fi 10 | 11 | if [[ -e "$ubiquitousLibDir"/_lib/ubiquitous_bash ]] 12 | then 13 | export ubiquitousLibDir="$ubiquitousLibDir"/_lib/ubiquitous_bash 14 | export ubiquitiousLibDir="$ubiquitousLibDir" 15 | return 0 16 | fi 17 | 18 | local ubiquitousLibDirDiscovery=$(find ./_lib -maxdepth 3 -type d -name 'ubiquitous_bash' | head -n 1) 19 | if [[ "$ubiquitousLibDirDiscovery" != "" ]] && [[ -e "$ubiquitousLibDirDiscovery" ]] 20 | then 21 | export ubiquitousLibDir="$ubiquitousLibDirDiscovery" 22 | export ubiquitiousLibDir="$ubiquitousLibDir" 23 | return 0 24 | fi 25 | 26 | return 1 27 | } 28 | 29 | -------------------------------------------------------------------------------- /build/haskell/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/build/haskell/README.pdf -------------------------------------------------------------------------------- /build/haskell/haskell.sh: -------------------------------------------------------------------------------- 1 | 2 | _test_haskell() { 3 | #if [[ -e /etc/issue ]] && cat /etc/issue | grep 'Debian' > /dev/null 2>&1 4 | #then 5 | #_wantGetDep '/usr/share/doc/haskell-platform/README.Debian' 6 | #fi 7 | 8 | _wantGetDep alex 9 | _wantGetDep cabal 10 | _wantGetDep happy 11 | _wantGetDep HsColour 12 | _wantGetDep hscolour 13 | 14 | _wantGetDep ghc 15 | _wantGetDep ghci 16 | ! type -p 'ghc' > /dev/null 2>&1 && echo 'warn: missing: ghc' 17 | ! type -p 'ghci' > /dev/null 2>&1 && echo 'warn: missing: ghci' 18 | } 19 | -------------------------------------------------------------------------------- /build/python/python.sh: -------------------------------------------------------------------------------- 1 | 2 | _test_python() { 3 | _getDep python 4 | } 5 | 6 | -------------------------------------------------------------------------------- /generic/condition.sh: -------------------------------------------------------------------------------- 1 | _condition_lines_zero() { 2 | local currentLineCount 3 | currentLineCount=$(wc -l) 4 | 5 | [[ "$currentLineCount" == 0 ]] && return 0 6 | return 1 7 | } 8 | -------------------------------------------------------------------------------- /generic/config/mustcarry.sh: -------------------------------------------------------------------------------- 1 | _mustcarry() { 2 | grep "$1" "$2" > /dev/null 2>&1 && return 0 3 | 4 | echo "$1" >> "$2" 5 | return 6 | } 7 | -------------------------------------------------------------------------------- /generic/filesystem/allLogic.sh: -------------------------------------------------------------------------------- 1 | _all_exist() { 2 | local currentArg 3 | for currentArg in "$@" 4 | do 5 | ! [[ -e "$currentArg" ]] && return 1 6 | done 7 | 8 | return 0 9 | } 10 | 11 | _wait_not_all_exist() { 12 | while ! _all_exist "$@" 13 | do 14 | sleep 0.1 15 | done 16 | } 17 | -------------------------------------------------------------------------------- /generic/filesystem/destroylock.sh: -------------------------------------------------------------------------------- 1 | 2 | # Suggested for files used as Inter-Process Communication (IPC) or similar indicators (eg. temporary download files recently in progress). 3 | # Works around files that may not be deleted by 'rm -f' when expected (ie. due to Cygwin/MSW file locking). 4 | # ATTRIBUTION-AI: OpRt_.deepseek/deepseek-r1-distill-llama-70b 2025-03-27 (partial) 5 | _destroy_lock() { 6 | [[ "$1" == "" ]] && return 0 7 | 8 | # Fraction of 2GB part file divided by 1MB/s optical-disc write speed . 9 | local currentLockWait="1250" 10 | 11 | local current_anyFilesExists 12 | local currentFile 13 | 14 | 15 | local currentIteration=0 16 | for ((currentIteration=0; currentIteration<"$currentLockWait"; currentIteration++)) 17 | do 18 | rm -f "$@" > /dev/null 2>&1 19 | 20 | current_anyFilesExists="false" 21 | for currentFile in "$@" 22 | do 23 | [[ -e "$currentFile" ]] && current_anyFilesExists="true" 24 | done 25 | 26 | if [[ "$current_anyFilesExists" == "false" ]] 27 | then 28 | return 0 29 | break 30 | fi 31 | 32 | # DANGER: Does NOT use _safeEcho . Do NOT use with external input! 33 | ( echo "STACK_FAIL STACK_FAIL STACK_FAIL: software: wait: rm: exists: file: ""$@" >&2 ) > /dev/null 34 | sleep 1 35 | done 36 | 37 | [[ "$currentIteration" != "0" ]] && sleep 7 38 | return 1 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /generic/filesystem/discoverresource.sh: -------------------------------------------------------------------------------- 1 | _discoverResource() { 2 | 3 | [[ "$scriptAbsoluteFolder" == "" ]] && return 1 4 | 5 | local testDir 6 | testDir="$scriptAbsoluteFolder" ; [[ -e "$testDir"/"$1" ]] && echo "$testDir"/"$1" && return 0 7 | testDir="$scriptAbsoluteFolder"/.. ; [[ -e "$testDir"/"$1" ]] && echo "$testDir"/"$1" && return 0 8 | testDir="$scriptAbsoluteFolder"/../.. ; [[ -e "$testDir"/"$1" ]] && echo "$testDir"/"$1" && return 0 9 | testDir="$scriptAbsoluteFolder"/../../.. ; [[ -e "$testDir"/"$1" ]] && echo "$testDir"/"$1" && return 0 10 | 11 | return 1 12 | } 13 | -------------------------------------------------------------------------------- /generic/filesystem/finddir.sh: -------------------------------------------------------------------------------- 1 | #Reports either the directory provided, or the directory of the file provided. 2 | _findDir() { 3 | local dirIn=$(_getAbsoluteLocation "$1") 4 | dirInLogical=$(_realpath_L_s "$dirIn") 5 | 6 | if [[ -d "$dirInLogical" ]] 7 | then 8 | echo "$dirInLogical" 9 | return 10 | fi 11 | 12 | echo $(_getAbsoluteFolder "$dirInLogical") 13 | return 14 | 15 | } 16 | -------------------------------------------------------------------------------- /generic/filesystem/getext.sh: -------------------------------------------------------------------------------- 1 | #Gets filename extension, specifically any last three characters in given string. 2 | #"$1" == filename 3 | _getExt() { 4 | echo "$1" | tr -dc 'a-zA-Z0-9.' | tr '[:upper:]' '[:lower:]' | tail -c 4 5 | } 6 | -------------------------------------------------------------------------------- /generic/filesystem/internal.sh: -------------------------------------------------------------------------------- 1 | # DANGER: Best practice is to call as with trailing slashes and source trailing dot . 2 | # _instance_internal /root/source/. /root/destination/ 3 | # _instance_internal "$1"/. "$actualFakeHome"/"$2"/ 4 | # DANGER: Do not silence output unless specifically required (eg. links, possibly to directories, intended not to overwrite copies). 5 | # _instance_internal "$globalFakeHome"/. "$actualFakeHome"/ > /dev/null 2>&1 6 | _instance_internal() { 7 | ! [[ -e "$1" ]] && return 1 8 | ! [[ -d "$1" ]] && return 1 9 | ! [[ -e "$2" ]] && return 1 10 | ! [[ -d "$2" ]] && return 1 11 | rsync -q -ax --exclude "/.cache" --exclude "/.git" --exclude ".git" "$@" 12 | } 13 | -------------------------------------------------------------------------------- /generic/filesystem/mounts/bindmountmanager.sh: -------------------------------------------------------------------------------- 1 | _testBindMountManager() { 2 | _getDep mount 3 | _getDep umount 4 | 5 | if _if_cygwin 6 | then 7 | echo 'warn: accepted: cygwin: missing: mountpoint' 8 | echo 'warn: accepted: cygwin: missing: mount: features' 9 | return 0 10 | fi 11 | 12 | _getDep mountpoint 13 | 14 | if ! mount --help | grep '\-\-bind' >/dev/null 2>&1 15 | then 16 | echo "mount missing bind feature" 17 | _stop 1 18 | fi 19 | 20 | if ! mount --help | grep '\-\-rbind' >/dev/null 2>&1 21 | then 22 | echo "mount missing rbind feature" 23 | _stop 1 24 | fi 25 | 26 | } 27 | 28 | 29 | # WARNING: Requries prior check with _mustGetSudo . 30 | #"$1" == Source 31 | #"$2" == Destination 32 | _bindMountManager() { 33 | mountpoint "$2" > /dev/null 2>&1 && return 1 34 | 35 | if [[ "$1" == "" ]] 36 | then 37 | return 1 38 | fi 39 | 40 | if [[ "$1" == "/" ]] 41 | then 42 | return 1 43 | fi 44 | 45 | [[ ! -e "$1" ]] && return 1 46 | 47 | sudo -n mkdir -p "$2" 48 | [[ ! -e "$2" ]] && return 1 49 | 50 | sudo -n mount --bind "$1" "$2" 51 | } 52 | -------------------------------------------------------------------------------- /generic/filesystem/mounts/mountchecks.sh: -------------------------------------------------------------------------------- 1 | _testMountChecks() { 2 | _getDep mountpoint 3 | } 4 | 5 | #"$1" == test directory 6 | #"$2" == flag file 7 | _flagMount() { 8 | # TODO: Possible stability/portability improvements. 9 | #https://unix.stackexchange.com/questions/248472/finding-mount-points-with-the-find-command 10 | 11 | mountpoint "$1" >/dev/null 2>&1 && echo -n true > "$2" 12 | } 13 | 14 | #Searches directory for mounted filesystems. 15 | # DANGER Do not drop requirement for sudo. As this function represents a final fail-safe, filesystem permissions cannot be allowed to interfere. 16 | #"$1" == test directory 17 | _checkForMounts() { 18 | _mustGetSudo || return 0 19 | 20 | _start 21 | 22 | #If test directory itself is a directory, further testing is not necessary. 23 | sudo -n mountpoint "$1" > /dev/null 2>&1 && _stop 0 24 | 25 | local mountCheckFile="$safeTmp"/mc-$(_uid) 26 | 27 | echo -n false > "$mountCheckFile" 28 | 29 | #Sanity check, file exists. 30 | ! [[ -e "$mountCheckFile" ]] && _stop 0 31 | 32 | # TODO: Possible stability/portability improvements. 33 | #https://unix.stackexchange.com/questions/248472/finding-mount-points-with-the-find-command 34 | 35 | find "$1" -type d -exec sudo -n mountpoint '{}' 2>/dev/null \; | grep 'is a mountpoint' >/dev/null 2>&1 && echo -n true > "$mountCheckFile" 36 | 37 | #find "$1" -type d -exec "$scriptAbsoluteLocation" '{}' "$mountCheckFile" \; 38 | 39 | local includesMount 40 | includesMount=$(cat "$mountCheckFile") 41 | 42 | #Thorough sanity checking. 43 | [[ "$includesMount" != "false" ]] && _stop 0 44 | [[ "$includesMount" == "true" ]] && _stop 0 45 | [[ "$includesMount" == "false" ]] && _stop 1 46 | 47 | _stop 0 48 | } 49 | -------------------------------------------------------------------------------- /generic/filesystem/mounts/waitumount.sh: -------------------------------------------------------------------------------- 1 | _wait_umount() { 2 | sudo -n umount "$1" 3 | mountpoint "$1" > /dev/null 2>&1 || return 0 4 | sleep 0.1 5 | 6 | sudo -n umount "$1" 7 | mountpoint "$1" > /dev/null 2>&1 || return 0 8 | sleep 0.3 9 | 10 | [[ "$EMERGENCYSHUTDOWN" == "true" ]] && return 1 11 | 12 | sudo -n umount "$1" 13 | mountpoint "$1" > /dev/null 2>&1 || return 0 14 | sleep 1 15 | 16 | sudo -n umount "$1" 17 | mountpoint "$1" > /dev/null 2>&1 || return 0 18 | sleep 3 19 | 20 | sudo -n umount "$1" 21 | mountpoint "$1" > /dev/null 2>&1 || return 0 22 | sleep 9 23 | 24 | 25 | sudo -n umount "$1" 26 | mountpoint "$1" > /dev/null 2>&1 || return 0 27 | sleep 9 28 | 29 | sudo -n umount "$1" 30 | mountpoint "$1" > /dev/null 2>&1 || return 0 31 | sleep 9 32 | 33 | sudo -n umount "$1" 34 | mountpoint "$1" > /dev/null 2>&1 || return 0 35 | sleep 9 36 | 37 | sudo -n umount "$1" 38 | mountpoint "$1" > /dev/null 2>&1 || return 0 39 | sleep 18 40 | 41 | sudo -n umount "$1" 42 | mountpoint "$1" > /dev/null 2>&1 || return 0 43 | sleep 3 44 | 45 | return 1 46 | } 47 | -------------------------------------------------------------------------------- /generic/filesystem/moveconfirm.sh: -------------------------------------------------------------------------------- 1 | 2 | # Equivalent to 'mv -n' with an error exit status if file cannot be overwritten. 3 | # https://unix.stackexchange.com/questions/248544/mv-move-file-only-if-destination-does-not-exist 4 | _moveconfirm() { 5 | local currentExitStatusText 6 | currentExitStatusText=$(mv -vn "$1" "$2" 2>/dev/null) 7 | [[ "$currentExitStatusText" == "" ]] && return 1 8 | return 0 9 | } 10 | 11 | 12 | _test_moveconfirm_procedure() { 13 | echo > "$safeTmp"/mv_src 14 | echo > "$safeTmp"/mv_dst 15 | 16 | _moveconfirm "$safeTmp"/mv_src "$safeTmp"/mv_dst && return 1 17 | 18 | rm -f "$safeTmp"/mv_dst 19 | ! _moveconfirm "$safeTmp"/mv_src "$safeTmp"/mv_dst && return 1 20 | 21 | rm -f "$safeTmp"/mv_dst 22 | 23 | return 0 24 | } 25 | 26 | _test_moveconfirm_sequence() { 27 | _start 28 | 29 | if ! _test_moveconfirm_procedure "$@" 30 | then 31 | _stop 1 32 | fi 33 | 34 | _stop 35 | } 36 | 37 | _test_moveconfirm() { 38 | "$scriptAbsoluteLocation" _test_moveconfirm_sequence "$@" 39 | } 40 | 41 | -------------------------------------------------------------------------------- /generic/filesystem/relink.sh: -------------------------------------------------------------------------------- 1 | _rmlink() { 2 | [[ "$1" == "/dev/null" ]] && return 1 3 | 4 | #[[ -h "$1" ]] && rm -f "$1" && return 0 5 | [[ -h "$1" ]] && rm -f "$1" > /dev/null 2>&1 6 | 7 | ! [[ -e "$1" ]] && return 0 8 | 9 | return 1 10 | } 11 | 12 | #Like "ln -sf", but will not proceed if target is not link and exists (ie. will not erase files). 13 | _relink_procedure() { 14 | #Do not update correct symlink. 15 | local existingLinkTarget 16 | existingLinkTarget=$(readlink "$2") 17 | [[ "$existingLinkTarget" == "$1" ]] && return 0 18 | 19 | ! [[ "$relinkRelativeUb" == "true" ]] && _rmlink "$2" && ln -s "$1" "$2" && return 0 20 | 21 | if [[ "$relinkRelativeUb" == "true" ]] 22 | then 23 | _rmlink "$2" && ln -s --relative "$1" "$2" && return 0 24 | fi 25 | 26 | return 1 27 | } 28 | 29 | _relink() { 30 | [[ "$2" == "/dev/null" ]] && return 1 31 | [[ "$relinkRelativeUb" == "true" ]] && export relinkRelativeUb="" 32 | _relink_procedure "$@" 33 | } 34 | 35 | _relink_relative() { 36 | export relinkRelativeUb="" 37 | 38 | [[ "$relinkRelativeUb" != "true" ]] && ln --help 2>/dev/null | grep '\-\-relative' > /dev/null 2>&1 && export relinkRelativeUb="true" 39 | [[ "$relinkRelativeUb" != "true" ]] && ln 2>&1 | grep '\-\-relative' > /dev/null 2>&1 && export relinkRelativeUb="true" 40 | [[ "$relinkRelativeUb" != "true" ]] && man ln 2>/dev/null | grep '\-\-relative' > /dev/null 2>&1 && export relinkRelativeUb="true" 41 | 42 | _relink_procedure "$@" 43 | export relinkRelativeUb="" 44 | unset relinkRelativeUb 45 | } 46 | 47 | #Copies files only if source/destination do match. Keeps files in a completely written state as often as possible. 48 | _cpDiff() { 49 | ! diff "$1" "$2" > /dev/null 2>&1 && cp "$1" "$2" 50 | } 51 | -------------------------------------------------------------------------------- /generic/findInfrastructure.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /generic/gather.sh: -------------------------------------------------------------------------------- 1 | #Takes "$@". Places in global array variable "globalArgs". 2 | # WARNING Adding this globalvariable to the "structure/globalvars.sh" declaration or similar to be overridden at script launch is not recommended. 3 | #"${globalArgs[@]}" 4 | _gather_params() { 5 | export globalArgs=("${@}") 6 | } 7 | -------------------------------------------------------------------------------- /generic/generic.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | _binToHex() { 4 | xxd -p | tr -d '\n' 5 | } 6 | 7 | _hexToBin() { 8 | xxd -r -p 9 | } 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /generic/hello/hello.c: -------------------------------------------------------------------------------- 1 | // From https://raw.githubusercontent.com/docker-library/hello-world/master/hello.c . 2 | // gcc -o hello -static -nostartfiles hello.c 3 | 4 | //#include 5 | #include 6 | 7 | /* 8 | #ifndef DOCKER_IMAGE 9 | #define DOCKER_IMAGE "hello-world" 10 | #endif 11 | 12 | #ifndef DOCKER_GREETING 13 | #define DOCKER_GREETING "Hello from Docker!" 14 | #endif 15 | */ 16 | 17 | /* 18 | const char message[] = 19 | "\n" 20 | DOCKER_GREETING "\n" 21 | "This message shows that your installation appears to be working correctly.\n" 22 | "\n" 23 | "To generate this message, Docker took the following steps:\n" 24 | " 1. The Docker client contacted the Docker daemon.\n" 25 | " 2. The Docker daemon pulled the \"" DOCKER_IMAGE "\" image from the Docker Hub.\n" 26 | " 3. The Docker daemon created a new container from that image which runs the\n" 27 | " executable that produces the output you are currently reading.\n" 28 | " 4. The Docker daemon streamed that output to the Docker client, which sent it\n" 29 | " to your terminal.\n" 30 | "\n" 31 | "To try something more ambitious, you can run an Ubuntu container with:\n" 32 | " $ docker run -it ubuntu bash\n" 33 | "\n" 34 | "Share images, automate workflows, and more with a free Docker ID:\n" 35 | " https://cloud.docker.com/\n" 36 | "\n" 37 | "For more examples and ideas, visit:\n" 38 | " https://docs.docker.com/engine/userguide/\n" 39 | "\n"; 40 | */ 41 | 42 | const char message[] = "hello world"; 43 | 44 | void _start() { 45 | //write(1, message, sizeof(message) - 1); 46 | syscall(SYS_write, 1, message, sizeof(message) - 1); 47 | 48 | //_exit(0); 49 | syscall(SYS_exit, 0); 50 | } 51 | -------------------------------------------------------------------------------- /generic/hello/hello.sh: -------------------------------------------------------------------------------- 1 | _buildHello() { 2 | local helloSourceCode 3 | helloSourceCode="$scriptAbsoluteFolder"/generic/hello/hello.c 4 | ! [[ -e "$helloSourceCode" ]] && helloSourceCode="$scriptLib"/ubiquitous_bash/generic/hello/hello.c 5 | 6 | mkdir -p "$scriptBin" 7 | gcc -o "$scriptBin"/hello -static -nostartfiles "$helloSourceCode" 8 | } 9 | -------------------------------------------------------------------------------- /generic/net/clog/clog.sh: -------------------------------------------------------------------------------- 1 | #clog 2 | 3 | 4 | _clog_interface() { 5 | # Upstream 'wondershaper' version beyond that from Debian (ie. 'stable') 10 . 6 | #./wondershaper -a "$1" -u 10000 -d 10000 7 | 8 | # Debian (ie. 'stable') 10 . 9 | #wondershaper [ interface ] [ downlink ] [ uplink ] 10 | 11 | sudo -n tc qdisc add dev "$1" root tbf rate 10mbit burst 256kbit latency 133ms 12 | } 13 | 14 | # ATTENTION: Override with 'core.sh' , 'netvars.sh' , or similar . 15 | # ATTENTION: Ideally should attempt to 'clog' all 'external' (ie. 'WiFi' or 'Ethernet') interfaces to some low value like 10Mbits/s or 2Mbits/s , to avoid unexpected bandwidth exhaustion or costs. 16 | # List interfaces with ' sudo -n ip addr show ' . 17 | # https://github.com/magnific0/wondershaper 18 | # https://netbeez.net/blog/how-to-use-the-linux-traffic-control/ 19 | _clog() { 20 | true 21 | 22 | _clog_interface eth0 23 | _clog_interface eth1 24 | _clog_interface eth2 25 | _clog_interface eth3 26 | 27 | _clog_interface enp0s0 28 | _clog_interface enp1s0 29 | _clog_interface enp2s0 30 | _clog_interface enp3s0 31 | } 32 | 33 | _clog_crontab() { 34 | _mustGetSudo 35 | echo '@reboot '"$scriptAbsoluteLocation"' _clog' | sudo -n crontab - 36 | } 37 | 38 | 39 | _test_clog() { 40 | _getDep tc 41 | _getDep wondershaper 42 | } 43 | -------------------------------------------------------------------------------- /generic/net/command/command.sh: -------------------------------------------------------------------------------- 1 | _setup_command_commands() { 2 | _find_setupCommands -name '_synergy' -exec "$scriptAbsoluteLocation" _setupCommand '{}' \; 3 | 4 | _find_setupCommands -name '_cloud_shell' -exec "$scriptAbsoluteLocation" _setupCommand_meta '{}' \; 5 | _find_setupCommands -name '_cloud_hook' -exec "$scriptAbsoluteLocation" _setupCommand_meta '{}' \; 6 | 7 | # WARNING: No production use. Not expected to be necessary in practice. 8 | #_find_setupCommands -name '_cloud_unhook' -exec "$scriptAbsoluteLocation" _setupCommand_meta '{}' \; 9 | 10 | 11 | if declare -f _cloud_unhook > /dev/null 2>&1 && declare -f _messageNormal > /dev/null 2>&1 12 | then 13 | mkdir -p "$HOME"/bin 14 | ! [[ -e "$HOME"/bin ]] && return 1 15 | echo '#!/usr/bin/env bash' > "$HOME"/bin/_cloud_unhook."$sessionid" 16 | declare -f _messageNormal >> "$HOME"/bin/_cloud_unhook."$sessionid" 17 | declare -f _cloud_unhook >> "$HOME"/bin/_cloud_unhook."$sessionid" 18 | echo '_cloud_unhook' >> "$HOME"/bin/_cloud_unhook."$sessionid" 19 | chmod u+x "$HOME"/bin/_cloud_unhook."$sessionid" 20 | mv "$HOME"/bin/_cloud_unhook."$sessionid" "$HOME"/bin/_cloud_unhook 21 | chmod u+x "$HOME"/bin/_cloud_unhook 22 | fi 23 | } 24 | -------------------------------------------------------------------------------- /generic/net/command/synergy/here_synergy.sh: -------------------------------------------------------------------------------- 1 | _here_synergy_config() { 2 | true 3 | } 4 | -------------------------------------------------------------------------------- /generic/net/fetch.sh: -------------------------------------------------------------------------------- 1 | #"$@" == URL 2 | _fetch() { 3 | if type axel > /dev/null 2>&1 4 | then 5 | axel "$@" 6 | return 0 7 | fi 8 | 9 | wget "$@" 10 | 11 | return 0 12 | } 13 | -------------------------------------------------------------------------------- /generic/net/proxy/proxyrouter/here_proxyrouter.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/generic/net/proxy/proxyrouter/here_proxyrouter.sh -------------------------------------------------------------------------------- /generic/net/proxy/ssh/here_ssh.sh: -------------------------------------------------------------------------------- 1 | #Example only. 2 | _here_ssh_config() { 3 | cat << CZXWXcRMTo8EmM8i4d 4 | 5 | Host *-$netName* 6 | Compression yes 7 | ExitOnForwardFailure yes 8 | ConnectTimeout 72 9 | ConnectionAttempts 1 10 | ServerAliveInterval 5 11 | ServerAliveCountMax 5 12 | #PubkeyAuthentication yes 13 | #PasswordAuthentication no 14 | StrictHostKeyChecking no 15 | UserKnownHostsFile "$sshLocalSSH/known_hosts" 16 | IdentityFile "$sshLocalSSH/id_rsa" 17 | 18 | #Cipher aes256-gcm@openssh.com 19 | #Ciphers aes256-gcm@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour 20 | 21 | Host machine-$netName 22 | User user 23 | ProxyCommand "$sshDir/cautossh" _ssh_proxy_machine-$netName 24 | 25 | 26 | CZXWXcRMTo8EmM8i4d 27 | } 28 | -------------------------------------------------------------------------------- /generic/net/smbmount.sh: -------------------------------------------------------------------------------- 1 | #NO PRODUCTION USE 2 | #These functions were developed before it was determined fstab would automatically handle the relevant use cases appropriately. 3 | 4 | _testSMBmount() { 5 | _getDep smbclient 6 | _getDep nmap 7 | } 8 | 9 | _checkSMB_qemu_app() { 10 | true 11 | } 12 | 13 | _checkSMB_vbox_app() { 14 | true 15 | } 16 | 17 | _checkSMB_vbox_root() { 18 | true 19 | } 20 | 21 | _checkSMB() { 22 | #! nmap -Pn -p 139,445 "$1" | grep open > /dev/null 2>&1 && return 1 23 | ! echo | smbclient -L "$1" | grep "$2" > /dev/null 2>&1 && return 1 24 | 25 | return 0 26 | } 27 | 28 | #"$1" == hostname/ip 29 | #"$2" == sharename 30 | #"$3" == mountpoint 31 | _checkAndMountSMB() { 32 | _checkSMB || return 1 33 | 34 | mkdir -p "$mountpoint" > /dev/null 2>&1 35 | 36 | ! [[ -d "$mountpoint" ]] && return 1 37 | 38 | #Assumes fstab entry has been created. 39 | #//10.0.2.4/qemu /home/user/project cifs guest,noauto,_netdev,uid=user,user 0 0 40 | mount "$3" 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /generic/preserveLog.sh: -------------------------------------------------------------------------------- 1 | #Copy log files to "$permaLog" or current directory (default) for analysis. 2 | _preserveLog() { 3 | if [[ ! -d "$permaLog" ]] 4 | then 5 | permaLog="$PWD" 6 | fi 7 | 8 | cp "$logTmp"/* "$permaLog"/ > /dev/null 2>&1 9 | } 10 | -------------------------------------------------------------------------------- /generic/process/embed.sh: -------------------------------------------------------------------------------- 1 | _embed() { 2 | export sessionid="$1" 3 | "$scriptAbsoluteLocation" --embed "$@" 4 | } 5 | -------------------------------------------------------------------------------- /generic/process/embed_here.sh: -------------------------------------------------------------------------------- 1 | _embed_here() { 2 | cat << CZXWXcRMTo8EmM8i4d 3 | #!/usr/bin/env bash 4 | 5 | export scriptAbsoluteLocation="$scriptAbsoluteLocation" 6 | export scriptAbsoluteFolder="$scriptAbsoluteFolder" 7 | export sessionid="$sessionid" 8 | . "$scriptAbsoluteLocation" --embed "\$@" 9 | CZXWXcRMTo8EmM8i4d 10 | } 11 | -------------------------------------------------------------------------------- /generic/process/getIdle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/generic/process/getIdle -------------------------------------------------------------------------------- /generic/process/getIdle.c: -------------------------------------------------------------------------------- 1 | //https://unix.stackexchange.com/questions/120957/run-a-command-when-system-is-idle-and-when-is-active-again 2 | //Explicit copyright not stated, public domain or fair use assumed. 3 | 4 | #include 5 | #include 6 | 7 | int main(void) { 8 | Display *dpy = XOpenDisplay(NULL); 9 | 10 | if (!dpy) { 11 | return(1); 12 | } 13 | 14 | XScreenSaverInfo *info = XScreenSaverAllocInfo(); 15 | XScreenSaverQueryInfo(dpy, DefaultRootWindow(dpy), info); 16 | printf("%u\n", info->idle); 17 | 18 | return(0); 19 | } 20 | -------------------------------------------------------------------------------- /generic/process/idle.sh: -------------------------------------------------------------------------------- 1 | #####Idle 2 | 3 | _idle() { 4 | _start 5 | 6 | _checkDep getIdle 7 | 8 | _daemonStatus && _stop 1 9 | 10 | #Default 20 minutes. 11 | [[ "$idleMax" == "" ]] && export idleMax=1200000 12 | [[ "$idleMin" == "" ]] && export idleMin=60000 13 | 14 | while true 15 | do 16 | sleep 5 17 | 18 | idleTime=$("$scriptBin"/getIdle) 19 | 20 | if [[ "$idleTime" -lt "$idleMin" ]] && _daemonStatus 21 | then 22 | true 23 | _killDaemon #Comment out if unnecessary. 24 | fi 25 | 26 | 27 | if [[ "$idleTime" -gt "$idleMax" ]] && ! _daemonStatus 28 | then 29 | _execDaemon 30 | while ! _daemonStatus 31 | do 32 | sleep 5 33 | done 34 | fi 35 | 36 | 37 | 38 | done 39 | 40 | _stop 41 | } 42 | 43 | _test_buildIdle() { 44 | _getDep "X11/extensions/scrnsaver.h" 45 | } 46 | 47 | _testBuiltIdle() { 48 | 49 | _checkDep getIdle 50 | 51 | idleTime=$("$scriptBin"/getIdle) 52 | 53 | if ! echo "$idleTime" | grep '^[0-9]*$' >/dev/null 2>&1 54 | then 55 | echo getIdle invalid response 56 | _stop 1 57 | fi 58 | 59 | } 60 | 61 | _buildIdle() { 62 | local idleSourceCode 63 | idleSourceCode="$scriptAbsoluteFolder"/generic/process/getIdle.c 64 | ! [[ -e "$idleSourceCode" ]] && idleSourceCode="$scriptLib"/ubiquitous_bash/generic/process/getIdle.c 65 | 66 | mkdir -p "$scriptBin" 67 | gcc -o "$scriptBin"/getIdle "$idleSourceCode" -lXss -lX11 68 | 69 | } 70 | -------------------------------------------------------------------------------- /generic/process/remotesig.sh: -------------------------------------------------------------------------------- 1 | #Remote TERM signal wrapper. Verifies script is actually running at the specified PID before passing along signal to trigger an emergency stop. 2 | #"$1" == pidFile 3 | #"$2" == sessionid (optional for cleaning up stale systemd files) 4 | _remoteSigTERM() { 5 | [[ ! -e "$1" ]] && [[ "$2" != "" ]] && _unhook_systemd_shutdown "$2" 6 | 7 | [[ ! -e "$1" ]] && return 0 8 | 9 | pidToTERM=$(cat "$1") 10 | 11 | kill -TERM "$pidToTERM" 12 | 13 | _pauseForProcess "$pidToTERM" 14 | } 15 | -------------------------------------------------------------------------------- /generic/process/timeout.sh: -------------------------------------------------------------------------------- 1 | #http://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay 2 | _timeout() { ( set +b; sleep "$1" & "${@:2}" & wait -n; r=$?; kill -9 `jobs -p`; exit $r; ) } 3 | -------------------------------------------------------------------------------- /generic/process/waitforprocess.sh: -------------------------------------------------------------------------------- 1 | #Waits for the process PID specified by first parameter to end. Useful in conjunction with $! to provide process control and/or PID files. Unlike wait command, does not require PID to be a child of the current shell. 2 | _pauseForProcess() { 3 | while ps --no-headers -p $1 &> /dev/null 4 | do 5 | sleep 0.3 6 | done 7 | } 8 | alias _waitForProcess=_pauseForProcess 9 | alias waitForProcess=_pauseForProcess 10 | -------------------------------------------------------------------------------- /generic/showCommand.sh: -------------------------------------------------------------------------------- 1 | #Run command and output to terminal with colorful formatting. Controlled variant of "bash -v". 2 | _showCommand() { 3 | echo -e '\E[1;32;46m $ '"$1"' \E[0m' 4 | "$@" 5 | } 6 | -------------------------------------------------------------------------------- /generic/validaterequest.sh: -------------------------------------------------------------------------------- 1 | #Validates non-empty request. 2 | _validateRequest() { 3 | echo -e -n '\E[1;32;46m Validating request '"$1"'... \E[0m' 4 | [[ "$1" == "" ]] && echo -e '\E[1;33;41m BLANK \E[0m' && return 1 5 | echo "PASS" 6 | return 7 | } 8 | 9 | #http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed 10 | _nocolor() { 11 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" 12 | } 13 | 14 | _noFireJail() { 15 | if ( [[ -L /usr/local/bin/"$1" ]] && ls -l /usr/local/bin/"$1" | grep firejail > /dev/null 2>&1 ) || ( [[ -L /usr/bin/"$1" ]] && ls -l /usr/bin/"$1" | grep firejail > /dev/null 2>&1 ) 16 | then 17 | _messagePlain_bad 'conflict: firejail: '"$1" 18 | return 1 19 | fi 20 | 21 | return 0 22 | } 23 | -------------------------------------------------------------------------------- /hardware/w540/w540_fan.sh: -------------------------------------------------------------------------------- 1 | 2 | _w540_fan_cfg-write() { 3 | echo "options thinkpad_acpi fan_control=1" | sudo -n tee /etc/modprobe.d/thinkfan.conf 4 | } 5 | 6 | _w540_fan_cfg-modprobe() { 7 | sudo -n modprobe -rv thinkpad_acpi 8 | sudo -n modprobe -v thinkpad_acpi 9 | } 10 | 11 | _w540_fan_cfg() { 12 | echo watchdog 120 | sudo -n tee /proc/acpi/ibm/fan 13 | } 14 | 15 | # cron recommended 16 | #*/1 * * * * sleep 0.1 ; /home/user/.ubcore/ubcore.sh _w540_hardware_cron > /dev/null 2>&1 17 | _w540_fan_cron() { 18 | ! sudo -n dmidecode -s system-family | grep 'ThinkPad W540' && return 0 19 | 20 | _w540_fan 21 | 22 | return 0 23 | } 24 | 25 | # cron recommended 26 | #*/1 * * * * sleep 0.1 ; /home/user/.ubcore/ubiquitous_bash/ubcore.sh _w540_fan > /dev/null 2>&1 27 | _w540_fan() { 28 | _w540_fan_cfg 29 | 30 | local currentTemp_coretemp0 31 | read currentTemp_coretemp0 < /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input 32 | 33 | #[[ "$currentTemp_coretemp0" -lt 48000 ]] && echo level 1 | sudo tee /proc/acpi/ibm/fan && return 0 34 | #[[ "$currentTemp_coretemp0" -lt 68000 ]] && echo level 1 | sudo tee /proc/acpi/ibm/fan && return 0 35 | 36 | [[ "$currentTemp_coretemp0" -lt 59000 ]] && echo level 1 | sudo -n tee /proc/acpi/ibm/fan && return 0 37 | } 38 | 39 | _w540_idle() { 40 | _w540_fan_cfg 41 | 42 | while true 43 | do 44 | echo powersave | sudo -n tee /sys/devices/system/cpu/cpufreq/*/scaling_governor 45 | 46 | echo level 1 | sudo tee /proc/acpi/ibm/fan 47 | 48 | sleep 45 49 | done 50 | } 51 | 52 | _w540_normal() { 53 | echo schedutil | sudo -n tee /sys/devices/system/cpu/cpufreq/*/scaling_governor 54 | } 55 | -------------------------------------------------------------------------------- /instrumentation/bashdb/bashdb.sh: -------------------------------------------------------------------------------- 1 | _test_bashdb() { 2 | #_getDep ddd 3 | 4 | #if ! _discoverResource bashdb-code/bashdb.sh > /dev/null 2>&1 5 | #then 6 | # echo 7 | # echo 'bashdb required for debugging' 8 | #_stop 1 9 | #fi 10 | 11 | if ! type bashdb > /dev/null 2>&1 12 | then 13 | echo 14 | echo 'warn: bashdb required for debugging' 15 | #_stop 1 16 | fi 17 | 18 | return 0 19 | } 20 | 21 | -------------------------------------------------------------------------------- /instrumentation/bashdb/bashdb_header.sh: -------------------------------------------------------------------------------- 1 | ##### No production use. Does not work. 2 | 3 | [[ "$bashDBabsoluteLocaton" == "" ]] && export bashDBabsoluteLocaton=$(_discoverResource bashdb-code/bashdb-trace) 4 | 5 | ! [[ "$bashDBabsoluteLocaton" == "" ]] && source "$bashDBabsoluteLocaton" 6 | ! [[ "$bashDBabsoluteLocaton" == "" ]] && _Dbg_debugger 7 | 8 | -------------------------------------------------------------------------------- /instrumentation/profiling/stopwatch.sh: -------------------------------------------------------------------------------- 1 | _stopwatch() { 2 | local currentExitStatus_bin 3 | local currentExitStatus_self 4 | 5 | local measureDateA 6 | local measureDateB 7 | 8 | measureDateA=$(date +%s%N | cut -b1-13) 9 | 10 | "$@" 11 | currentExitStatus_bin="$?" 12 | 13 | measureDateB=$(date +%s%N | cut -b1-13) 14 | 15 | bc <<< "$measureDateB - $measureDateA" 16 | currentExitStatus_self="$?" 17 | 18 | [[ "$currentExitStatus_bin" != "0" ]] && return "$currentExitStatus_bin" 19 | [[ "$currentExitStatus_self" != "0" ]] && return "$currentExitStatus_self" 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /labels/basicvarLabel.sh: -------------------------------------------------------------------------------- 1 | #####Basic Variable Management 2 | -------------------------------------------------------------------------------- /labels/shortcutsLabel.sh: -------------------------------------------------------------------------------- 1 | #####Shortcuts 2 | -------------------------------------------------------------------------------- /labels/utilitiesLabel.sh: -------------------------------------------------------------------------------- 1 | #####Utilities 2 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | http://creativecommons.org/publicdomain/zero/1.0/ 2 | To the extent possible under law, mirage335 has waived all copyright and related or neighboring rights to ubiquitous_bash.sh. This work is published from: United States. 3 | Also see CC0_license.txt for details. 4 | -------------------------------------------------------------------------------- /license.txt.agpl: -------------------------------------------------------------------------------- 1 | projectProjectName_replaceMe 2 | Copyright (C) projectYEAR_replaceMe projectDeveloperName_replaceMe 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU Affero General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Affero General Public License for more details. 13 | 14 | You should have received a copy of the GNU Affero General Public License 15 | along with this program; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | All files in this folder and subfolders, unless explicitly stated otherwise or copyrighted by other authors, are copyrighted by projectDeveloperName_replaceMe as described above. 19 | -------------------------------------------------------------------------------- /license.txt.gpl: -------------------------------------------------------------------------------- 1 | projectProjectName_replaceMe 2 | Copyright (C) projectYEAR_replaceMe projectDeveloperName_replaceMe 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | All files in this folder and subfolders, unless explicitly stated otherwise or copyrighted by other authors, are copyrighted by projectDeveloperName_replaceMe as described above. 19 | -------------------------------------------------------------------------------- /metaengine/__build/deps_meta.sh: -------------------------------------------------------------------------------- 1 | _deps_metaengine() { 2 | # #_deps_notLean 3 | _deps_dev 4 | 5 | export enUb_metaengine="true" 6 | } 7 | -------------------------------------------------------------------------------- /metaengine/example/example_metaengine_object.sh: -------------------------------------------------------------------------------- 1 | # Intended to illustrate the basic logic flow. Uses global variables for some arguments - resetting these is MANDATORY . 2 | _example_processor_name() { 3 | _assign_me_objname "_example_processor_name" 4 | 5 | _me_command "_example_me_processor_name" 6 | 7 | #Optional. Usually correctly orders diagnostic output. 8 | sleep 3 9 | } 10 | 11 | _example_me_processor_name() { 12 | _messageNormal 'launch: '"$metaObjName" 13 | 14 | ! _wait_metaengine && _stop 1 15 | _start_metaengine 16 | _relink_metaengine_in 17 | _relink_metaengine_out 18 | 19 | #Do something. 20 | #> cat > 21 | while true 22 | do 23 | sleep 10 24 | done 25 | 26 | #optional, closes host upon completion 27 | #_stop 28 | } 29 | -------------------------------------------------------------------------------- /metaengine/metaengine.sh: -------------------------------------------------------------------------------- 1 | _test_metaengine_sequence() { 2 | ! _start_metaengine_host && _stop 1 3 | ! _stop_metaengine_allow && _stop 1 4 | 5 | ! _reset_me_name && _stop 1 6 | ! _assign_me_coordinates "" "" "" "" "" "" 0 1 0 1 1 0 && _stop 1 7 | ! _set_me_null_in && _stop 1 8 | 9 | 10 | ! _reset_me_name && _stop 1 11 | ! _set_me_null_in && _stop 1 12 | ! _set_me_rand_out && _stop 1 13 | ! _cycle_me && _stop 1 14 | ! _set_me_null_out && _stop 1 15 | 16 | ! _reset_me_name && _stop 1 17 | ! _set_me_null_in && _stop 1 18 | ! _assign_me_name_out "1" && _stop 1 19 | ! _cycle_me && _stop 1 20 | ! _assign_me_name_out "2" && _stop 1 21 | ! _cycle_me && _stop 1 22 | ! _assign_me_name_out "3" && _stop 1 23 | ! _cycle_me && _stop 1 24 | ! _set_me_null_out && _stop 1 25 | 26 | ! _stop_metaengine_allow && _stop 1 27 | _stop 28 | } 29 | 30 | _test_metaengine() { 31 | _getDep mkfifo 32 | 33 | if ! "$scriptAbsoluteLocation" _test_metaengine_sequence > /dev/null 2>&1 34 | then 35 | echo 'fail: metaengine: internal' 36 | _stop 1 37 | fi 38 | } 39 | -------------------------------------------------------------------------------- /metaengine/typical/typical_metaengine_chain.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/metaengine/typical/typical_metaengine_chain.sh -------------------------------------------------------------------------------- /metaengine/typical/typical_metaengine_divert.sh: -------------------------------------------------------------------------------- 1 | _me_divert() { 2 | _buffer_me_processor_divert "$@" 3 | } 4 | 5 | #Registers an output to a diversion directory for processors which may support more than two inputs. Expected to be used with special processors creating their own unique registrations (ie. _reg/special). 6 | _buffer_me_processor_divert() { 7 | mkdir -p "$metaReg"/"$1"/divert 8 | mkdir -p "$metaReg"/"$2"/divert 9 | 10 | 11 | _relink "$metaDir"/ao "$metaReg"/"$1"/divert/"$metaID" 12 | _relink "$metaDir"/bo "$metaReg"/"$2"/divert/"$metaID" 13 | } 14 | -------------------------------------------------------------------------------- /metaengine/typical/typical_metaengine_object.sh: -------------------------------------------------------------------------------- 1 | # Intended to illustrate the basic logic flow. Uses global variables for some arguments - resetting these is MANDATORY . 2 | #"$1" == _me_processor_name 3 | #"$2" == metaObjName (optional) 4 | _processor_launch() { 5 | _assign_me_objname "$1" 6 | #[[ "$2" != "" ]] && _assign_me_objname "$2" 7 | 8 | _me_command "$@" 9 | 10 | #Optional. Usually correctly orders diagnostic output. 11 | #_wait_metaengine_host 12 | #sleep 3 13 | } 14 | 15 | _me_processor_noise() { 16 | _messageNormal 'launch: '"$metaObjName" 17 | 18 | ! _wait_metaengine && _stop 1 19 | _start_metaengine 20 | _relink_metaengine_in 21 | _relink_metaengine_out 22 | 23 | _buffer_me_processor_fifo 24 | 25 | cat < /dev/urandom > "$metaDir"/ao/fifo 26 | 27 | #while true 28 | #do 29 | # sleep 1 30 | #done 31 | 32 | #optional, closes host upon completion 33 | #_stop 34 | } 35 | -------------------------------------------------------------------------------- /os/distro/getMinimal_special.sh: -------------------------------------------------------------------------------- 1 | 2 | # NOTICE: getMost_special.sh will be included if either getMost.sh or gitMinimal.sh are included 3 | 4 | -------------------------------------------------------------------------------- /os/distro/getMost_special_npm.sh: -------------------------------------------------------------------------------- 1 | 2 | # https://github.com/nodesource/distributions?tab=readme-ov-file#debian-versions 3 | #codex 4 | #claude 5 | _get_npm() { 6 | _mustGetSudo 7 | 8 | ##sudo -n env DEBIAN_FRONTEND=noninteractive apt-get install -y curl 9 | _getDep curl 10 | 11 | #sudo -n curl -fsSL https://deb.nodesource.com/setup_23.x -o /nodesource_setup.sh 12 | #sudo -n bash /nodesource_setup.sh 13 | sudo -n curl -fsSL https://deb.nodesource.com/setup_23.x -o - | sudo -n bash 14 | 15 | sudo -n env DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs 16 | 17 | 18 | #sudo -n npm install -g @openai/codex 19 | ##npm install -g @anthropic-ai/claude-code 20 | #sudo -n npm install -g @anthropic-ai/claude-code 21 | } 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /os/distro/ubuntu/_ref/deleteme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /os/override/override_prog.sh: -------------------------------------------------------------------------------- 1 | #Override (Program). 2 | -------------------------------------------------------------------------------- /os/override/override_wsl.sh: -------------------------------------------------------------------------------- 1 | 2 | # Discouraged. Few file paths, some setup, etc, may be different. Otherwise, WSL should not be treated differently. 3 | _if_wsl() { 4 | uname -a | grep -i 'microsoft' > /dev/null 2>&1 || uname -a | grep -i 'WSL2' > /dev/null 2>&1 5 | } 6 | 7 | if [[ "$WSL_DISTRO_NAME" != "" ]] && _if_wsl 8 | then 9 | 10 | # WARNING: CAUTION: Adding some native MSWindows programs from MSWindows path (eg. python) may cause conflicts with native WSL/Linux equivalent programs, etc. 11 | 12 | # NOTICE: Native ubdist/OS, WSL/Linux, etc, equivalent, is 'xdg-open', etc . 13 | #! type explorer > /dev/null 2>&1 && [[ -e /mnt/c/Windows/System32/explorer.exe ]] && explorer() { /mnt/c/Windows/System32/explorer.exe "$@"; } 14 | ! type explorer > /dev/null 2>&1 && [[ -e /mnt/c/Windows/explorer.exe ]] && explorer() { /mnt/c/Windows/explorer.exe "$@"; } 15 | #! type explorer > /dev/null 2>&1 && [[ -e /mnt/d/Windows/System32/explorer.exe ]] && explorer() { /mnt/d/Windows/System32/explorer.exe "$@"; } 16 | ! type explorer > /dev/null 2>&1 && [[ -e /mnt/d/Windows/explorer.exe ]] && explorer() { /mnt/d/Windows/explorer.exe "$@"; } 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /os/unix/systemd/here_systemd.sh: -------------------------------------------------------------------------------- 1 | #https://unix.stackexchange.com/questions/39226/how-to-run-a-script-with-systemd-right-before-shutdown 2 | # In theory, 'sleep 1892160000' should create a process that will run for at least 60 years, with 'sleep' binaries that support 'floating point' numbers of seconds, which should be tested for by timetest. This should not be depended upon unless necessary however. 3 | 4 | _here_systemd_shutdown_action() { 5 | 6 | cat << 'CZXWXcRMTo8EmM8i4d' 7 | [Unit] 8 | CZXWXcRMTo8EmM8i4d 9 | 10 | 11 | echo Description=$sessionid 12 | 13 | cat << 'CZXWXcRMTo8EmM8i4d' 14 | 15 | [Service] 16 | ExecStart=/bin/true 17 | CZXWXcRMTo8EmM8i4d 18 | 19 | echo ExecStop=\""$scriptAbsoluteLocation"\" "$@" 20 | 21 | cat << 'CZXWXcRMTo8EmM8i4d' 22 | Type=oneshot 23 | RemainAfterExit=true 24 | 25 | [Install] 26 | WantedBy=multi-user.target 27 | 28 | CZXWXcRMTo8EmM8i4d 29 | 30 | } 31 | 32 | _here_systemd_shutdown() { 33 | 34 | cat << 'CZXWXcRMTo8EmM8i4d' 35 | [Unit] 36 | CZXWXcRMTo8EmM8i4d 37 | 38 | 39 | echo Description=$sessionid 40 | 41 | cat << 'CZXWXcRMTo8EmM8i4d' 42 | 43 | [Service] 44 | ExecStart=/bin/true 45 | CZXWXcRMTo8EmM8i4d 46 | 47 | echo ExecStop=\""$scriptAbsoluteLocation"\" "$@" 48 | 49 | cat << 'CZXWXcRMTo8EmM8i4d' 50 | Type=oneshot 51 | RemainAfterExit=true 52 | 53 | [Install] 54 | WantedBy=multi-user.target 55 | 56 | CZXWXcRMTo8EmM8i4d 57 | 58 | } 59 | -------------------------------------------------------------------------------- /queue/__build/deps_queue.sh: -------------------------------------------------------------------------------- 1 | # WARNING: In practice, at least some of 'queue' may be considered 'lean' functionality, to be included regardless of whether '_deps_queue' has been called through 'compile.sh' . 2 | _deps_queue() { 3 | #_deps_notLean 4 | #_deps_dev 5 | 6 | # Message queue - 'broadcastPipe' , etc , underlying functions , '_read_page' , etc . 7 | export enUb_queue="true" 8 | 9 | # Packet - any noise-tolerant 'format' . 10 | # RESERVED variable name - synonymous with 'enUb_queue' . 11 | #export enUb_packet="true" 12 | 13 | # Portal - a 'filter program' to make arrangements between embedded devices of various unique identities and/or devices (eg. 'xAxis400stepsMM' . ) 14 | # RESERVED variable name - synonymous with 'enUb_queue' . 15 | #export enUb_portal="true" 16 | } 17 | -------------------------------------------------------------------------------- /queue/aggregator/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Design 3 | 4 | Goes through list of input/output files. Automatically builds cat/tee pipes, and starts. Assumes all pipes have valid inputs/outputs by this point. 5 | 6 | May include a triple buffered input/output for more (slower) interactivity. 7 | 8 | -------------------------------------------------------------------------------- /queue/aggregator/dyanamic/scrap.txt: -------------------------------------------------------------------------------- 1 | 2 | #https://stackoverflow.com/questions/42075387/check-whether-named-pipe-fifo-is-open-for-writing 3 | 4 | #https://unix.stackexchange.com/questions/278538/using-named-pipes-in-bash-created-in-a-c-program 5 | 6 | #https://en.wikipedia.org/wiki/Pipeline_(Unix) 7 | 8 | #https://stackoverflow.com/questions/36340599/how-does-shopt-s-lastpipe-affect-bash-script-behavior 9 | 10 | 11 | #https://github.com/KevinOConnor/klipper/blob/master/docs/FAQ.md#do-i-have-to-use-octoprint 12 | # 'Klipper creates a "virtual serial port" via the "/tmp/printer" file, and it emulates a classic 3d-printer serial interface via that file. In general, alternative software may work with Klipper as long as it can be configured to use "/tmp/printer" for the printer serial port.' 13 | 14 | 15 | 16 | cat /dev/urandom 2> /dev/null | base64 2> /dev/null | tr -dc 'a-zA-Z0-9' | while true ; do sleep 0.1 ; head -c 1 > out1 ; head -c 1 > out2 ; done 17 | 18 | cat /dev/urandom 2> /dev/null | base64 2> /dev/null | tr -dc 'a-zA-Z0-9' | while IFS= read -r -n1 char ; do sleep 0.1 ; echo -n $char ; done 19 | 20 | 21 | 22 | 23 | cat /dev/urandom 2> /dev/null | base64 2> /dev/null | tr -dc 'a-zA-Z0-9' | while IFS= read -r -n1 char ; do sleep 0.1 ; echo -n $char ; done | while 24 | 25 | 26 | 27 | 28 | # Sends only one character to output at a time - pipe closes on every character. 29 | cat /dev/urandom 2> /dev/null | base64 2> /dev/null | tr -dc 'a-zA-Z0-9' | while IFS= read -r -n1 char ; do sleep 0.1 ; echo -n $char > out1 ; done 30 | 31 | 32 | 33 | #Pointless. 34 | cat /dev/urandom 2> /dev/null | base64 2> /dev/null | tr -dc 'a-zA-Z0-9' | while IFS= read -r -n1 char ; do sleep 0.1 ; echo -n $char ; done | cat > out1 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /queue/aggregator/fifo_aggregator.sh: -------------------------------------------------------------------------------- 1 | 2 | # Modify as required for MSW/Cygwin compatibility. 3 | _aggregator_fifo() { 4 | mkfifo "$@" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /queue/aggregator/static/benchmark_broadcastPipe_aggregatorStatic.sh: -------------------------------------------------------------------------------- 1 | _benchmark_broadcastPipe_aggregatorStatic() { 2 | _start 3 | 4 | 5 | 6 | 7 | _stop 8 | } 9 | -------------------------------------------------------------------------------- /queue/queue.sh: -------------------------------------------------------------------------------- 1 | 2 | # ATTENTION: Only the test procedures are disabled if the 'queue' dependency is not declared. Due to the lengthy timing required to reliabily test the inherently unpredictability of any InterProcess-Communication with non-dedicated non-realtime software. 3 | unset _test_queue 4 | unset _test_selfTime 5 | unset _test_bashTime 6 | unset _test_filemtime 7 | unset _test_timeoutRead 8 | #unset _timetest 9 | unset _test_broadcastPipe_page 10 | unset _test_broadcastPipe_aggregatorStatic 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /queue/queue_vars_default.sh: -------------------------------------------------------------------------------- 1 | 2 | _default_page_write_maxTime() { 3 | local currentValue 4 | currentValue=725 5 | _if_cygwin && currentValue=4475 6 | echo "$currentValue" 7 | } 8 | 9 | _default_page_write_maxBytes() { 10 | local currentValue 11 | currentValue=86400 12 | #_if_cygwin && currentValue=864000 13 | echo "$currentValue" 14 | } 15 | 16 | 17 | 18 | _default_page_read_maxTime() { 19 | local currentValue 20 | currentValue=100 21 | _if_cygwin && currentValue=575 22 | echo "$currentValue" 23 | } 24 | 25 | 26 | 27 | 28 | 29 | _broadcastPipe_page_read_maxTime() { 30 | local currentValue 31 | currentValue=100 32 | _if_cygwin && currentValue=975 33 | echo "$currentValue" 34 | } 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /queue/scrap.txt: -------------------------------------------------------------------------------- 1 | 2 | # https://www.youtube.com/watch?v=cEx0T0wWvzo 3 | 4 | 5 | ./lean.sh _page_socket_tcp_server 6 | ./lean.sh _aggregatorStatic_socket_tcp_server 7 | 8 | ./lean.sh _page_socket_unix_server 9 | ./lean.sh _aggregatorStatic_socket_unix_server 10 | 11 | ./lean.sh _page_read | ./lean.sh _aggregatorStatic_write 12 | ./lean.sh _aggregatorStatic_read | ./lean.sh _page_write 13 | 14 | 15 | 16 | 17 | 18 | ./lean.sh _page_converse 19 | ./lean.sh _aggregatorStatic_converse 20 | 21 | 22 | ./lean.sh _page_socket_tcp_client 23 | ./lean.sh _aggregatorStatic_socket_tcp_client 24 | 25 | 26 | ./lean.sh _page_socket_unix_client 27 | ./lean.sh _aggregatorStatic_socket_unix_client 28 | 29 | 30 | -------------------------------------------------------------------------------- /queue/tripleBuffer/benchmark_broadcastPipe_page.sh: -------------------------------------------------------------------------------- 1 | # Under ideal conditions, small quantities of data may be continiously copied completely or identically (<10M). 2 | _benchmark_broadcastPipe_page() { 3 | _start 4 | 5 | export ub_force_limit_page_rate='false' 6 | local current_Write_MaxBytes=864000 7 | 8 | 9 | _demand_broadcastPipe_page "$safeTmp"/inputBufferDir "$safeTmp"/outputBufferDir "$current_Service_MaxTime" "$current_Service_MaxBytes" "$current_Service_Write_MaxTime" 10 | 11 | #>&2 echo "read" 12 | "$scriptAbsoluteLocation" _page_read "$safeTmp"/outputBufferDir 'out-' "$current_Read_MaxTime" > "$safeTmp"/rewrite & 13 | 14 | dd if=/dev/urandom of="$safeTmp"/testfill bs=1M count=4 > /dev/null 2>&1 15 | 16 | #>&2 echo "write" 17 | _timeout 150 cat "$safeTmp"/testfill | pv | _timeout 30 "$scriptAbsoluteLocation" _page_write "$safeTmp"/inputBufferDir 'testfill-' "$current_Write_MaxTime" "$current_Write_MaxBytes" 18 | #_timeout 150 cat "$safeTmp"/testfill | _timeout 30 "$scriptAbsoluteLocation" _page_write "$safeTmp"/inputBufferDir 'testfill-' '$current_Write_MaxTime' '$current_Write_MaxBytes' 19 | 20 | #cat "$safeTmp"/testfill | _page_write_single "$safeTmp"/inputBufferDir 'testfill-' '$current_Write_MaxTime' '$current_Write_MaxBytes' 21 | #_sleep_spinlock 22 | 23 | _terminate_broadcastPipe_page "$safeTmp"/inputBufferDir 24 | 25 | ( 26 | cd "$safeTmp" 27 | du -sh ./testfill ./rewrite 28 | md5sum ./testfill ./rewrite 29 | ) 30 | 31 | #! [[ -s "$safeTmp"/testfill ]] && _stop 1 32 | #! [[ -s "$safeTmp"/rewrite ]] && _stop 1 33 | #! diff "$safeTmp"/testfill "$safeTmp"/rewrite && _stop 1 34 | 35 | _stop 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /queue/tripleBuffer/benchmark_page.sh: -------------------------------------------------------------------------------- 1 | # Under ideal conditions, small quantities of data may be continiously copied completely or identically (<10M). 2 | #./ubiquitous_bash.sh _page_read ./outputBufferDir 'testfill-' "175" > ./rewrite 3 | #cat ./testfill | pv | ./ubiquitous_bash.sh _page_write ./outputBufferDir 'testfill-' "725" "86400" 4 | _benchmark_page() { 5 | _start 6 | 7 | export ub_force_limit_page_rate='false' 8 | local current_Write_MaxBytes=864000 9 | 10 | 11 | #dd if=/dev/urandom of="$safeTmp"/testfill bs=1k count=2048 > /dev/null 2>&1 12 | dd if=/dev/urandom of="$safeTmp"/testfill bs=1M count=4 > /dev/null 2>&1 13 | 14 | 15 | #>&2 echo "read" 16 | #_messagePlain_probe "$scriptAbsoluteLocation" _page_read "$safeTmp"/outputBufferDir 'testfill-' "$current_Read_MaxTime" \> "$safeTmp"/rewrite 17 | "$scriptAbsoluteLocation" _page_read "$safeTmp"/outputBufferDir 'testfill-' "$current_Read_MaxTime" > "$safeTmp"/rewrite & 18 | sleep 1 19 | 20 | #>&2 echo "write" 21 | #_messagePlain_probe _timeout 150 cat "$safeTmp"/testfill \| pv \| _timeout 15 "$scriptAbsoluteLocation" _page_write "$safeTmp"/outputBufferDir 'testfill-' "$current_Write_MaxTime" "$current_Write_MaxBytes" 22 | _timeout 150 cat "$safeTmp"/testfill | pv | _timeout 30 "$scriptAbsoluteLocation" _page_write "$safeTmp"/outputBufferDir 'testfill-' "$current_Write_MaxTime" "$current_Write_MaxBytes" 23 | 24 | ( 25 | cd "$safeTmp" 26 | du -sh ./testfill ./rewrite 27 | md5sum ./testfill ./rewrite 28 | ) 29 | 30 | _stop 31 | } 32 | 33 | -------------------------------------------------------------------------------- /queue/tripleBuffer/broadcastPipe_page_here.sh: -------------------------------------------------------------------------------- 1 | _here_broadcastPipe_page_read_single() { 2 | cat << CZXWXcRMTo8EmM8i4d 3 | #!/usr/bin/env bash 4 | 5 | CZXWXcRMTo8EmM8i4d 6 | 7 | declare -f _page_read_single 8 | declare -f _broadcastPipe_page_read_single 9 | 10 | cat << CZXWXcRMTo8EmM8i4d 11 | _broadcastPipe_page_read_single "\$@" 12 | 13 | CZXWXcRMTo8EmM8i4d 14 | 15 | } 16 | -------------------------------------------------------------------------------- /queue/zDatabase/scrap.txt: -------------------------------------------------------------------------------- 1 | 2 | # Simple 'database' for InterProcess-Communication, storing and retrieving variables. May be especially suitable for tracking (ie. filesystem ) locations of other resources (eg. other installed scripts, other programs, devices associated with specific serial ports, etc) . 3 | 4 | 5 | # Input contents. 6 | 7 | declare -x ubdb_uk4uPhB663kVcygT0q_x="" 8 | 9 | 10 | # Database contents ( 'ops-db.sh' ). 11 | 12 | declare -x ubdb_uk4uPhB663kVcygT0q_name="value" 13 | declare -x ubdb_uk4uPhB663kVcygT0q_x="value" 14 | 15 | 16 | # Modify database. 17 | ./ubiquitous_bash.sh _db_write ./input 18 | 19 | 20 | 21 | # Database contents ( 'ops-db.sh' ). ( deleted empty variable ) 22 | 23 | declare -x ubdb_uk4uPhB663kVcygT0q_name="value" 24 | 25 | 26 | 27 | 28 | # Show (display for end user) database. 29 | ./ubiquitous_bash.sh _db_show 30 | 31 | 32 | # Function to read db variables into shell (script). 33 | _db_read 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /queue/zInteractive/scrap.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ./ubiquitous_bash.sh _demand_interactive_pipe 4 | 5 | # Some platforms (ie. MSW/Cygwin ) may require this instead of '_demand'... apparently due to 'tty' issues. Hosting 'demand' within a 'tmux' session may also be usable as a workaround, however, this has not been tested. 6 | #./ubiquitous_bash.sh _interactive_pipe_sequence 7 | 8 | # ./ubiquitous_bash.sh _interactive_client_pipe ./w_*/interactive_pipe_?????????????????? 9 | 10 | ./ubiquitous_bash.sh _interactive_pipe_konsole 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | # https://unix.stackexchange.com/questions/229677/bash-interactive-mode-on-redirect 23 | 24 | # https://superuser.com/questions/1494557/interactive-shell-through-named-pipe 25 | #bash -i 0<"$1"/p0 1>"$1"/p1 2>"$1"/p2 26 | #bash -i -l 0<"$1"/p0 1>"$1"/p1 2>"$1"/p2 & 27 | #wait 28 | 29 | # https://stackoverflow.com/questions/11821378/what-does-bashno-job-control-in-this-shell-mean 30 | #set -m 31 | 32 | # https://serverfault.com/questions/368054/run-an-interactive-bash-subshell-with-initial-commands-without-returning-to-the 33 | #bash --init-file <(echo "echo test") 34 | #bash -c "ls;pwd;other commands;$SHELL" 35 | #( ls; pwd; exec $BASH; ) 36 | 37 | #| tail -n +2 38 | #bash -l -i -s 0<"$1"/p0 1>"$1"/p1 2>"$1"/p2 39 | 40 | # https://wiki.networksecuritytoolkit.org/nstwiki/index.php/Console_Output_and_Serial_Terminals 41 | # https://unix.stackexchange.com/questions/297519/vim-in-gnome-terminal-says-output-is-not-to-a-terminal 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /queue/zSocket/aggregatorStatic_socket_tcp.sh: -------------------------------------------------------------------------------- 1 | # ATTENTION: Override with 'ops' or similar. 2 | # Lock (if at all) the socket, not the buffers. 3 | # Ports 6392 or alternatively 24672 preferred for one-per-machine IPC service with low-latency frequent-reset (ie. 'aggregatorStatic' ) backend. 4 | # Consider the limited availability of TCP/UDP port numbers not occupied by some other known purpose. 5 | # TCP server intended for compatibility with platforms (ie. MSW/Cygwin) which may not have sufficient performance or flexibility to frequent-reset (ie. 'aggregatorStatic' ) backend directly. 6 | # https://blog.travismclarke.com/post/socat-tutorial/ 7 | # https://fub2.github.io/powerful-socat/ 8 | # https://jdimpson.livejournal.com/tag/socat 9 | # https://stackoverflow.com/questions/57299019/make-socat-open-port-only-on-localhost-interface 10 | _aggregatorStatic_socket_tcp_server() { 11 | _messagePlain_nominal '_aggregatorStatic_socket_tcp_server: init: _demand_broadcastPipe_aggregatorStatic' 12 | _demand_broadcastPipe_aggregatorStatic 13 | 14 | _messagePlain_nominal '_aggregatorStatic_socket_tcp_server: socat' 15 | socat TCP-LISTEN:6392,reuseaddr,pf=ip4,fork,bind=127.0.0.1 EXEC:\'\""$scriptAbsoluteLocation"\"\'' _aggregatorStatic_converse' 16 | 17 | #_messagePlain_nominal '_aggregatorStatic_socket_tcp_server: _terminate_broadcastPipe_aggregatorStatic' 18 | #_terminate_broadcastPipe_aggregatorStatic 19 | } 20 | 21 | _aggregatorStatic_socket_tcp_client() { 22 | socat TCP:localhost:6392 - 23 | } 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /queue/zSocket/page_socket_tcp.sh: -------------------------------------------------------------------------------- 1 | # ATTENTION: Override with 'ops' or similar. 2 | # Lock (if at all) the socket, not the buffers. 3 | # Ports 6391 or alternatively 24671 preferred for one-per-machine IPC service with high-latency no-reset (ie. 'tripleBuffer' ) backend. 4 | # Consider the limited availability of TCP/UDP port numbers not occupied by some other known purpose. 5 | # TCP server intended for compatibility with platforms (ie. MSW/Cygwin) which may not have sufficient performance or flexibility to read/write (ie. 'tripleBuffer' ) backend directly. 6 | # https://blog.travismclarke.com/post/socat-tutorial/ 7 | # https://fub2.github.io/powerful-socat/ 8 | # https://jdimpson.livejournal.com/tag/socat 9 | # https://stackoverflow.com/questions/57299019/make-socat-open-port-only-on-localhost-interface 10 | _page_socket_tcp_server() { 11 | _messagePlain_nominal '_page_socket_tcp_server: init: _demand_broadcastPipe_page' 12 | _demand_broadcastPipe_page 13 | 14 | _messagePlain_nominal '_page_socket_tcp_server: socat' 15 | #socat TCP-LISTEN:6391,reuseaddr,pf=ip4,fork,bind=127.0.0.1 EXEC:"$scriptAbsoluteLocation"' '"_page_converse" 16 | #socat TCP-LISTEN:6391,reuseaddr,pf=ip4,fork,bind=127.0.0.1 SYSTEM:'echo $HOME; ls -la' 17 | #socat TCP-LISTEN:6391,reuseaddr,pf=ip4,fork,bind=127.0.0.1 SYSTEM:\'\""$scriptAbsoluteLocation"\"\'' _page_converse' 18 | socat TCP-LISTEN:6391,reuseaddr,pf=ip4,fork,bind=127.0.0.1 EXEC:\'\""$scriptAbsoluteLocation"\"\'' _page_converse' 19 | 20 | #_messagePlain_nominal '_page_socket_tcp_server: _terminate_broadcastPipe_page' 21 | #_terminate_broadcastPipe_page 22 | } 23 | 24 | _page_socket_tcp_client() { 25 | socat TCP:localhost:6391 - 26 | } 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /server/coordinatorWorker.sh: -------------------------------------------------------------------------------- 1 | 2 | # '$SSH_pub_Coordinator_01' 3 | # ssh ... rclone ... push/pull ... /local/dir/. ... .../brig/machineName/. 4 | 5 | 6 | 7 | 8 | 9 | 10 | # TODO... ideas... 11 | 12 | #Need filesystem available to all hosts in realtime... HTTP? 13 | # NOT HTTPS . No need for SSL, only *experimental* use of factories, etc, would ever use that. 14 | 15 | #unifs... 16 | 17 | 18 | #maybe an http server more convenient and safer than onedrive...? 19 | #puddleJumper toggleable lighttpd,nginx, etc ? 20 | #documentation - while loop to push/rclone to puddleJumper repeatedly? 21 | 22 | 23 | -------------------------------------------------------------------------------- /shortcuts/ai/ollama/license.txt: -------------------------------------------------------------------------------- 1 | # https://www.llama.com/llama3_1/license/ 2 | # https://huggingface.co/meta-llama/Meta-Llama-3.1-70B-Instruct/blob/main/LICENSE 3 | # NOTICE: ATTENTION: This license has been preserved as 'LICENSE-Llama-3.1.txt', but this license does NOT apply to any 'ubiquitous_bash' code or any other work that is not either a work by Meta or strictly a derivative of a work by Meta (such as a modified AI model GGUF or safetensors file) ! 4 | -------------------------------------------------------------------------------- /shortcuts/blockchain/ethereum/ethereum.sh: -------------------------------------------------------------------------------- 1 | _ethereum_new() { 2 | _geth account new 3 | } 4 | 5 | _ethereum_sync() { 6 | _geth --rpc --fast --cache=4096 7 | } 8 | 9 | _ethereum_status() { 10 | echo 'eth.syncing' | _geth attach 11 | } 12 | 13 | _ethereum_mine() { 14 | _ethereum_home xterm -e "$scriptBundle"/ethminer -G --farm-recheck 200 -S eu1.ethermine.org:4444 -FS us1.ethermine.org:4444 -O "$ethaddr"."$rigname" 15 | } 16 | 17 | _ethereum_mine_status() { 18 | xdg-open "https://ethermine.org/miners/""$ethaddr" 19 | } 20 | 21 | # TODO Dynamically chosen port. 22 | _parity_ui() { 23 | #xdg-open 'http://127.0.0.1:'"$parity_ui_port"'/#/' 24 | 25 | #egrep -o 'https?://[^ ]+' 26 | parity_browser_url=$(_parity signer new-token | grep 'http' | cut -f 2- -d\ | _nocolor) 27 | 28 | xdg-open "$parity_browser_url" 29 | } 30 | 31 | _parity_import() { 32 | _parity --import-geth-keys 33 | } 34 | -------------------------------------------------------------------------------- /shortcuts/cloud-build/_custom/debian/debian_build.sh: -------------------------------------------------------------------------------- 1 | #debian_build 2 | 3 | # Intended to exemplify 'current best practices' building a 'template' Debian VM image simultaneously bootable under at least BIOS/UEFI, LiveISO/LiveUSB, userQemu/userVBox, userChRoot, userDocker . Must adhere to similar steps as documented under 'raspi' 'kit' , although 'x64' may be the typically intended architecture. 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shortcuts/cloud-build/_custom/gentoo/gentoo_build.sh: -------------------------------------------------------------------------------- 1 | #gentoo_build 2 | 3 | # Mostly intended only to build especially fast 'PanelVM' images, or more rarely images for programs with dependencies needing substantial modification of distribution available programs. 4 | -------------------------------------------------------------------------------- /shortcuts/cloud-build/cloudNativeBuildpack/cloudNativeBuildpack_build.sh: -------------------------------------------------------------------------------- 1 | #cloudNativeBuildpack 2 | -------------------------------------------------------------------------------- /shortcuts/cloud-build/docker/docker_build.sh: -------------------------------------------------------------------------------- 1 | #docker_build 2 | -------------------------------------------------------------------------------- /shortcuts/cloud-build/vagrant/vagrant_build.sh: -------------------------------------------------------------------------------- 1 | #vagrant_build 2 | 3 | # WARNING: DANGER: Always use '_custom' from '_lib/kit/raspi' in addition to any 'cloud' built data (or otherwise dependent on cloud to built data) to ensure adequate completeness. 4 | 5 | 6 | 7 | 8 | 9 | 10 | _test_vagrant_build() { 11 | #sudo -n usermod --append --groups libvirt $USER 12 | 13 | _wantGetDep systemd/system/libvirtd.service 14 | 15 | #libvirt-daemon 16 | _wantGetDep libvirt/libvirt-guests.sh 17 | _wantGetDep libvirt/connection-driver/libvirt_driver_qemu.so 18 | 19 | #libvirt-clients 20 | _wantGetDep virsh 21 | 22 | ! _typeShare 'vagrant-plugins/plugins.d/vagrant-libvirt.json' && _wantGetDep 'vagrant-plugins/plugins.d/vagrant-libvirt.json' 23 | _wantGetDep vagrant 24 | } 25 | -------------------------------------------------------------------------------- /shortcuts/cloud/bridge/apacheLibcloud/apacheLibcloud.sh: -------------------------------------------------------------------------------- 1 | #apacheLibcloud 2 | 3 | # https://www.pixelite.co.nz/article/using-apache-libcloud-provision-cloud-servers/ 4 | -------------------------------------------------------------------------------- /shortcuts/cloud/bridge/nubo/nubo.sh: -------------------------------------------------------------------------------- 1 | #nubo 2 | 3 | # https://pythonhosted.org/nubo/ 4 | -------------------------------------------------------------------------------- /shortcuts/cloud/bridge/paramiko/paramiko.sh: -------------------------------------------------------------------------------- 1 | #paramiko 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/bridge/terraform/terraform.sh: -------------------------------------------------------------------------------- 1 | #terraform 2 | 3 | # https://en.wikipedia.org/wiki/Terraform_(software) 4 | # https://www.terraform.io/docs/language/index.html 5 | # https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started 6 | 7 | 8 | 9 | 10 | _test_terraform() { 11 | _wantGetDep gpg 12 | _wantGetDep python3/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py 13 | _wantGetDep curl 14 | 15 | _wantGetDep terraform 16 | 17 | #! _typeDep terraform && echo 'warn: missing: terraform' 18 | if ! _typeDep terraform || ! terraform -help 2>/dev/null | grep 'terraform' > /dev/null 2>&1 19 | then 20 | echo 'warn: missing: terraform' 21 | return 1 22 | fi 23 | 24 | return 0 25 | } 26 | -------------------------------------------------------------------------------- /shortcuts/cloud/self/libvirt_self.sh: -------------------------------------------------------------------------------- 1 | #libvirt_self 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/self/screenScraper/screenScraper-msw.sh: -------------------------------------------------------------------------------- 1 | #screenscraper-msw 2 | 3 | # ATTENTION: Expect new software development will be required. MSW particularly has complicated issues with 'UAC' . Developer 'Guy Godin' of 'Virtual Desktop' most likely has source code for all necessary workarounds. 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shortcuts/cloud/self/screenScraper/screenScraper-nix.sh: -------------------------------------------------------------------------------- 1 | #screenscraper-nix 2 | 3 | # ATTENTION: Expect new software development will be required. Some relevant capability apparently already exists from OBS, ffmpeg , gstreamer , etc . Due to apparent lack of 'NVIDIA Game Stream' , most likely a GPU-agnostic real-time h264 or similar video codec would also be helpful. 4 | 5 | 6 | -------------------------------------------------------------------------------- /shortcuts/cloud/service/azure/azure.sh: -------------------------------------------------------------------------------- 1 | #azure 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/service/ibm/ibm.sh: -------------------------------------------------------------------------------- 1 | #ibm 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/service/oracle/oracle.sh: -------------------------------------------------------------------------------- 1 | #oracle 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/storage/aws/aws_s3_compatible.sh: -------------------------------------------------------------------------------- 1 | #aws_s3_compatible 2 | -------------------------------------------------------------------------------- /shortcuts/cloud/storage/blackblaze/blackblaze.sh: -------------------------------------------------------------------------------- 1 | #blackblaze 2 | -------------------------------------------------------------------------------- /shortcuts/dev/ai/claude_code.sh: -------------------------------------------------------------------------------- 1 | 2 | # WARNING: May be untested. 3 | _setup_claude_code() { 4 | _mustGetSudo 5 | 6 | _get_npm 7 | 8 | #npm install -g @anthropic-ai/claude-code 9 | sudo -n npm install -g @anthropic-ai/claude-code 10 | } 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /shortcuts/dev/ai/codex.sh: -------------------------------------------------------------------------------- 1 | 2 | # NOTICE: Installing 'codex' may be useful for cloud, container, etc, usage (eg. within a RunPod instance, within a Docker container, etc).) 3 | # Also recommend 'Cline' VSCode extension . 4 | _setup_codex() { 5 | _mustGetSudo 6 | 7 | _get_npm 8 | 9 | #@openai/codex 10 | #@openai/codex@latest 11 | sudo -n npm install -g @openai/codex 12 | } 13 | 14 | 15 | # https://github.com/openai/codex/issues/1189 16 | #codex --approval-mode full-auto --provider openrouter --model openai/codex-mini 17 | # 18 | #unset OPENAI_API_KEY 19 | #unset OPENROUTER_API_KEY 20 | #export OPENAI_BASE_URL="https://openrouter.ai/api/v1" 21 | #export OPENAI_API_KEY="sk-***-21" 22 | #codex --model openai/o4-mini 23 | #codex --model openai/codex-mini 24 | 25 | 26 | #--model codex-mini-latest 27 | #--model o3 28 | 29 | #alias codex='wsl -d ubdist codex' 30 | 31 | 32 | 33 | 34 | 35 | alias codexAuto='codex --approval-mode full-auto' 36 | 37 | 38 | -------------------------------------------------------------------------------- /shortcuts/dev/app/eclipse/deveclipse_app.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /shortcuts/dev/app/eclipse/deveclipse_bin_.sh: -------------------------------------------------------------------------------- 1 | _eclipse_binary() { 2 | eclipse "$@" 3 | } 4 | 5 | # ATTENTION: Override with 'core.sh', 'ops', or similar. 6 | # Static parameters. Must be accepted if function overridden to point script contained installation. 7 | _eclipse_param() { 8 | _eclipse_example_binary -vm "$ubJava" -data "$ub_eclipse_workspace" -configuration "$ub_eclipse_configuration" "$@" 9 | } 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /shortcuts/dev/app/eclipse/deveclipse_env.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/shortcuts/dev/app/eclipse/deveclipse_env.sh -------------------------------------------------------------------------------- /shortcuts/dev/app/eclipse/deveclipse_example_export.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /shortcuts/dev/app/eclipse/deveclipse_java.sh: -------------------------------------------------------------------------------- 1 | _set_java__eclipse() { 2 | _set_java_openjdk "$@" 3 | } 4 | -------------------------------------------------------------------------------- /shortcuts/dev/app/repo/disk/dd.sh: -------------------------------------------------------------------------------- 1 | 2 | # DANGER: Of course the 'dd' command can cause severe data loss. Be careful. Maybe use 'type -p' to see function code for reference instead of calling directly. 3 | 4 | 5 | _dd_user() { 6 | dd "$@" oflag=direct conv=fdatasync status=progress 7 | } 8 | _dd() { 9 | sudo -n "$scriptAbsoluteLocation" _dd_user "$@" 10 | } 11 | 12 | _dropCache() { 13 | echo 3 | sudo -n tee /proc/sys/vm/drop_caches 14 | sync ; echo 3 | sudo -n tee /proc/sys/vm/drop_caches 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /shortcuts/dev/app/repo/mktorrent/mktorrent.sh: -------------------------------------------------------------------------------- 1 | 2 | #"$1" == src (file/dir) 3 | #"$2" == dst (torrentName).torrent 4 | #"$3" == CSV Tracker URL List (full announce URL list comma delimited) (' [,]* ') 5 | #"$4" == CSV Web Seed URL List 6 | # ./ubiquitous_bash.sh _mktorrent ./ubiquitous_bash.sh torrentName 'https://example.com/tracker,https://example1.com/tracker' 'https://example.com/ubiquitous_bash.sh,https://example1.com/ubiquitous_bash.sh' 7 | _mktorrent_webseed() { 8 | if [[ "$1" == "" ]] 9 | then 10 | _messagePlain_request '"$1" == src (file/dir)' 11 | _messagePlain_request '"$2" == dst (torrentName).torrent' 12 | _messagePlain_request '"$3" == CSV Tracker URL List (full announce URL list comma delimited) ('\'' [,]* '\'')' 13 | _messagePlain_request '"$4" == CSV Web Seed URL List' 14 | return 1 15 | fi 16 | 17 | local currentSrc 18 | currentSrc="$1" 19 | local currentDst 20 | currentDst="$2" 21 | local currentTrackerCSV 22 | currentTrackerCSV="$3" 23 | local currentWebSeedCSV 24 | currentWebSeedCSV="$4" 25 | shift ; shift ; shift ; shift 26 | 27 | mktorrent -w "$currentWebSeedCSV" -a "$currentTrackerCSV" -d "$currentSrc" -n "$currentDst" "$@" 28 | } 29 | _mktorrent() { 30 | _mktorrent_webseed "$@" 31 | } 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | _test_mktorrent() { 40 | # If not Debian, then simply accept these pacakges may not be available. 41 | [[ -e /etc/issue ]] && ! cat /etc/issue | grep 'Debian' > /dev/null 2>&1 && return 0 42 | 43 | _wantGetDep mktorrent 44 | 45 | #_getDep mktorrent 46 | } 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /shortcuts/dev/app/search/search.sh: -------------------------------------------------------------------------------- 1 | _test_search() { 2 | _tryExec "_test_recoll" 3 | } 4 | 5 | # ATTENTION: Override with 'ops.sh' or similar. 6 | _set_search_prog() { 7 | true 8 | #export current_configDir_search="$scriptLocal"/search 9 | #export current_configDir_search="$current_projectDir_search"/.search 10 | } 11 | 12 | _set_search() { 13 | _messagePlain_nominal 'init: _set_search' 14 | 15 | # DANGER: Consistent directory naming. 16 | # Force creation of 'project.afs' . 17 | export afs_nofs='false' 18 | export ubAbstractFS_enable_projectafs_dir='true' 19 | 20 | _reset_abstractfs 21 | "$scriptAbsoluteLocation" _messagePlain_probe_cmd _findProjectAFS . 22 | _reset_abstractfs 23 | 24 | _messagePlain_probe_cmd _abstractfs ls -d ./. 25 | _messagePlain_probe_var abstractfs 26 | 27 | _messagePlain_nominal "set: search" 28 | export current_abstractDir_search="$abstractfs" 29 | export current_projectDir_search="$abstractfs_projectafs_dir" 30 | _messagePlain_probe_var current_projectDir_search 31 | #export current_configDir_search="$scriptLocal"/search 32 | export current_configDir_search="$current_projectDir_search"/.search 33 | _set_search_prog "$@" 34 | _messagePlain_probe_var current_configDir_search 35 | 36 | _reset_abstractfs 37 | } 38 | 39 | _prepare_search() { 40 | _messagePlain_nominal 'init: _prepare_search' 41 | _set_search "$@" 42 | 43 | _messagePlain_nominal '_prepare_search: dir' 44 | #"$scriptAbsoluteLocation" _abstractfs _messagePlain_probe_cmd mkdir -p "$current_configDir_search" 45 | _messagePlain_probe_cmd mkdir -p "$current_configDir_search" 46 | } 47 | -------------------------------------------------------------------------------- /shortcuts/dev/devsearch.sh: -------------------------------------------------------------------------------- 1 | #https://stackoverflow.com/questions/15432156/display-filename-before-matching-line-grep 2 | _grepFileLine() { 3 | grep -n "$@" /dev/null 4 | } 5 | 6 | _findFunction() { 7 | #-name '*.sh' 8 | #-not -path "./_local/*" 9 | #find ./blockchain -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 10 | #find ./generic -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 11 | #find ./instrumentation -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 12 | #find ./labels -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 13 | #find ./os -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 14 | #find ./shortcuts -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 15 | #find . -name '*.sh' -type f -size -10000k -exec grep -n "$@" '{}' /dev/null \; 16 | 17 | find . -not -path "./_local/*" -name '*.sh' -type f -size -3000k -exec grep -n "$@" '{}' /dev/null \; 18 | } 19 | -------------------------------------------------------------------------------- /shortcuts/distro/debian/updateDebian.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/shortcuts/distro/debian/updateDebian.sh -------------------------------------------------------------------------------- /shortcuts/distro/distro.sh: -------------------------------------------------------------------------------- 1 | _testDistro() { 2 | _wantGetDep sha256sum 3 | _wantGetDep sha512sum 4 | _wantGetDep axel 5 | } 6 | -------------------------------------------------------------------------------- /shortcuts/docker/dockerassets.sh: -------------------------------------------------------------------------------- 1 | #Show all images in repository. 2 | _dockerImages() { 3 | _permitDocker docker images "$@" 4 | } 5 | 6 | #Show all containers in repository. 7 | _dockerContainers() { 8 | _permitDocker docker ps -a "$@" 9 | } 10 | 11 | #Show all running containers. 12 | _dockerRunning() { 13 | _permitDocker docker ps "$@" 14 | } 15 | 16 | _dockerLocal_sequence() { 17 | _start 18 | _prepare_docker 19 | _prepare_docker_directives 20 | 21 | _messageNormal '$dockerObjectName' 22 | echo "$dockerObjectName" 23 | _messageNormal '$dockerBaseObjectName' 24 | echo "$dockerBaseObjectName" 25 | _messageNormal '$dockerImageObjectName' 26 | echo "$dockerImageObjectName" 27 | _messageNormal '$dockerContainerObjectName' 28 | echo "$dockerContainerObjectName" 29 | _messageNormal '$dockerContainerObjectNameInstanced' 30 | echo "$dockerContainerObjectNameInstanced" 31 | 32 | _stop 33 | } 34 | 35 | #Show local docker container, image, and base name. 36 | _dockerLocal() { 37 | "$scriptAbsoluteLocation" _dockerLocal_sequence "$@" 38 | } 39 | -------------------------------------------------------------------------------- /shortcuts/docker/dockerparse.sh: -------------------------------------------------------------------------------- 1 | #Docker Parse 2 | #These docker file parsing functions have no production use, and have been pulled in from DockerApp for manual use or reference only. 3 | 4 | _parseDockerfileElement() { 5 | local dockerfileElement 6 | dockerfileElement=$(grep "$1" ./dockerfile | cut -d\ -f2- | tr -d '[]"') 7 | export dockerfile_"$1"="$dockerfileElement" 8 | } 9 | 10 | _parseDockerfile() { 11 | _parseDockerfileElement ENTRYPOINT 12 | _parseDockerfileElement CMD 13 | } 14 | -------------------------------------------------------------------------------- /shortcuts/factory/factory-ops.sh: -------------------------------------------------------------------------------- 1 | 2 | # Very unusual. 3 | _factory_ops() { 4 | #if [[ "$ub_ops_disable" != 'true' ]] 5 | #then 6 | #if [[ "$objectName" == "ubiquitous_bash" ]] #&& false 7 | #then 8 | if [[ -e "$scriptAbsoluteFolder"/shortcuts/factory/factory.sh ]] && [[ -e "$scriptAbsoluteFolder"/shortcuts/factory/factoryCreate.sh ]] && [[ -e "$scriptAbsoluteFolder"/shortcuts/factory/factoryCreate_here.sh ]] 9 | then 10 | . "$scriptAbsoluteFolder"/shortcuts/factory/factory.sh 11 | . "$scriptAbsoluteFolder"/shortcuts/factory/factoryCreate.sh 12 | . "$scriptAbsoluteFolder"/shortcuts/factory/factoryCreate_here.sh 13 | fi 14 | #fi 15 | #fi 16 | } 17 | if [[ "$ub_ops_disable" != 'true' ]] 18 | then 19 | if [[ "$objectName" == "ubiquitous_bash" ]] #&& false 20 | then 21 | _factory_ops 22 | fi 23 | fi 24 | 25 | 26 | # Before calling function, get latest function version . 27 | #if [[ "$recursionGuard_factory_ops" == "" ]] 28 | #then 29 | #_factory_ops_recursion "$@" 30 | #return 31 | #fi 32 | _factory_ops_recursion() { 33 | local currentExitStatus_recursion="" 34 | _factory_ops 35 | if [[ "$recursionGuard_factory_ops" == "" ]] 36 | then 37 | export recursionGuard_factory_ops="true" 38 | "${FUNCNAME[1]}" "$@" 39 | currentExitStatus_recursion="$?" 40 | export recursionGuard_factory_ops="" 41 | unset recursionGuard_factory_ops 42 | return "$currentExitStatus_recursion" 43 | fi 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /shortcuts/git/_ref/_scratch-diag_aria2c-030-wget_githubRelease_internal.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ```experiments 5 | export FORCE_AXEL="3" 6 | export FORCE_PARALLEL="5" 7 | ./ubiquitous_bash.sh _get_ingredientVM "spring" 8 | ``` 9 | 10 | ```command 11 | export FORCE_AXEL="3" 12 | export FORCE_PARALLEL="5" 13 | ./ubiquitous_bash.sh _wget_githubRelease_join-stdout "soaringDistributions/ubDistBuild" "spring" "package_image.tar.flx" > _local/temp 14 | ``` 15 | 16 | ```processesAndFiles 17 | for f in .m_axelTmp_*_*.pid; do echo "PID file: ${f}"; ps -e | grep $(cat "${f}" | head -n1 | cut -d: -f1) || echo "Process not found"; done ; ls -1 .m_axel* 18 | 19 | ``` 20 | 21 | ```bash 22 | 23 | 24 | ``` 25 | 26 | 27 | 28 | ```output 29 | 30 | 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /shortcuts/git/gitBare.sh: -------------------------------------------------------------------------------- 1 | #####Program 2 | 3 | _createBareGitRepo() { 4 | mkdir -p "$bareRepoDir" 5 | cd $bareRepoDir 6 | 7 | git --bare init 8 | git branch -M main 9 | 10 | echo "-----" 11 | } 12 | 13 | 14 | _setBareGitRepo() { 15 | cd "$repoDir" 16 | 17 | git remote rm origin 18 | git remote add origin "$bareRepoDir" 19 | git push --set-upstream origin master 20 | 21 | # WARNING: TODO: Experimental, requires further testing. Use branch 'main' if extant. 22 | git push --set-upstream origin main 23 | 24 | echo "-----" 25 | } 26 | 27 | _showGitRepoURI() { 28 | echo git clone --recursive "$bareRepoAbsoluteDir" "$repoName" 29 | echo git clone --recursive ssh://"$USER"@"$repoHostname""$repoPort""$bareRepoAbsoluteDir" "$repoName" 30 | 31 | 32 | #if [[ "$repoHostname" != "" ]] 33 | #then 34 | # clear 35 | # echo ssh://"$USER"@"$repoHostname""$repoPort""$bareRepoAbsoluteDir" 36 | # sleep 15 37 | #fi 38 | } 39 | 40 | _gitBareSequence() { 41 | _gitInfo 42 | 43 | if [[ -e "$bareRepoDir" ]] 44 | then 45 | _showGitRepoURI 46 | return 2 47 | fi 48 | 49 | if ! [[ -e "$repoDir"/.git ]] 50 | then 51 | return 1 52 | fi 53 | 54 | _createBareGitRepo 55 | 56 | _setBareGitRepo 57 | 58 | _showGitRepoURI 59 | 60 | } 61 | 62 | _gitBare() { 63 | 64 | "$scriptAbsoluteLocation" _gitBareSequence 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /shortcuts/git/gitVars.sh: -------------------------------------------------------------------------------- 1 | 2 | #_set_GH_TOKEN() { 3 | #[[ "$GH_TOKEN" != "" ]] && export GH_TOKEN=$(_safeEcho "$GH_TOKEN" | tr -dc 'a-zA-Z0-9_') 4 | #[[ "$INPUT_GITHUB_TOKEN" != "" ]] && export INPUT_GITHUB_TOKEN=$(_safeEcho "$INPUT_GITHUB_TOKEN" | tr -dc 'a-zA-Z0-9_') 5 | #} 6 | #_set_GH_TOKEN 7 | 8 | -------------------------------------------------------------------------------- /shortcuts/github/github_removeHTTPS.sh: -------------------------------------------------------------------------------- 1 | 2 | _github_removeActionsHTTPS-filter() { 3 | _messagePlain_probe '_github_removeActionsHTTPS-filter: '"$1" 4 | 5 | sed -i 's/^\sextraheader.*$//g' "$1" 6 | sed -i 's/^\sinsteadOf = git@github.com:.*$//g' "$1" 7 | sed -i 's/^\sinsteadOf = org.*@github.com:.*$//g' "$1" 8 | } 9 | 10 | _github_removeActionsHTTPS() { 11 | if [[ "$1" != *".git"* ]] && [[ "$1" != *".git" ]] 12 | then 13 | _messagePlain_bad 'warn: missing: .git: '"$1" 14 | _messageFAIL 15 | _stop 1 16 | return 1 17 | fi 18 | 19 | find "$1" -type f -name 'config' -exec "$scriptAbsoluteLocation" _github_removeActionsHTTPS-filter {} \; 20 | 21 | 22 | } 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /shortcuts/importShortcuts.sh: -------------------------------------------------------------------------------- 1 | _importShortcuts() { 2 | _tryExec "_resetFakeHomeEnv" 3 | 4 | if ! [[ "$PATH" == *":""$HOME""/bin"* ]] && ! [[ "$PATH" == "$HOME""/bin"* ]] && [[ -e "$HOME"/bin ]] && [[ -d "$HOME"/bin ]] 5 | then 6 | #export PATH="$PATH":"$HOME"/bin 7 | 8 | # CAUTION: Dubious workaround to prevent '/usr/local/bin/ubiquitous_bash.sh' , or '/usr/local/bin' , from overriding later program versions in '~/bin' . 9 | if [[ $( ( export PATH="$PATH":"$HOME"/bin ; type -p ubiquitous_bash.sh ) ) == "/usr/local/bin/ubiquitous_bash.sh" ]] 10 | then 11 | export PATH="$HOME"/bin:"$PATH" 12 | else 13 | export PATH="$PATH":"$HOME"/bin 14 | fi 15 | fi 16 | 17 | _tryExec "_visualPrompt" 18 | 19 | _tryExec "_scopePrompt" 20 | 21 | return 0 22 | } 23 | -------------------------------------------------------------------------------- /shortcuts/linux/bfq.sh: -------------------------------------------------------------------------------- 1 | # "$1" == alternateRootPrefix 2 | _write_bfq() { 3 | _messagePlain_nominal 'write_bfq: init' 4 | 5 | _mustGetSudo 6 | 7 | 8 | _messagePlain_nominal 'write_bfq: write' 9 | 10 | sudo -n cat << 'CZXWXcRMTo8EmM8i4d' | sudo tee "$1"'/etc/modules-load.d/bfq-'"$ubiquitousBashIDshort"'.conf' > /dev/null 11 | bfq 12 | 13 | CZXWXcRMTo8EmM8i4d 14 | 15 | 16 | cat << 'CZXWXcRMTo8EmM8i4d' | sudo tee "$1"'/etc/udev/rules.d/60-scheduler-'"$ubiquitousBashIDshort"'.rules' > /dev/null 17 | ACTION=="add|change", KERNEL=="sd*[!0-9]|sr*", ATTR{queue/scheduler}="bfq" 18 | ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="bfq" 19 | 20 | CZXWXcRMTo8EmM8i4d 21 | 22 | _messagePlain_good 'write_bfq: success' 23 | 24 | } 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /shortcuts/linux/kernelConfig_here.sh: -------------------------------------------------------------------------------- 1 | _kernelConfig_list_here() { 2 | cat << CZXWXcRMTo8EmM8i4d 3 | 4 | 5 | 6 | CZXWXcRMTo8EmM8i4d 7 | } 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /shortcuts/mkboot/here_mkboot.sh: -------------------------------------------------------------------------------- 1 | _here_mkboot_grubcfg() { 2 | 3 | cat << 'CZXWXcRMTo8EmM8i4d' 4 | set default="0" 5 | set timeout="1" 6 | 7 | menuentry "Buildroot" { 8 | insmod gzio 9 | insmod part_msdos 10 | insmod ext2 11 | CZXWXcRMTo8EmM8i4d 12 | 13 | local linuxImageName 14 | linuxImageName=$(ls "$chrootDir"/boot | grep vmlinuz | tail -n 1) 15 | local linuxInitRamFS 16 | linuxInitRamFS=$(ls "$chrootDir"/boot | grep initrd | tail -n 1) 17 | 18 | echo "linux (hd0,msdos1)/boot/""$linuxImageName"" root=/dev/sda1 rw console=tty0 console=ttyS0" 19 | echo "initrd /boot/""$linuxInitRamFS" 20 | 21 | cat << 'CZXWXcRMTo8EmM8i4d' 22 | } 23 | CZXWXcRMTo8EmM8i4d 24 | 25 | } 26 | -------------------------------------------------------------------------------- /shortcuts/os/unix/systemd/systemd_cleanup.sh: -------------------------------------------------------------------------------- 1 | # WARNING: End user function. Do NOT call within scripts. 2 | # No production use. 3 | # DANGER: Removes all 'service' files with the correct number of characters. In practice, no non-temporary service is known to meet this criteria. 4 | _systemd_cleanup() { 5 | # DANGER: Obsolete, more likely to cause unintended deletion. Will be disabled eventually. 6 | sudo -n rm -f /etc/systemd/system/??????????????????.service 7 | 8 | # WARNING: Relies on a >72char filename. 9 | sudo -n rm -f /etc/systemd/system/????????????????????????????????????????????????????????????????????????.service 10 | } 11 | -------------------------------------------------------------------------------- /shortcuts/remoteShortcuts.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | # _upgrade-import-assets corpName 4 | _upgrade-import-assets() { 5 | "$scriptAbsoluteLocation" _upgrade_sequence-import-assets "$@" 6 | } 7 | _upgrade_sequence-import-assets() { 8 | local corpName="$1" 9 | 10 | 11 | _start 12 | 13 | ! cd "$safeTmp" && _messageFAIL 14 | 15 | export INPUT_GITHUB_TOKEN="$GH_TOKEN" 16 | if ! ( type _gitBest > /dev/null 2>&1 && "$scriptAbsoluteLocation" _gitBest clone --depth 1 'git@github.com:soaringDistributions/zImport_corp_'"$corpName"'.git' ) 17 | then 18 | if ls -1 "$HOME"/.ssh/id_* > /dev/null 19 | then 20 | if ! git clone --depth 1 'git@github.com:soaringDistributions/zImport_corp_'"$corpName"'.git' 21 | then 22 | export safeToDeleteGit="true" 23 | _messagePlain_bad 'bad: upgrade-import-assets-'"$corpName"': git: FAIL: fail' 24 | _messageFAIL 25 | _stop 1 26 | exit 1 27 | fi 28 | else 29 | export safeToDeleteGit="true" 30 | _messagePlain_bad 'bad: upgrade-import-assets-'"$corpName"': git: FAIL: no remote permissions' 31 | _messageFAIL 32 | _stop 1 33 | exit 1 34 | fi 35 | fi 36 | 37 | mkdir -p "$scriptLib"/zImport_corp_"$corpName" 38 | mv -f "$safeTmp"/zImport_corp_"$corpName"/*.sh "$scriptLib"/zImport_corp_"$corpName"/ 39 | mv -f "$safeTmp"/zImport_corp_"$corpName"/*.yml "$scriptLib"/zImport_corp_"$corpName"/ 40 | mv -f "$safeTmp"/zImport_corp_"$corpName"/*.txt "$scriptLib"/zImport_corp_"$corpName"/ 41 | mv -f "$safeTmp"/zImport_corp_"$corpName"/*.md "$scriptLib"/zImport_corp_"$corpName"/ 42 | 43 | export safeToDeleteGit="true" 44 | _stop 45 | } 46 | -------------------------------------------------------------------------------- /shortcuts/x11/clipboard/x11ClipboardImage.sh: -------------------------------------------------------------------------------- 1 | _x11_clipboard_sendText() { 2 | xclip -selection clipboard 3 | #xclip -selection primary 4 | #xclip -selection secondary 5 | } 6 | 7 | _x11_clipboard_getImage() { 8 | xclip -selection clipboard -t image/png -o - 9 | } 10 | 11 | _x11_clipboard_getImage_base64() { 12 | _x11_clipboard_getImage | base64 -w0 13 | } 14 | 15 | _x11_clipboard_getImage_HTML() { 16 | echo -e -n '' 19 | } 20 | 21 | _x11_clipboard_imageToHTML() { 22 | _x11_clipboard_getImage_HTML | _x11_clipboard_sendText 23 | } 24 | 25 | [[ "$DISPLAY" != "" ]] && alias _clipImageHTML=_x11_clipboard_imageToHTML 26 | -------------------------------------------------------------------------------- /shortcuts/x11/desktop/kde4x/kde4x.sh: -------------------------------------------------------------------------------- 1 | #KDE can lockup for many reasons, including xrandr, xsetwacom operations. Resetting the driving applications can be an effective workaround to improve reliability. 2 | _reset_KDE() { 3 | #kquitapp plasmashell ; sleep 0.5 ; pkill plasmashell ; sleep 0.1 ; pkill -KILL plasmashell ; sleep 0.1 ; plasmashell & exit 4 | 5 | #if pgrep plasmashell 6 | #then 7 | #kquitapp plasmashell ; sleep 3 ; plasmashell & 8 | if type kquitapp > /dev/null 2>&1 9 | then 10 | kquitapp plasmashell 11 | else 12 | pkill plasmashell 13 | killall plasmashell 14 | fi 15 | sleep 0.5 16 | pkill plasmashell 17 | killall plasmashell 18 | sleep 0.1 19 | pkill -KILL plasmashell 20 | killall plasmashell 21 | sleep 0.1 22 | 23 | plasmashell & 24 | #fi 25 | disown -a -h -r 26 | disown -a -r 27 | } 28 | -------------------------------------------------------------------------------- /shortcuts/x11/testx11.sh: -------------------------------------------------------------------------------- 1 | _testX11() { 2 | _wantGetDep xclip 3 | 4 | _wantGetDep xinput 5 | } 6 | -------------------------------------------------------------------------------- /shortcuts/x11/xinput.sh: -------------------------------------------------------------------------------- 1 | _report_xi() { 2 | _messagePlain_probe "$xi_devID" 3 | _messagePlain_probe "$xi_state" 4 | _messagePlain_probe "$xi_propNumber" 5 | } 6 | -------------------------------------------------------------------------------- /shortcuts/x11/xscale.sh: -------------------------------------------------------------------------------- 1 | 2 | # Suggest 'scale 1.5' as a workaround for driving large screens at 1080p@60Hz instead of 4k@60Hz due to legacy graphics ports. 3 | _xscale() { 4 | xrandr --output "$1" --scale "$2"x"$2" 5 | 6 | _reset_KDE 7 | 8 | arandr 9 | } 10 | 11 | _test_xscale() { 12 | _wantGetDep xrandr 13 | _wantGetDep arandr 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /special/machineinfo/machinevars.sh: -------------------------------------------------------------------------------- 1 | #Machine information. 2 | 3 | if [[ -e "/proc/meminfo" ]] 4 | then 5 | export hostMemoryTotal=$(cat /proc/meminfo | grep MemTotal | tr -cd '[[:digit:]]') 6 | export hostMemoryAvailable=$(cat /proc/meminfo | grep MemAvailable | tr -cd '[[:digit:]]') 7 | export hostMemoryQuantity="$hostMemoryTotal" 8 | else 9 | export hostMemoryTotal="384000" 10 | export hostMemoryAvailable="256000" 11 | export hostMemoryQuantity="$hostMemoryTotal" 12 | fi 13 | -------------------------------------------------------------------------------- /special/mustberoot.sh: -------------------------------------------------------------------------------- 1 | #Determines if user is root. If yes, then continue. If not, exits after printing error message. 2 | _mustBeRoot() { 3 | if [[ $(id -u) != 0 ]]; then 4 | echo "This must be run as root!" 5 | exit 6 | fi 7 | } 8 | alias mustBeRoot=_mustBeRoot 9 | -------------------------------------------------------------------------------- /special/mustgetsudo.sh: -------------------------------------------------------------------------------- 1 | #Determines if sudo is usable by scripts. 2 | _mustGetSudo() { 3 | # WARNING: What is otherwise considered bad practice may be accepted to reduce substantial MSW/Cygwin inconvenience . 4 | _if_cygwin && return 0 5 | 6 | local rootAvailable 7 | rootAvailable=false 8 | 9 | rootAvailable=$(sudo -n echo true) 10 | 11 | #[[ $(id -u) == 0 ]] && rootAvailable=true 12 | 13 | ! [[ "$rootAvailable" == "true" ]] && exit 1 14 | 15 | return 0 16 | } 17 | 18 | #Determines if sudo is usable by scripts. Will not exit on failure. 19 | _wantSudo() { 20 | # WARNING: What is otherwise considered bad practice may be accepted to reduce substantial MSW/Cygwin inconvenience . 21 | _if_cygwin && return 0 22 | 23 | local rootAvailable 24 | rootAvailable=false 25 | 26 | rootAvailable=$(sudo -n echo true 2> /dev/null) 27 | 28 | #[[ $(id -u) == 0 ]] && rootAvailable=true 29 | 30 | ! [[ "$rootAvailable" == "true" ]] && return 1 31 | 32 | return 0 33 | } 34 | -------------------------------------------------------------------------------- /special/uuid.sh: -------------------------------------------------------------------------------- 1 | #Returns a UUID in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2 | _getUUID() { 3 | if [[ -e /proc/sys/kernel/random/uuid ]] 4 | then 5 | cat /proc/sys/kernel/random/uuid 6 | return 0 7 | fi 8 | 9 | 10 | if type -p uuidgen > /dev/null 2>&1 11 | then 12 | uuidgen 13 | return 0 14 | fi 15 | 16 | # Failure. Intentionally adds extra characters to cause any tests of uuid output to fail. 17 | _uid 40 18 | return 1 19 | } 20 | alias getUUID=_getUUID 21 | -------------------------------------------------------------------------------- /structure/build.sh: -------------------------------------------------------------------------------- 1 | _build_nonet_default() { 2 | _installation_nonet_default 3 | 4 | return 0 5 | } 6 | 7 | _test_build_prog() { 8 | true 9 | } 10 | 11 | _test_build() { 12 | _getDep gcc 13 | _getDep g++ 14 | _getDep make 15 | 16 | #_getDep pahole 17 | 18 | #_getDep lz4 19 | #_getDep lz4c 20 | 21 | 22 | # libc6-dev 23 | _getDep 'malloc.h' 24 | _getDep 'memory.h' 25 | _getDep 'stdio.h' 26 | _getDep 'math.h' 27 | 28 | 29 | _getDep cmake 30 | 31 | _getDep autoreconf 32 | _getDep autoconf 33 | _getDep automake 34 | 35 | _getDep libtool 36 | 37 | _getDep makeinfo 38 | 39 | _getDep pkg-config 40 | 41 | _tryExec _test_buildGoSu 42 | 43 | _tryExec _test_buildIdle 44 | 45 | _tryExec _test_bashdb 46 | 47 | _tryExec _test_ethereum_build 48 | _tryExec _test_ethereum_parity_build 49 | 50 | _tryExec _test_build_prog 51 | } 52 | alias _testBuild=_test_build 53 | 54 | _buildSequence() { 55 | _start scriptLocal_mkdir_disable 56 | 57 | echo -e '\E[1;32;46m Binary compiling... \E[0m' 58 | 59 | _tryExec _buildHello 60 | 61 | _tryExec _buildIdle 62 | _tryExec _buildGosu 63 | 64 | _tryExec _build_geth 65 | _tryExec _build_ethereum_parity 66 | 67 | _tryExec _buildChRoot 68 | _tryExec _buildQEMU 69 | 70 | _tryExec _buildExtra 71 | 72 | echo " ...DONE" 73 | 74 | _stop 75 | } 76 | 77 | _build_prog() { 78 | true 79 | } 80 | 81 | _build() { 82 | _build_nonet_default 83 | 84 | "$scriptAbsoluteLocation" _buildSequence 85 | 86 | _build_prog 87 | } 88 | -------------------------------------------------------------------------------- /structure/entry.sh: -------------------------------------------------------------------------------- 1 | #####Entry 2 | 3 | # WARNING: Do not add code directly here without disabling checksum! 4 | # WARNING: Checksum may only be disabled either by override of 'generic/minimalheader.sh' or by adding appropriate '.nck' file ! 5 | 6 | #"$scriptAbsoluteLocation" _setup 7 | 8 | 9 | 10 | 11 | if [[ "$1" == '_'* ]] && type "$1" > /dev/null 2>&1 12 | then 13 | "$@" 14 | internalFunctionExitStatus="$?" 15 | return "$internalFunctionExitStatus" > /dev/null 2>&1 16 | exit "$internalFunctionExitStatus" 17 | fi 18 | if [[ "$1" != '_'* ]] 19 | then 20 | _main "$@" 21 | fi 22 | -------------------------------------------------------------------------------- /structure/overrides_disable.sh: -------------------------------------------------------------------------------- 1 | #####Overrides DISABLE 2 | 3 | # DANGER: NEVER intended to be set in an end user shell for ANY reason. 4 | # DANGER: Implemented to prevent 'compile.sh' from attempting to run functions from 'ops.sh'. No other valid use currently known or anticipated! 5 | export ub_ops_disable='true' 6 | 7 | -------------------------------------------------------------------------------- /structure/program.sh: -------------------------------------------------------------------------------- 1 | #####Program 2 | 3 | #Typically launches an application - ie. through virtualized container. 4 | _launch() { 5 | false 6 | #"$@" 7 | } 8 | 9 | #Typically gathers command/variable scripts from other (ie. yaml) file types (ie. AppImage recipes). 10 | _collect() { 11 | false 12 | } 13 | 14 | #Typical program entry point, absent any instancing support. 15 | _enter() { 16 | _launch "$@" 17 | } 18 | 19 | #Typical program entry point. 20 | _main() { 21 | _start 22 | 23 | _collect 24 | 25 | _enter "$@" 26 | 27 | _stop 28 | } 29 | -------------------------------------------------------------------------------- /structure/resetvars.sh: -------------------------------------------------------------------------------- 1 | #Reset prefixes. 2 | export tmpPrefix="" 3 | export tmpSelf="" 4 | 5 | # ATTENTION: CAUTION: Should only be used by a single unusual Cygwin override. Must be reset if used for any other purpose. 6 | #export descriptiveSelf="" 7 | -------------------------------------------------------------------------------- /virtualization/chroot/dropchroot.sh: -------------------------------------------------------------------------------- 1 | _dropChRoot() { 2 | 3 | # Change to localPWD or home. 4 | cd "$localPWD" 5 | 6 | "$scriptAbsoluteLocation" _gosuExecVirt cp -r /etc/skel/. "$virtGuestHomeDrop" > /dev/null 2>&1 7 | 8 | "$scriptAbsoluteLocation" _gosuExecVirt "$scriptAbsoluteLocation" _setupUbiquitous_nonet > /dev/null 2>&1 9 | 10 | # Drop to user ubvrtusr, using gosu. 11 | _gosuExecVirt "$@" 12 | } 13 | 14 | #No production use. Kept for reference only. 15 | ###_prepareChRootUser() { 16 | 17 | #_gosuExecVirt cp -r /etc/skel/. /home/ 18 | 19 | #cp -a /home/"$virtGuestUser".ref/. /home/"$virtGuestUser"/ 20 | #chown "$virtGuestUser":"$virtGuestUser" /home/"$virtGuestUser" 21 | 22 | ###true 23 | 24 | ###} 25 | -------------------------------------------------------------------------------- /virtualization/chroot/enterchroot.sh: -------------------------------------------------------------------------------- 1 | _chroot() { 2 | 3 | [[ ! -e "$chrootDir"/bin/bash ]] && return 1 4 | 5 | _mustGetSudo 6 | 7 | #cd "$chrootDir" 8 | 9 | local chrootExitStatus 10 | 11 | sudo -n env -i HOME="/root" TERM="${TERM}" SHELL="/bin/bash" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" DISPLAY="$DISPLAY" XSOCK="$XSOCK" XAUTH="$XAUTH" localPWD="$localPWD" hostArch=$(uname -m) virtSharedUser="$virtGuestUser" USER="root" chrootName="chrt" devfast="$devfast" nonet="$nonet" ub_dryRun="$ub_dryRun" GH_TOKEN="$GH_TOKEN" INPUT_GITHUB_TOKEN="$INPUT_GITHUB_TOKEN" TOKEN="$TOKEN" $(sudo -n bash -c "type -p chroot") "$chrootDir" "$@" 12 | 13 | 14 | # WARNING: CAUTION: May be untested. 15 | #export GH_TOKEN="$GH_TOKEN" 16 | #export INPUT_GITHUB_TOKEN="$INPUT_GITHUB_TOKEN" 17 | #export TOKEN="$TOKEN" 18 | ##env -i 19 | #sudo -n -E --preserve-env=GH_TOKEN --preserve-env=INPUT_GITHUB_TOKEN --preserve-env=TOKEN env HOME="/root" TERM="${TERM}" SHELL="/bin/bash" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" DISPLAY="$DISPLAY" XSOCK="$XSOCK" XAUTH="$XAUTH" localPWD="$localPWD" hostArch=$(uname -m) virtSharedUser="$virtGuestUser" USER="root" chrootName="chrt" devfast="$devfast" nonet="$nonet" ub_dryRun="$ub_dryRun" $(sudo -n bash -c "type -p chroot") "$chrootDir" "$@" 20 | 21 | chrootExitStatus="$?" 22 | 23 | return "$chrootExitStatus" 24 | 25 | } 26 | -------------------------------------------------------------------------------- /virtualization/chroot/testchroot.sh: -------------------------------------------------------------------------------- 1 | _testChRoot() { 2 | _mustGetSudo 3 | 4 | _testGosu || _stop 1 5 | 6 | _checkDep gosu-armel 7 | _checkDep gosu-amd64 8 | _checkDep gosu-i386 9 | 10 | _getDep id 11 | 12 | _getDep mount 13 | _getDep umount 14 | _getDep mountpoint 15 | 16 | _getDep unionfs-fuse 17 | 18 | } 19 | -------------------------------------------------------------------------------- /virtualization/docker/dockerchecks.sh: -------------------------------------------------------------------------------- 1 | _checkBaseDirRemote_docker() { 2 | #-e LOCAL_USER_ID=`id -u $USER` 3 | if ! _permitDocker docker run -it --name "$dockerContainerObjectNameInstanced"_cr --rm "$dockerImageObjectName" /bin/bash -c '[[ -e "'"$1"'" ]] && ! [[ -d "'"$1"'" ]] && [[ "'"$1"'" != "." ]] && [[ "'"$1"'" != ".." ]] && [[ "'"$1"'" != "./" ]] && [[ "'"$1"'" != "../" ]]' 4 | then 5 | return 1 6 | fi 7 | return 0 8 | } 9 | -------------------------------------------------------------------------------- /virtualization/dosbox/dosbox.sh: -------------------------------------------------------------------------------- 1 | _test_dosbox() { 2 | _getDep dosbox 3 | 4 | ! _noFireJail dosbox && _stop 1 5 | } 6 | 7 | _prepare_dosbox() { 8 | mkdir -p "$scriptLocal"/_dosbox 9 | 10 | mkdir -p "$instancedVirtDir" 11 | mkdir -p "$instancedVirtFS" 12 | mkdir -p "$instancedVirtTmp" 13 | 14 | _here_dosbox_base_conf > "$instancedVirtDir"/dosbox.conf 15 | 16 | } 17 | 18 | _dosbox_sequence() { 19 | _start 20 | 21 | _prepare_dosbox 22 | 23 | echo -e -n 'mount c ' >> "$instancedVirtDir"/dosbox.conf 24 | echo "$scriptLocal"/_dosbox >> "$instancedVirtDir"/dosbox.conf 25 | echo 'c:' >> "$instancedVirtDir"/dosbox.conf 26 | 27 | export sharedGuestProjectDir='X:' 28 | _virtUser "$@" 29 | 30 | if [[ "$sharedHostProjectDir" != "" ]] 31 | then 32 | echo -e -n 'mount x ' >> "$instancedVirtDir"/dosbox.conf 33 | echo "$sharedHostProjectDir" >> "$instancedVirtDir"/dosbox.conf 34 | echo 'x:' >> "$instancedVirtDir"/dosbox.conf 35 | fi 36 | 37 | #Alternatively, "-c" could be used with dosbox, but this seems not to work well with multiple parameters. 38 | #Note "DOS" will not like paths not conforming to 8.3 . 39 | _safeEcho_newline "${processedArgs[@]}" >> "$instancedVirtDir"/dosbox.conf 40 | 41 | dosbox -conf "$instancedVirtDir"/dosbox.conf 42 | 43 | _safeRMR "$instancedVirtDir" || _stop 1 44 | 45 | _stop 46 | } 47 | 48 | _dosbox() { 49 | "$scriptAbsoluteLocation" _dosbox_sequence "$@" 50 | } 51 | -------------------------------------------------------------------------------- /virtualization/dumbpath/dumbpath_vars.sh: -------------------------------------------------------------------------------- 1 | 2 | # ATTENTION: Set 'dumbpath_prefix' within functions, with '_prog/core.sh' , 'ops.sh' , or similar, etc. 3 | # WARNING: Any prefix will break '8.3' compatibility (usually don't care, but could affect DosBox, etc). 4 | unset dumbpath_prefix 5 | 6 | 7 | -------------------------------------------------------------------------------- /virtualization/fakehome/fakehomereset.sh: -------------------------------------------------------------------------------- 1 | _resetFakeHomeEnv_extra() { 2 | true 3 | } 4 | 5 | _resetFakeHomeEnv_nokeep() { 6 | ! [[ "$setFakeHome" == "true" ]] && return 0 7 | export setFakeHome="false" 8 | 9 | export HOME="$realHome" 10 | 11 | #export realHome="" 12 | 13 | _resetFakeHomeEnv_extra 14 | } 15 | 16 | _resetFakeHomeEnv() { 17 | #[[ "$keepFakeHome" == "true" ]] && return 0 18 | [[ "$keepFakeHome" != "false" ]] && return 0 19 | 20 | _resetFakeHomeEnv_nokeep 21 | } 22 | -------------------------------------------------------------------------------- /virtualization/fakehome/fakehomevars.sh: -------------------------------------------------------------------------------- 1 | _prepareFakeHome() { 2 | mkdir -p "$actualFakeHome" 3 | } 4 | 5 | _rm_instance_fakeHome() { 6 | ! [[ -e "$instancedFakeHome" ]] && return 0 7 | 8 | [[ -e "$instancedFakeHome" ]] && rmdir "$instancedFakeHome" > /dev/null 2>&1 9 | 10 | [[ -e "$instancedFakeHome" ]] && _unmakeFakeHome "$instancedFakeHome" > /dev/null 2>&1 11 | 12 | # DANGER Allows folders containing ".git" to be removed in all further shells inheriting this environment! 13 | export safeToDeleteGit="true" 14 | [[ -e "$instancedFakeHome" ]] && _safeRMR "$instancedFakeHome" 15 | export safeToDeleteGit="false" 16 | } 17 | -------------------------------------------------------------------------------- /virtualization/image/imagevars.sh: -------------------------------------------------------------------------------- 1 | export hostToGuestDir="$instancedVirtDir"/htg 2 | export hostToGuestFiles="$hostToGuestDir"/files 3 | export hostToGuestISO="$instancedVirtDir"/htg/htg.iso 4 | -------------------------------------------------------------------------------- /virtualization/image/userpersistenthome.sh: -------------------------------------------------------------------------------- 1 | # TODO Launch "_fromImage", transfering "/home/user" to archive, then transfering this archive to "/etc/skel" . 2 | _importHomeUser() { 3 | true 4 | } 5 | 6 | _exportHomeUser() { 7 | true 8 | } 9 | 10 | # TODO To be used by "_userChRoot", binding "/home/user", as an alternative to copying "/etc/skel" . 11 | _bindHomeUser() { 12 | true 13 | } 14 | 15 | _unbindHomeUser() { 16 | true 17 | } 18 | 19 | -------------------------------------------------------------------------------- /virtualization/libIdentification.sh: -------------------------------------------------------------------------------- 1 | # Echo highest glibc version needed by the executable files in the current directory 2 | _glibc_needed() { 3 | find . -name *.so -or -name *.so.* -or -type f -executable -exec readelf -s '{}' 2>/dev/null \; | sed -n 's/.*@GLIBC_//p'| awk '{print $1}' | sort --version-sort | tail -n 1 4 | } 5 | alias glibc_needed='_glibc_needed' 6 | -------------------------------------------------------------------------------- /virtualization/osTranslation.sh: -------------------------------------------------------------------------------- 1 | 2 | #Removes 'file://' often used by browsers. 3 | _removeFilePrefix() { 4 | local translatedFileParam 5 | translatedFileParam=${1/#file:\/\/} 6 | 7 | _safeEcho_newline "$translatedFileParam" 8 | } 9 | 10 | #Translates back slash parameters (UNIX paths) to forward slash parameters (MSW paths). 11 | _slashBackToForward() { 12 | local translatedFileParam 13 | translatedFileParam=${1//\//\\} 14 | 15 | _safeEcho_newline "$translatedFileParam" 16 | } 17 | 18 | _nixToMSW() { 19 | echo -e -n 'Z:' 20 | 21 | local localAbsoluteFirstParam 22 | localAbsoluteFirstParam=$(_getAbsoluteLocation "$1") 23 | 24 | local intermediateStepOne 25 | intermediateStepOne=_removeFilePrefix "$localAbsoluteFirstParam" 26 | 27 | _slashBackToForward "$intermediateStepOne" 28 | } 29 | -------------------------------------------------------------------------------- /virtualization/python/.gitignore: -------------------------------------------------------------------------------- 1 | scrap/ 2 | diag/ 3 | -------------------------------------------------------------------------------- /virtualization/python/override_cygwin_python.sh: -------------------------------------------------------------------------------- 1 | 2 | # STRONGLY DISCOURAGED 3 | 4 | 5 | -------------------------------------------------------------------------------- /virtualization/python/special_python.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ATTENTION: EXAMPLE. Override or implement alternative with 'core.sh', 'ops.sh', or similar. 4 | # ATTENTION: Also create "$scriptLib"/python/lean.py . 5 | _special_packages() { 6 | #export dependencies_nix_python=( "readline" ) 7 | #export packages_nix_python=( "huggingface_hub[cli]" ) 8 | 9 | #export dependencies_msw_python=( "pyreadline3" ) 10 | #export packages_msw_python=( "huggingface_hub[cli]" ) 11 | 12 | #export dependencies_cyg_python=( "readline" ) 13 | #export packages_cyg_python=( "huggingface_hub[cli]" ) 14 | 15 | true 16 | } 17 | _special_python() { 18 | _special_packages 19 | 20 | if _if_cygwin 21 | then 22 | _msw_python "$@" 23 | return 24 | fi 25 | 26 | local dumbpath_file="$scriptLocal"/"$dumbpath_prefix"dumbpath.var 27 | local dumbpath_contents="" 28 | dumbpath_contents=$(cat "$dumbpath_file" 2> /dev/null) 29 | if [[ "$dumbpath_contents" == "$dumbpath_file" ]] 30 | then 31 | #implies sequence 32 | #source "$scriptLocal"/python_nix/venv/default_venv/bin/activate 33 | source "$scriptLocal"/python_nix/venv/default_venv/bin/activate_nix 34 | #type -p huggingface-cli > /dev/null >&2 35 | #huggingface-cli "$@" 36 | true 37 | return 38 | fi 39 | 40 | _nix_python "$@" 41 | return 42 | } 43 | # ATTENTION: Call from '_test_prog' with 'core.sh' or similar. 44 | # _setup calls _test calls _test_prog 45 | _test_special_python() { 46 | _special_packages 47 | 48 | if _if_cygwin 49 | then 50 | _test_msw_python "$@" 51 | return 52 | fi 53 | 54 | _test_nix_python "$@" 55 | return 56 | } 57 | 58 | -------------------------------------------------------------------------------- /virtualization/qemu/qemu-raspi-raspi.sh: -------------------------------------------------------------------------------- 1 | 2 | #Ensures dependencies are met for raspi-on-raspi virtualization. 3 | _testQEMU_raspi-raspi() { 4 | true 5 | } 6 | -------------------------------------------------------------------------------- /virtualization/qemu/qemu-x64-raspi.sh: -------------------------------------------------------------------------------- 1 | _testQEMU_hostArch_x64-raspi() { 2 | local hostArch 3 | hostArch=$(uname -m) 4 | 5 | if [[ "$hostArch" != "x86_64" ]] 6 | then 7 | return 1 8 | fi 9 | 10 | return 0 11 | } 12 | 13 | _testQEMU_x64-raspi() { 14 | 15 | _testQEMU_x64-x64 16 | _getDep qemu-arm-static 17 | _getDep qemu-armeb-static 18 | 19 | _getDep qemu-system-arm 20 | _getDep qemu-system-aarch64 21 | 22 | 23 | _mustGetSudo 24 | 25 | ! _testQEMU_hostArch_x64-raspi && echo "warn: not checking x64 translation" && return 0 26 | 27 | #\|Raspbian 28 | if [[ -e /etc/issue ]] && cat /etc/issue | grep 'Debian\|Ubuntu' > /dev/null 2>&1 29 | then 30 | _getDep update-binfmts 31 | fi 32 | 33 | 34 | sudo -n systemctl status binfmt-support 2>&1 | head -n 2 | grep -i 'chroot' > /dev/null && return 0 35 | systemctl status binfmt-support 2>&1 | head -n 2 | grep -i 'chroot' > /dev/null && return 0 36 | 37 | sudo -n systemctl restart binfmt-support > /dev/null 2>&1 38 | 39 | sudo -n service binfmt-support --full-restart > /dev/null 2>&1 40 | service binfmt-support --full-restart > /dev/null 2>&1 41 | 42 | if ! sudo -n cat /proc/sys/fs/binfmt_misc/* 2> /dev/null | grep qemu | grep 'arm$\|arm-static$\|arm-binfmt-P$\|arm-binfmt' > /dev/null 2>&1 && ! _if_cygwin 43 | then 44 | echo 'binfmts does not mention qemu-arm' 45 | [[ "$INSTANCE_ID" == "" ]] && _stop 1 46 | fi 47 | 48 | if ! sudo -n cat /proc/sys/fs/binfmt_misc/* 2> /dev/null | grep qemu | grep 'armeb$\|armeb-static$\|armeb-binfmt-P$\|armeb-binfmt' > /dev/null 2>&1 && ! _if_cygwin 49 | then 50 | echo 'binfmts does not mention qemu-armeb' 51 | [[ "$INSTANCE_ID" == "" ]] && _stop 1 52 | fi 53 | 54 | return 0 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /virtualization/qemu/qemu-x64-x64.sh: -------------------------------------------------------------------------------- 1 | _testQEMU_hostArch_x64_hardwarevt() { 2 | #[[ -e /dev/kvm ]] && (grep -i svm /proc/cpuinfo > /dev/null 2>&1 || grep -i vmx /proc/cpuinfo > /dev/null 2>&1) 3 | 4 | ! [[ -e /dev/kvm ]] && return 1 5 | 6 | grep -i svm /proc/cpuinfo > /dev/null 2>&1 && return 0 7 | grep -i vmx /proc/cpuinfo > /dev/null 2>&1 && return 0 8 | 9 | return 1 10 | } 11 | 12 | _testQEMU_hostArch_x64_nested() { 13 | grep '1' /sys/module/kvm_amd/parameters/nested > /dev/null 2>&1 && return 0 14 | grep 'Y' /sys/module/kvm_amd/parameters/nested > /dev/null 2>&1 && return 0 15 | grep '1' /sys/module/kvm_intel/parameters/nested > /dev/null 2>&1 && return 0 16 | grep 'Y' /sys/module/kvm_intel/parameters/nested > /dev/null 2>&1 && return 0 17 | 18 | return 1 19 | } 20 | 21 | _testQEMU_hostArch_x64-x64() { 22 | local hostArch 23 | hostArch=$(uname -m) 24 | 25 | if [[ "$hostArch" != "x86_64" ]] 26 | then 27 | return 1 28 | fi 29 | 30 | return 0 31 | } 32 | 33 | _testQEMU_x64-x64() { 34 | _testQEMU_hostArch_x64-x64 || echo "warn: no native x64" 35 | _testQEMU_hostArch_x64_hardwarevt || echo "warn: no x64 vt" 36 | _testQEMU_hostArch_x64_nested || echo "warn: no nested x64" 37 | 38 | _getDep qemu-system-x86_64 39 | _getDep qemu-img 40 | 41 | _getDep smbd 42 | 43 | _wantGetDep /usr/share/OVMF/OVMF_CODE.fd 44 | _wantGetDep /usr/share/qemu/OVMF.fd 45 | } 46 | 47 | _qemu-system() { 48 | qemu-system-x86_64 "$@" 49 | } 50 | -------------------------------------------------------------------------------- /virtualization/vbox/vboxtest.sh: -------------------------------------------------------------------------------- 1 | _testVBox() { 2 | if ( [[ -e /etc/issue ]] && cat /etc/issue | grep 'Debian' > /dev/null 2>&1 ) || ( [[ -e /etc/issue ]] && cat /etc/issue | grep 'Ubuntu' > /dev/null 2>&1 ) 3 | then 4 | if ! dpkg -l | grep linux-headers-$(uname -r) > /dev/null 2>&1 5 | then 6 | sudo -n apt-get install -y linux-headers-$(uname -r) 7 | fi 8 | fi 9 | 10 | _getDep VirtualBox 11 | _getDep VBoxSDL 12 | _getDep VBoxManage 13 | _getDep VBoxHeadless 14 | 15 | #sudo -n checkDep dkms 16 | 17 | ! _noFireJail virtualbox && _stop 1 18 | 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /virtualization/virtenv.sh: -------------------------------------------------------------------------------- 1 | 2 | _start_virt_instance() { 3 | 4 | mkdir -p "$instancedVirtDir" || return 1 5 | mkdir -p "$instancedVirtFS" || return 1 6 | mkdir -p "$instancedVirtTmp" || return 1 7 | 8 | mkdir -p "$instancedVirtHome" || return 1 9 | ###mkdir -p "$instancedVirtHomeRef" || return 1 10 | 11 | mkdir -p "$sharedHostProjectDir" > /dev/null 2>&1 12 | mkdir -p "$instancedProjectDir" || return 1 13 | 14 | } 15 | 16 | _start_virt_all() { 17 | 18 | _start_virt_instance 19 | 20 | mkdir -p "$globalVirtDir" || return 1 21 | mkdir -p "$globalVirtFS" || return 1 22 | mkdir -p "$globalVirtTmp" || return 1 23 | 24 | 25 | return 0 26 | } 27 | 28 | _stop_virt_instance() { 29 | 30 | _wait_umount "$instancedProjectDir" 31 | sudo -n rmdir "$instancedProjectDir" 32 | 33 | _wait_umount "$instancedVirtHome" 34 | sudo -n rmdir "$instancedVirtHome" 35 | ###_wait_umount "$instancedVirtHomeRef" 36 | ###sudo -n rmdir "$instancedVirtHomeRef" 37 | sudo -n rmdir "$instancedVirtFS"/home 38 | 39 | _wait_umount "$instancedVirtFS" 40 | sudo -n rmdir "$instancedVirtFS" 41 | _wait_umount "$instancedVirtTmp" 42 | sudo -n rmdir "$instancedVirtTmp" 43 | _wait_umount "$instancedVirtDir" 44 | sudo -n rmdir "$instancedVirtDir" 45 | 46 | 47 | 48 | return 0 49 | 50 | } 51 | 52 | _stop_virt_all() { 53 | 54 | _stop_virt_instance || return 1 55 | 56 | _wait_umount "$globalVirtFS" || return 1 57 | _wait_umount "$globalVirtTmp" || return 1 58 | _wait_umount "$globalVirtDir" || return 1 59 | 60 | 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /virtualization/wsl2/here_wsl2.sh: -------------------------------------------------------------------------------- 1 | 2 | _here_wsl_config() { 3 | # ATTENTION: If nested virtualization configuration is necessary (ie. the apparently now default 'nestedVirtualization=true' directive is somehow not already in effect), this may be a better place for that directive (normally writing a '.wslconfig' file). 4 | #[wsl2] 5 | #nestedVirtualization=true 6 | cat << 'CZXWXcRMTo8EmM8i4d' 7 | [wsl2] 8 | memory=999GB 9 | kernelCommandLine = "sysctl.net.core.bpf_jit_harden=1" 10 | 11 | CZXWXcRMTo8EmM8i4d 12 | 13 | if [[ -e /cygdrive/c/core/infrastructure/ubdist-kernel/ubdist-kernel ]] && [[ "$1" != "ub_ignore_kernel_wsl" ]] 14 | then 15 | echo 'kernel=C:\\core\\infrastructure\\ubdist-kernel\\ubdist-kernel' 16 | fi 17 | 18 | echo 19 | } 20 | 21 | 22 | _here_wsl_conf() { 23 | # ATTENTION: Directive for nested virtualization may have moved to being more appropriate for a host '.wslconfig' file than a guest '/etc/wsl.conf' file . 24 | #[wsl2] 25 | #nestedVirtualization=true 26 | cat << 'CZXWXcRMTo8EmM8i4d' 27 | 28 | [boot] 29 | systemd = true 30 | command = /bin/bash -c 'systemctl stop sddm ; rm -f /root/_rootGrab.sh ; usermod -a -G kvm user ; chown -v root:kvm /dev/kvm ; chmod 660 /dev/kvm ; ( rm /home/user/___quick/mount.sh ; rmdir /home/user/___quick ; ( [[ ! -e /home/user/___quick ]] && ln -s /mnt/c/q /home/user/___quick ) ; rm -f /home/user/___quick/q )' 31 | 32 | [user] 33 | default = user 34 | 35 | [automount] 36 | options = "metadata" 37 | 38 | CZXWXcRMTo8EmM8i4d 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /virtualization/wsl2/wsl2.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | _write_wslconfig() { 4 | ! _if_cygwin && _messagePlain_bad 'fail: Cygwin/MSW only' && return 1 5 | if _if_cygwin 6 | then 7 | [[ -e /cygdrive/c/Windows/System32 ]] && _here_wsl_config "$1" > /cygdrive/c/Windows/System32/config/systemprofile/.wslconfig 8 | [[ -e /cygdrive/c/Windows/ServiceProfiles/LocalService ]] && _here_wsl_config "$1" > /cygdrive/c/Windows/ServiceProfiles/LocalService/.wslconfig 9 | _here_wsl_config "$1" > "$USERPROFILE"/.wslconfig 10 | return 11 | fi 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /virtualization/wsl2/wsl2_internal.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /zImage_commandPrompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/zImage_commandPrompt.png -------------------------------------------------------------------------------- /zImage_queue_experiment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/zImage_queue_experiment.jpg -------------------------------------------------------------------------------- /zImage_userQemu_window_nix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/zImage_userQemu_window_nix.png -------------------------------------------------------------------------------- /zImage_userVBox_window_MSW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirage335-colossus/ubiquitous_bash/4b7f16833c01e2523a89d3e14f89934959adee36/zImage_userVBox_window_MSW.png --------------------------------------------------------------------------------