-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snap: fix for native-messaging-host permissions (#6062)
* snap: fix for native-messaging-host permissions add hook for chrome/chromium * snap: fix no newline * Add snap browser integration to changelog
- Loading branch information
1 parent
8111707
commit 21c6e5e
Showing
8 changed files
with
60 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then | ||
echo "Missing directory, create it manually then try again:" | ||
echo "sudo mkdir -p /etc/chromium/native-messaging-hosts" | ||
exit 1 | ||
fi | ||
|
||
cp "$SNAP/lib/native-messaging-host/chromium/org.jabref.jabref.json" /etc/chromium/native-messaging-hosts/org.jabref.jabref.json |
9 changes: 9 additions & 0 deletions
9
snap/hooks/connect-plug-etc-opt-chrome-native-messaging-jabref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then | ||
echo "Missing directory, create it manually then try again:" | ||
echo "sudo mkdir -p /etc/opt/chrome/native-messaging-hosts" | ||
exit 1 | ||
fi | ||
|
||
cp "$SNAP/lib/native-messaging-host/chromium/org.jabref.jabref.json" /etc/opt/chrome/native-messaging-hosts/org.jabref.jabref.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
snap/hooks/disconnect-plug-etc-chromium-native-messaging-jabref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -f /etc/chromium/native-messaging-hosts/org.jabref.jabref.json ]; then | ||
exit 0 | ||
elif grep --quiet '"path": "/snap' /etc/chromium/native-messaging-hosts/org.jabref.jabref.json; then | ||
rm /etc/chromium/native-messaging-hosts/org.jabref.jabref.json | ||
fi |
7 changes: 7 additions & 0 deletions
7
snap/hooks/disconnect-plug-etc-opt-chrome-native-messaging-jabref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -f /etc/opt/chrome/native-messaging-hosts/org.jabref.jabref.json ]; then | ||
exit 0 | ||
elif grep --quiet '"path": "/snap' /etc/opt/chrome/native-messaging-hosts/org.jabref.jabref.json; then | ||
rm /etc/opt/chrome/native-messaging-hosts/org.jabref.jabref.json | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters