mirror of
https://github.com/keylase/nvidia-patch.git
synced 2025-08-13 18:16:51 -07:00
Merge pull request #693 from neromaverick/fix/flatpack-user-context
Fixed flatpak driver installed in user context not found
This commit is contained in:
commit
b6c4321983
2 changed files with 8 additions and 0 deletions
|
@ -312,8 +312,12 @@ check_version_supported () {
|
|||
get_flatpak_driver_path () {
|
||||
# Flatpak's package versioning replaces '.' by '-'
|
||||
version="$(echo "$1" | tr '.' '-')"
|
||||
# Attempts to patch system flatpak
|
||||
if path=$(flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-${version}" 2>/dev/null); then
|
||||
echo "$path/files/lib"
|
||||
# If it isn't found will login as the user that envoked sudo & patch this version
|
||||
elif path=$(su -c - ${SUDO_USER} 'flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-'${version}'"'); then
|
||||
echo "$path/files/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
4
patch.sh
4
patch.sh
|
@ -388,8 +388,12 @@ check_version_supported () {
|
|||
get_flatpak_driver_path () {
|
||||
# Flatpak's package versioning replaces '.' by '-'
|
||||
version="$(echo "$1" | tr '.' '-')"
|
||||
# Attempts to patch system flatpak
|
||||
if path=$(flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-${version}" 2>/dev/null); then
|
||||
echo "$path/files/lib"
|
||||
# If it isn't found will login as the user that envoked sudo & patch this version
|
||||
elif path=$(su -c - ${SUDO_USER} 'flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-'${version}'"'); then
|
||||
echo "$path/files/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue