{"id":15007364,"url":"https://github.com/richard-austin/update-browser-desktop-files","last_synced_at":"2026-02-13T21:35:12.408Z","repository":{"id":216673473,"uuid":"741622013","full_name":"richard-austin/update-browser-desktop-files","owner":"richard-austin","description":"Bash script to restore browser command line parameters after software updates","archived":false,"fork":false,"pushed_at":"2026-01-11T19:01:23.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T22:19:06.167Z","etag":null,"topics":["bash","browser","linux","linux-desktop"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richard-austin.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":"2024-01-10T19:14:28.000Z","updated_at":"2026-01-11T19:01:27.000Z","dependencies_parsed_at":"2024-01-11T23:07:42.028Z","dependency_job_id":"d9b48550-29f1-4c7a-8cd6-2960de429439","html_url":"https://github.com/richard-austin/update-browser-desktop-files","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"53e87810331537ae5ca0befdf19b9a3d3aec6d22"},"previous_names":["richard-austin/update-browser-desktop-files"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/richard-austin/update-browser-desktop-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richard-austin%2Fupdate-browser-desktop-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richard-austin%2Fupdate-browser-desktop-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richard-austin%2Fupdate-browser-desktop-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richard-austin%2Fupdate-browser-desktop-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richard-austin","download_url":"https://codeload.github.com/richard-austin/update-browser-desktop-files/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richard-austin%2Fupdate-browser-desktop-files/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29418594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["bash","browser","linux","linux-desktop"],"created_at":"2024-09-24T19:09:10.076Z","updated_at":"2026-02-13T21:35:12.379Z","avatar_url":"https://github.com/richard-austin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update-browser-desktop-files\n#### Simple script to restore browser command line parameters after software update\nI use Ubuntu 24.04 with VAAPI for hardware video decoding on my browsers. To enable hardware decoding in Google Chrome and Microsoft Edge \non Linux, you need to add command line parameters (\"--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL).\nFor Chromium and Brave, it's --enable-features=AcceleratedVideoDecodeLinuxGL.\nTo make these permanent, you can put them at the end of lines starting with \"Exec\" in their .desktop files \n\nThis is straightforward enough, but the problem is, whenever there is a software update to any of these browsers, its \n.desktop file is overwritten so you have to do it again. You can put the updated desktop files at ~/.local/share/applications\nwhere they override the originals and are not overwritten, but every now and again an update changes the path to the browser icon\nso the browser button disappears!\nAfter getting fed up with this, I decided to write this script.\n\nRun it and it will ensure that any Exec lines in the listed desktop files that don't end in the required \nparameters will have them appended, Any that still do have them will be left alone. The updated file will be copied to \n~/.local/share/applications where it will override the originally installed .desktop file. As it will be unaffected by \nsubsequent updates, the VAAPI parameters will survive them, but sometimes icon paths etc are changed in updates, which \nwould require this script to be re-run to take account of that.\n\n## Setting up the script\nThe desktopFiles arrays should have corresponding command line parameters which are applied to all desktop files\nlisted in that array. The arrays should contain the full paths of all the browser desktop files you want to be able to keep the\ncorresponding command line parameters on. Mine are :-\n\nFor Browsers based on Chromium \u003e= version 131 \n```bash\ndeclare -a desktopFiles=(\"/var/lib/snapd/desktop/applications/brave_brave.desktop\"\n                         \"/var/lib/snapd/desktop/applications/chromium_chromium.desktop\"\n                         \"/usr/share/applications/microsoft-edge.desktop\"\n                         \"/usr/share/applications/google-chrome.desktop\"\n                         \"/usr/share/applications/vivaldi-stable.desktop\")\n\nparams=\"--enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoEncoder\"\n```\nFor browsers based on Chromium \u003c version 131\n```bash\ndeclare -a desktopFiles2=()  # None now, all browsers upgraded to version 131\n\nparams2=\"--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL\"\n```\nThe params variables are set to the parameters you want to ensure are appended to the Exec lines in the files listed \nin the corresponding array. The processDeskTopFiles function is called with the required Exec line parameters as the first argument\nand the desktop files path array as the second, as below :-\n\n```bash\nprocessDeskTopFiles $params \"${desktopFiles[@]}\"\nprocessDeskTopFiles $params2 \"${desktopFiles2[@]}\"\n```\n\n## Running the script\nRun the script using your user account :-\n```bash\n./update-desktop-files.sh\n```\n\nThat's it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichard-austin%2Fupdate-browser-desktop-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichard-austin%2Fupdate-browser-desktop-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichard-austin%2Fupdate-browser-desktop-files/lists"}