├── .gitignore ├── .gitmodules ├── README.md ├── flathub.json ├── generate-sources ├── generated-sources.json ├── io.github.shiftey.Desktop.desktop ├── io.github.shiftey.Desktop.metainfo.xml ├── io.github.shiftey.Desktop.yaml └── node_options.patch /.gitignore: -------------------------------------------------------------------------------- 1 | /.flatpak-builder 2 | /.flatpak 3 | /build-dir 4 | /repo 5 | /desktop 6 | /node-detect-arm64-translation 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "shared-modules"] 2 | path = shared-modules 3 | url = https://github.com/flathub/shared-modules.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Flatpak manifest for GitHub Desktop app 2 | ======================================= 3 | 4 | This repository contains the files to create a Flatpak version of the [GitHub Desktop](https://desktop.github.com/) Git client. 5 | 6 | It is based on [this fork](https://github.com/shiftkey/desktop) which contains extra work for better Linux integration, that is, for now, not official. 7 | 8 | Installation 9 | ------------ 10 | 11 | To build and install this Flatpak, you have to [install Flatpak, Flatpak builder and the Flathub repo](https://flatpak.org/setup/). Don't forget to initialize this repo submodules. Then run: 12 | 13 | ```sh 14 | flatpak-builder build io.github.shiftey.Desktop.yaml --repo=repo --install --force-clean --install-deps-from=flathub 15 | ``` 16 | 17 | Once installed, launch GitHub Desktop by running: 18 | 19 | ```sh 20 | flatpak run io.github.shiftey.Desktop 21 | ``` 22 | 23 | Updating `desktop` repo and dependencies 24 | ---------------------------------------- 25 | 26 | Flatpak builder doesn't allow the build scripts to access the internet, so you have to download all the required dependencies beforehand. These dependencies are listed in the `generated-sources.json` file. That's the reason we have a fixed commit for building `desktop` repo, since that can guarantee that `generated-sources.json` dependencies match with the version of `desktop` we are building. 27 | 28 | To update `desktop` repo to its latest commit and update the dependencies, you have to: 29 | 30 | 1. Clone [https://github.com/shiftkey/desktop](https://github.com/shiftkey/desktop) inside this repo. 31 | 2. Change the commit in `io.github.shiftey.Desktop.yaml` to the desired one: 32 | 33 | ```yaml 34 | ... 35 | - type: git 36 | url: https://github.com/shiftkey/desktop.git 37 | commit: 38 | ... 39 | ``` 40 | 41 | 3. Run `generate-sources` script to update `generated-sources.json`. 42 | 43 | 4. Make sure the patches in the `patches` directory still apply. 44 | 45 | 5. Once you are sure it works, make a PR with the changes. 46 | 47 | Known Issues 48 | ------------ 49 | 50 | - `Show in your File Manager` does not open the file manager 51 | 52 | This happens because the default manager is not set in your environment. You need to add a default file manager to your `~/.config/mimeapps.list` file. If you are using nautilus, this can be done by adding `inode/directory=org.gnome.Nautilus.desktop` to the end of the `[Default Applications]` section. 53 | 54 | - Git Hooks that spawn external programs do not work. This is non-fixable without a massive rewrite inside git to make it possible to spawn git hooks outside the flatpak container. 55 | -------------------------------------------------------------------------------- /flathub.json: -------------------------------------------------------------------------------- 1 | { 2 | "disable-external-data-checker": true 3 | } 4 | -------------------------------------------------------------------------------- /generate-sources: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import json 4 | import os 5 | import subprocess 6 | import requests 7 | 8 | 9 | if __name__ == "__main__": 10 | root = os.path.dirname(__file__) 11 | generated_sources_path = f"{root}/generated-sources.json" 12 | subprocess.call( 13 | [ 14 | "flatpak-node-generator", 15 | "yarn", 16 | "--electron-node-headers", 17 | "--node-chromedriver-from-electron", 18 | "9.3.1", 19 | "-r", 20 | f"{root}/desktop/yarn.lock", 21 | "-R", 22 | "yarn.lock", 23 | "-R", 24 | "app/yarn.lock", 25 | ], 26 | cwd=root, 27 | ) 28 | 29 | with open(generated_sources_path, "r") as fp: 30 | generated_sources = json.load(fp) 31 | 32 | # Move electron-cache files to match what @electron/get expects 33 | # https://github.com/electron/get/blob/master/src/Cache.ts 34 | for source in generated_sources: 35 | if source.get("dest"): 36 | if source["dest"] == "flatpak-node/electron-cache": 37 | cache_dir = ( 38 | source["url"] 39 | .split("?")[0] 40 | .split("#")[0] 41 | .translate(str.maketrans("", "", '<>:"/\\|?*'))[:255] 42 | ) 43 | source["dest"] = f"flatpak-node/electron-cache/{cache_dir}" 44 | del source["dest-filename"] 45 | if source.get("type")=="git" and source.get("url") == "https://github.com/sergiou87/prebuild": 46 | req = requests.get("https://api.github.com/repos/sergiou87/prebuild/commits/master") 47 | jsn = req.json() 48 | source["commit"] = jsn["sha"] 49 | 50 | with open(generated_sources_path, "w") as fp: 51 | json.dump(generated_sources, fp, indent=4) 52 | -------------------------------------------------------------------------------- /io.github.shiftey.Desktop.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=GitHub Desktop 3 | Exec=start-github-desktop %U 4 | Terminal=false 5 | Type=Application 6 | Icon=io.github.shiftey.Desktop 7 | StartupWMClass=GitHub Desktop 8 | Comment=Simple collaboration from your desktop 9 | MimeType=x-scheme-handler/x-github-client;x-scheme-handler/x-github-desktop-auth;x-scheme-handler/x-github-desktop-dev-auth; 10 | Categories=Development; 11 | -------------------------------------------------------------------------------- /io.github.shiftey.Desktop.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | io.github.shiftey.Desktop 4 | GitHub Desktop 5 | Simple collaboration from your desktop 6 | CC0-1.0 7 | MIT 8 | 9 | shiftkey 10 | 11 | 12 |

