-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support protocol deep linking on Linux #627
Labels
Comments
Merged
Well, the following worked for me: diff --git a/resources/linux/create_desktop_file.sh b/resources/linux/create_desktop_file.sh
index 2c1cd3b..aa1159e 100755
--- a/resources/linux/create_desktop_file.sh
+++ b/resources/linux/create_desktop_file.sh
@@ -14,5 +14,6 @@ Terminal=false
Type=Application
Icon=${FULL_PATH}/icon.svg
Categories=Network;InstantMessaging;
+MimeType=x-scheme-handler/mattermost;
EOS
chmod +x Mattermost.desktop
diff --git a/src/main.js b/src/main.js
index eca0ec9..6b1b57c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -180,7 +180,7 @@ const trayImages = (() => {
if (app.makeSingleInstance((commandLine/*, workingDirectory*/) => {
// Protocol handler for win32
// argv: An array of the second instance’s (command line / deep linked) arguments
- if (process.platform === 'win32') {
+ if (process.platform === 'win32' || process.platform === 'linux') {
// Keep only command line / deep linked arguments
if (Array.isArray(commandLine.slice(1)) && commandLine.slice(1).length > 0) {
setDeeplinkingUrl(commandLine.slice(1)[0]);
@@ -423,7 +423,7 @@ app.on('ready', () => {
}
// Protocol handler for win32
- if (process.platform === 'win32') {
+ if (process.platform === 'win32' || process.platform === 'linux') {
// Keep only command line / deep linked argument. Make sure it's not squirrel command
const tmpArgs = process.argv.slice(1);
if ( |
Jira ticket for tracking: https://mattermost.atlassian.net/browse/MM-14092. |
Hey @dunkla, Would you be open to providing a PR with this changes? Would appreciate this. |
amyblais
changed the title
Linux: Support protocol deep linking
[Help Wanted] Linux: Support protocol deep linking
Feb 27, 2019
hanzei
changed the title
[Help Wanted] Linux: Support protocol deep linking
Support protocol deep linking on Linux
Oct 22, 2019
devinbinnie
added
Up For Grabs
Difficulty/1:Easy
Easy ticket
Type/Enhancement
and removed
Hacktoberfest
null
labels
Dec 9, 2021
This works now :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Support protocol deep linking on Linux by adding
MimeType
entry intoMattermost.desktop
file. http://archive.is/8C3zbWe'll need to confirm whether
electron-builder
adds it for .deb packages as well.Note: This PR added support for Windows and Mac: #616
The text was updated successfully, but these errors were encountered: