{"id":21689107,"url":"https://github.com/tinram/linux-scripts","last_synced_at":"2026-04-05T21:36:22.127Z","repository":{"id":83639922,"uuid":"138045116","full_name":"Tinram/Linux-Scripts","owner":"Tinram","description":"Desktop icon restore, ELF overview, OOM protect.","archived":false,"fork":false,"pushed_at":"2019-10-10T22:12:52.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T12:48:21.350Z","etag":null,"topics":["desktop-icons","elf","elf-parser","icon","oom"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tinram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-20T14:36:25.000Z","updated_at":"2023-11-14T07:46:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb75762e-b2d1-44de-8885-3959c1adf9fa","html_url":"https://github.com/Tinram/Linux-Scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tinram/Linux-Scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FLinux-Scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FLinux-Scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FLinux-Scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FLinux-Scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinram","download_url":"https://codeload.github.com/Tinram/Linux-Scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FLinux-Scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31451445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["desktop-icons","elf","elf-parser","icon","oom"],"created_at":"2024-11-25T17:21:15.233Z","updated_at":"2026-04-05T21:36:21.007Z","avatar_url":"https://github.com/Tinram.png","language":"Shell","readme":"\r\n# Linux Scripts\r\n\r\n#### Linux utility scripts.\r\n\r\n\r\n---\r\n\r\n\r\n## *elf_overview.sh*\r\n\r\n### Purpose\r\n\r\nOutput a simple overview of an ELF executable through the calling `file`, `readelf`, `hd`, `size`, `objdump`, `ldd`, and `strings`. This is easier to run than remember the command-line switches, while some tools (`objdump` and `readelf`) can produce subtly similar outputs.\r\n\r\nAnother use of *elf_overview.sh* is to verify that files such as PDFs are authentic and not masquerading as executables.\r\n\r\n\r\n### Usage\r\n\r\n```bash\r\n    ./elf_overview.sh \u003cfile\u003e | less\r\n```\r\n\r\n\r\n---\r\n\r\n\r\n## *OOM_protect.sh*\r\n\r\n### Purpose\r\n\r\nProtect a critical application from being killed first by the Linux kernel's OOM Killer.\r\n\r\n\r\n### Description\r\n\r\n1. The critical app on a limited-budget web server might be MySQL.\r\n2. A runaway PHP script, operating through an Apache process, triggers the OOM.\r\n3. But MySQL \u0026ndash; using the most memory \u0026ndash; is ungracefully killed first, before Apache. The untimely death of MySQL creates database and sales problems.\r\n\r\n*OOM_protect.sh* aims to stop the above happening.\r\n\r\n(So might the database and web server residing on separate servers.)\r\n\r\n\r\n### Usage\r\n\r\n1. `chmod 700 OOM_protect.sh`\r\n\r\n2. set `APP` variable path in the script's *CONFIG* section.\r\n\r\n3. `sudo ./OOM_protect.sh`\r\n\r\n\r\n---\r\n\r\n\r\n## *icon_save*\r\n\r\n### Purpose\r\n\r\nGnome / Nemo desktop icon position restore.\r\n\r\n\r\n### Description\r\n\r\nA Python script to generate a bash script recording desktop icon positions. When desktop icon positions are lost, such as through connecting/disconnecting a second monitor or enacting 'Sort Desktop items by Name', executing the bash script restores the icon positions.\r\n\r\n\r\n### Usage\r\n\r\nPlace script in ~/Desktop folder.\r\n\r\n#### Create bash script\r\n\r\n```bash\r\n    python3 icon_save\r\n```\r\n\r\nor\r\n\r\n```bash\r\n    ./icon_save\r\n```\r\n\r\n#### Restore icons from bash script\r\n\r\n+ ensure Desktop 'Auto-arrange' is off\r\n\r\n```bash\r\n    ./icon_restore\r\n```\r\n\r\n+ show Desktop\r\n+ press \u003ckbd\u003eF5\u003c/kbd\u003e\r\n\r\n---\r\n\r\n\r\n## License\r\n\r\nScripts are released under the [GPL v.3](https://www.gnu.org/licenses/gpl-3.0.html).\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinram%2Flinux-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinram%2Flinux-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinram%2Flinux-scripts/lists"}