13 | Focus on what matters instead of fighting with Git. Whether you're new to Git or a seasoned 14 | user, GitHub Desktop simplifies your development workflow. 15 |

16 |

17 | Attribute commits with collaborators easily. Quickly add co-authors to your commit. Great for 18 | pairing and excellent for sending a little love/credit to that special someone who helped fix 19 | that gnarly bug of yours. See the attribution on the history page, undo an accidental 20 | attribution, and see the co-authors on github.com 21 |

22 |

23 | Checkout branches with pull requests and view CI statuses. See all open pull requests for your 24 | repositories and check them out as if they were a local branch, even if they're from upstream 25 | branches or forks. See which pull requests pass commit status checks, too!] 26 |

27 |

28 | Syntax highlighted diffs. The new GitHub Desktop supports syntax highlighting when viewing 29 | diffs for a variety of different languages. 30 |

31 |

32 | Expanded image diff support. Easily compare changed images. See the before and after, swipe or 33 | fade between the two, or look at just the changed parts. 34 |

35 |

36 | Extensive editor & shell integrations. Open your favorite editor or shell from the app, or 37 | jump back to GitHub Desktop from your shell. GitHub Desktop is your springboard for work. 38 |

39 |

40 | Community supported. GitHub Desktop is open source now! Check out our roadmap, contribute, and 41 | help us make collaboration even easier. 42 |

43 |

44 | This version of GitHub Desktop is a fork that adds support for Linux. 45 |

46 |
47 | https://github.com/shiftkey/desktop#readme 48 | io.github.shiftey.Desktop.desktop 49 | 50 | 51 | 52 | https://cloud.githubusercontent.com/assets/359239/26094502/a1f56d02-3a5d-11e7-8799-23c7ba5e5106.png 53 | 54 | 55 | 56 | 57 | 58 | 59 |

Fixed

60 |
    61 |
  • Mitigates several vulnerabilities related to Git's credential helper protocol - 62 | CVE-2025-23040, CVE-2024-50349, CVE-2024-52006, CVE-2024-50338, CVE-2024-53263
  • 63 |
64 |
65 |
66 | 67 | 68 |

Fixed

69 |
    70 |
  • Merge branch dialog updates whether a branch can be merged when changing selection
  • 71 |
72 |
73 |
74 | 75 | 76 |

Fixed

77 |
    78 |
  • Prevent crash due to excessively long Git output
  • 79 |
80 |
81 |
82 | 83 | 84 |

Added

85 |
    86 |
  • Add a banner for communicating when prioritized updates exist
  • 87 |
  • Add "View Pull Request on GitHub" Option to the Checked-Out Branch Button and Pull 88 | Requests List
  • 89 |
90 |

Fixed

91 |
    92 |
  • Accurately calculate number of conflicted files in a merge
  • 93 |
  • Inform user when a 94 | staged renamed file has changes
  • 95 |
  • The visual label for the remote url in the 96 | repository settings is announced by screen 97 | readers
  • 98 |
  • Remove duplicate avatar users
  • 99 |
  • Fix for indents of clear button in text box
  • 100 |
  • Screen readers announce the position of the list items in selectable lists such as the 101 | history commit list
  • 102 |
  • Limitthe commit message length we accept
  • 103 |
  • Prevent repository not found message for large git status operations
  • 104 |
  • Add aria-labelledby and aria-describedby attributes to "Show whitespace changes?" 105 | popover
  • 106 |
  • Fix logical tab order from co-authors text box
  • 107 |
  • Allow using Escape to dismiss the commit message warning popover - desktop#19514
  • 108 |
109 |

Improved

110 |
    111 |
  • Improved appearance of the list of files in 'File size limit exceeded' dialog
  • 112 |
  • Resize events of resizable elements are announced by screen readers
  • 113 |
  • Update the names of some JetBrains editors on Linux
  • 114 |
  • Swipe image diffs now handle images with transparency better
  • 115 |
  • Commit messages now show correct indentation
  • 116 |
117 |
118 |
119 | 120 | 121 |

Note: this release required upgrading some very old NPM packages related to keychain 122 | access 123 | and elevated filesystem access to properly build on ARM architectures, but hopefully there 124 | are no functional changes to the application.

125 |

Fixed

126 |
    127 |
  • App no longer crash for first time users going through the welcome flow and attempting 128 | to sign in more than once
  • 129 |
  • Files configured to use the binary merge driver are now treated as binary files when 130 | resolving conflicts
  • 131 |
  • Fix UI glitch rendering tooltips
  • 132 |
133 |

Improved

134 |
    135 |
  • Replace hint text of toggle Co-Authors button with a regular tooltip
  • 136 |
  • Use OS emojis
  • 137 |
  • Insert unicode emoji
  • 138 |
  • Allow resizing Branch and Push/Pull toolbar buttons
  • 139 |
  • The commit lists in the "Commit Reachability" dialogs are traversable in browse mode 140 | of 141 | screen readers
  • 142 |
143 |

Removed

144 |
    145 |
  • Remove ruleset bypass confirmation modal
  • 146 |
147 |
148 |
149 | 150 | 151 |

Fixed

152 |
    153 |
  • App no longer crash for first time users going through the welcome flow and attempting 154 | to sign in more than once
  • 155 |
156 |
157 |
158 | 159 | 160 |

Improved

161 |
    162 |
  • Support entering GitHub.com as a GitHub Enterprise endpoint
  • 163 |
164 |
165 |
166 | 167 | 168 |

Fixed

169 |
    170 |
  • Don't show certificate error dialog when probing for endpoint kind
  • 171 |
  • Colorize multi-line strings in toml
  • 172 |
  • Unset GIT_SEQUENCE_EDITOR when rebasing
  • 173 |
  • Use api. subdomain for requests to GHE.com hosts
  • 174 |
  • Migrate existing GHE account endpoints to the new api. subdomain
  • 175 |
  • Right-clicking on diff checkmarks displays the context menu
  • 176 |
  • Arguments with spaces are passed correctly to custom editors or shells on Windows
  • 177 |
178 |

Removed

179 |
    180 |
  • Remove staggered updates block in about dialog
  • 181 |
182 |
183 |
184 | 185 | 186 | 187 | 188 | 189 |

Update electron dependency to latest v28 release

190 |
191 |
192 | 193 | 194 | 195 | 196 | 197 |

Improved

198 |
    199 |
  • Upgrade Electron to v26.6.1
  • 200 |
201 |
202 |
203 | 204 | 205 |

Added

206 |
    207 |
  • Syntax highlighting now supports .cc files
  • 208 |
209 |

Fixed

210 |
    211 |
  • Long file paths are correctly truncated in the conflicts dialog
  • 212 |
213 |
214 |
215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 |

Fixes and improvements

229 |
    230 |
  • App correctly remembers undo commit prompt setting
  • 231 |
232 |
233 |
234 | 235 | 236 | 237 | 238 | 239 | 240 |

Fixes and improvements

241 |
    242 |
  • Updated electron from 17.4.0 to 17.4.5
  • 243 |
244 |
245 |
246 |
247 |
-------------------------------------------------------------------------------- /io.github.shiftey.Desktop.yaml: -------------------------------------------------------------------------------- 1 | app-id: io.github.shiftey.Desktop 2 | base: org.electronjs.Electron2.BaseApp 3 | base-version: "24.08" 4 | runtime: org.freedesktop.Platform 5 | runtime-version: "24.08" 6 | sdk: org.freedesktop.Sdk 7 | sdk-extensions: 8 | - org.freedesktop.Sdk.Extension.node20 9 | command: start-github-desktop 10 | separate-locales: false 11 | rename-icon: io.github.shiftey.Desktop 12 | finish-args: 13 | - --share=ipc 14 | - --socket=fallback-x11 15 | - --socket=wayland 16 | - --socket=ssh-auth 17 | - --socket=gpg-agent 18 | - --share=network 19 | - --device=all 20 | - --filesystem=host 21 | - --filesystem=/opt/:ro 22 | - --filesystem=/var/lib/flatpak/app:ro 23 | - --filesystem=xdg-run/keyring 24 | - --talk-name=org.freedesktop.Flatpak 25 | - --talk-name=org.freedesktop.secrets 26 | - --talk-name=org.freedesktop.Notifications 27 | - --talk-name=org.gtk.vfs.* 28 | - --talk-name=com.canonical.AppMenu.Registrar 29 | - --env=FLATPAK_HOST=1 30 | - --env=ELECTRON_TRASH=gio 31 | - --env=ELECTRON_OZONE_PLATFORM_HINT=auto 32 | modules: 33 | - shared-modules/libsecret/libsecret.json 34 | - name: gpg 35 | config-opts: 36 | - --disable-doc 37 | - --enable-gpg-is-gpg2 38 | - --disable-tests 39 | sources: 40 | # latest long term support release 41 | - type: archive 42 | url: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.7.tar.bz2 43 | sha256: 7b24706e4da7e0e3b06ca068231027401f238102c41c909631349dcc3b85eb46 44 | - name: node-gyp 45 | buildsystem: simple 46 | build-commands: 47 | - install -Dm755 node-gyp /app/bin 48 | cleanup: 49 | - "*" 50 | sources: 51 | - type: script 52 | dest-filename: node-gyp 53 | commands: 54 | - node /usr/lib/sdk/node20/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js 55 | $@ 56 | - name: github-desktop 57 | buildsystem: simple 58 | build-options: 59 | # Add the node bin directory & yarn directory. 60 | append-path: /app/bin:/usr/lib/sdk/node20/bin:/run/build/github-desktop/flatpak-node/chromedriver:/usr/lib/sdk/node20/lib/node_modules/npm/node_modules/node-gyp/bin 61 | env: 62 | # Sets the directory where Node is located so way npm won't download the headers. 63 | npm_config_nodedir: /usr/lib/sdk/node20 64 | # Set the Electron cache directory. 65 | ELECTRON_CACHE: /run/build/github-desktop/flatpak-node/electron-cache 66 | # Skip Electron related downloads 67 | ELECTRON_SKIP_BINARY_DOWNLOAD: "1" 68 | OFFLINE: "1" 69 | CHROMEDRIVER_SKIP_DOWNLOAD: "true" 70 | # Use predownloaded dugite-native 71 | TMPDIR: /run/build/github-desktop/flatpak-node/tmp 72 | XDG_CACHE_HOME: /run/build/github-desktop/flatpak-node/cache 73 | build-commands: 74 | - HOME=$PWD node ./vendor/yarn-1.21.1.js config --offline set yarn-offline-mirror 75 | $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror 76 | - ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp 77 | - node ./vendor/yarn-1.21.1.js --offline --verbose 78 | # Run electron-builder, passing the architecture arguments to it. 79 | - . flatpak-node/electron-builder-arch-args.sh; node ./vendor/yarn-1.21.1.js 80 | run --offline build:prod $ELECTRON_BUILDER_ARCH_ARGS 81 | # Copy the resulting, unpacked directory to /app. 82 | # (A glob is used because the directory name may contain the current arch.) 83 | - cp -r dist/github-desktop-linux-* /app/github-desktop 84 | # Install the wrapper script to start it. 85 | - install -Dm755 start-github-desktop.sh /app/bin/start-github-desktop 86 | post-install: 87 | - install -D io.github.shiftey.Desktop.desktop -t /app/share/applications/ 88 | - install -D io.github.shiftey.Desktop.metainfo.xml -t /app/share/metainfo/ 89 | - install -Dm644 app/static/linux/logos/32x32.png /app/share/icons/hicolor/32x32/apps/$FLATPAK_ID.png 90 | - install -Dm644 app/static/linux/logos/64x64.png /app/share/icons/hicolor/64x64/apps/$FLATPAK_ID.png 91 | - install -Dm644 app/static/linux/logos/128x128.png /app/share/icons/hicolor/128x128/apps/$FLATPAK_ID.png 92 | - install -Dm644 app/static/linux/logos/256x256.png /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png 93 | - install -Dm644 app/static/linux/logos/512x512.png /app/share/icons/hicolor/512x512/apps/$FLATPAK_ID.png 94 | sources: 95 | - type: git 96 | url: https://github.com/shiftkey/desktop.git 97 | tag: release-3.4.13-linux1 98 | commit: 2b2484a3d4b439b36e43c207013252e1ac859bb0 99 | x-checker-data: 100 | type: git 101 | tag-pattern: release-(\d+\.\d+\.\d+-linux\d+) 102 | - type: patch 103 | path: node_options.patch 104 | - generated-sources.json 105 | - type: file 106 | path: io.github.shiftey.Desktop.desktop 107 | - type: file 108 | path: io.github.shiftey.Desktop.metainfo.xml 109 | - type: script 110 | dest-filename: start-github-desktop.sh 111 | commands: 112 | - export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID 113 | - exec zypak-wrapper /app/github-desktop/github-desktop "$@" 114 | -------------------------------------------------------------------------------- /node_options.patch: -------------------------------------------------------------------------------- 1 | diff --git a/package.json b/package.json 2 | index 6be1cb1d4..97c8a0d7e 100644 3 | --- a/package.json 4 | +++ b/package.json 5 | @@ -17,9 +17,9 @@ 6 | "start": "cross-env NODE_ENV=development ts-node -P script/tsconfig.json script/start.ts", 7 | "start:prod": "cross-env NODE_ENV=production ts-node -P script/tsconfig.json script/start.ts", 8 | "compile:dev": "cross-env NODE_ENV=development TS_NODE_PROJECT=script/tsconfig.json parallel-webpack --config app/webpack.development.ts", 9 | - "compile:prod": "cross-env NODE_ENV=production TS_NODE_PROJECT=script/tsconfig.json NODE_OPTIONS='--max_old_space_size=4096' parallel-webpack --config app/webpack.production.ts", 10 | + "compile:prod": "cross-env NODE_ENV=production TS_NODE_PROJECT=script/tsconfig.json NODE_OPTIONS='--max_old_space_size=4096 --openssl-legacy-provider' parallel-webpack --config app/webpack.production.ts", 11 | "build:dev": "yarn compile:dev && cross-env NODE_ENV=development ts-node -P script/tsconfig.json script/build.ts", 12 | - "build:prod": "yarn compile:prod && cross-env NODE_ENV=production ts-node -P script/tsconfig.json script/build.ts", 13 | + "build:prod": "yarn compile:prod && cross-env NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production ts-node -P script/tsconfig.json script/build.ts", 14 | "package": "ts-node -P script/tsconfig.json script/package.ts", 15 | "generate-octicons": "ts-node -P script/tsconfig.json script/generate-octicons.ts", 16 | "compile:script": "tsc -P script/tsconfig.json", 17 | --------------------------------------------------------------------------------