Vorneweg: ich habe gar kein Microsoft Surface Tablet.
Man beachte auch:
Hinweis!
Zusätzliche Fremdquellen können das System gefährden.
Das Für und Wider muss selbst abgewägt werden. Ohne Microsoft Surface Tablet ist das einfach, man braucht es nicht.
Für diejenigen, die aber ein Microsoft Tablet haben, und gerne Linux darauf nutzen möchten, dort gibt es ein Projekt auf Github, um Microsoft Surface Tablets für Linux (hoffentlich) nutzbar zu machen:
Falls alte Einträge wie:
/etc/apt/sources.list.d/linux-surface.list
... noch vorhanden sein sollten, dann diese löschen:
sudo rm -iv /etc/apt/sources.list.d/*linux-surface.list*
Abfrage muss mit "y" beantwortet werden, um die Löschung dann auch durchzuführen.
Nun den microsoft-surface-apt-repository-install-helper.sh erstellen.
nano microsoft-surface-apt-repository-install-helper.sh
Im sich öffnenden Nano Editor dann per Copy & Paste folgenden Inhalt einfügen:
#!/usr/bin/env bash
#-----------------------------------------------------------
# Ubuntu 24.04, 25.04 and 25.04 DEB822 little helper script
# Microsoft Surface repository
#-----------------------------------------------------------
RELEASE_VERSION=$(lsb_release -cs 2>/dev/null)
DISTRIBUTION=$(lsb_release -id | awk '/Distributor/{ print $NF }')
printf "\n \033[45m\033[1;36m==> Running on $DISTRIBUTION $RELEASE_VERSION \033[0m\033[42m\033[1;36m ==> ... \033[0m \n \n" && \
[ $DISTRIBUTION = Ubuntu ] && \
[ $RELEASE_VERSION = noble ] || \
[ $RELEASE_VERSION = plucky ] || \
[ $RELEASE_VERSION = questing ] && \
echo "$RELEASE_VERSION good". || \
printf "\n \033[41m\033[1;36m==> Sorry, not for $DISTRIBUTION $RELEASE_VERSION.\033[0m \n \n" && \
[ $DISTRIBUTION = Ubuntu ] && \
[ $RELEASE_VERSION = noble ] || \
[ $RELEASE_VERSION = plucky ] || \
[ $RELEASE_VERSION = questing ] || \
(printf "\n \033[41m\033[1;36m==> If you want to proceed, despite the negative release version test, type \"Yes\". \033[0m\033[42m\033[1;36m ==> ... \033[0m \n \n"
read -e -p "
[y/N] " YN
[[ $YN == "Yes" ]] && \
(echo "try it.")) || exit
printf "\n \033[45m\033[1;36m==> Test sudo. \033[0m\033[42m\033[1;36m ==> ... \033[0m \n \n" && \
sudo echo "sudo Test, OK." && \
printf "\n \033[43m\033[1;36m==> Microsoft Surface repository add? \033[0m\033[41m\033[1;36m ==> ? \033[0m \n" && \
echo "" && \
echo "Only if you realy like to add Microsoft Surface repository, type ==> Yes <== for confirmation." && \
read -e -p "
[y/N] " YN
[[ $YN == "Yes" ]] && \
(printf "\n \033[45m\033[1;36m==> Make linux-surface.sources entry. \033[0m\033[42m\033[1;36m ==> ... \033[0m \n \n" && \
echo "X-Repolib-Name: surfacelinux.com
Enabled: yes
Types: deb
URIs: https://pkg.surfacelinux.com/debian
Suites: release
Components: main
Architectures: amd64
Signed-By:
$(wget -qO /tmp/surface.asc https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc && \
cat /tmp/surface.asc | \
sed -e 's/^$/./' -e 's/^/ /')" | \
sudo tee /etc/apt/sources.list.d/linux-surface.sources > /dev/null && \
sudo chattr -i /etc/apt/sources.list.d/linux-surface.sources && \
rm -fv /tmp/surface.asc && \
printf "\n \033[45m\033[1;36m==> Set APT-Pinning. \033[0m\033[42m\033[1;36m ==> ... \033[0m \n \n" && \
echo "Surface Package Priority:"
echo '
Package: *
Pin: origin pkg.surfacelinux.com
Pin-Priority: 500
' | sudo tee /etc/apt/preferences.d/linux-surface.pref && \
sudo apt-get update && \
printf "\n \033[45m\033[1;36m==> Microsoft Surface repository active now. \033[0m\033[42m\033[1;36m ==> Done.\033[0m \n \n" || \
printf "\n \033[41m\033[1;36m==> Sorry something failed.\033[0m \n \n")
#-----------------------------------------------------------
# Microsoft Surface repositor remove
#-----------------------------------------------------------
printf "\n \033[43m\033[1;36m==> Microsoft Surface repository REMOVE? \033[0m\033[41m\033[1;36m ==> ? \033[0m \n" && \
echo "" && \
echo "Only if you realy like to remove, type ==> Yes <== for confirmation." && \
read -e -p "
[y/N] " YN
[[ $YN == "Yes" ]] && \
(sudo rm -v /etc/apt/sources.list.d/linux-surface.sources && \
sudo rm -v /etc/apt/preferences.d/linux-surface.pref && \
printf "\n \033[45m\033[1;36m==> Microsoft Surface repository removed. \033[0m\033[42m\033[1;36m ==> Done.\033[0m \n \n" || \
echo "" && \
[ -f /etc/apt/sources.list.d/linux-surface.sources ] && \
echo "Not removed.")
Datei microsoft-surface-apt-repository-install-helper.sh speichern →
Strg +
O , und dann schließen →
Strg +
X . Dann ausführbar machen:
chmod 755 microsoft-surface-apt-repository-install-helper.sh
Nun kann der microsoft-surface-apt-repository-install-helper.sh ausgeführt werden:
./microsoft-surface-apt-repository-install-helper.sh
Die Abfragen sind entsprechend zu beantworten. Zum Schluss kommt auch noch eine Abfrage, ob man das Repository wieder entfernen möchte. Es bleibt erhalten, wenn einfach nur die Entertaste gedrückt wird.
Bei mir wird dann angezeigt, das dann damit die DEB-Pakete für Microsoft Tablets über das pkg.surfacelinux.com Repository verfügbar sind:
apt-cache madison linux-image-surface linux-headers-surface libwacom-surface iptsd linux-image-surface | 6.18.7-surface-1 | https://pkg.surfacelinux.com/debian release/main amd64 Packages linux-headers-surface | 6.18.7-surface-1 | https://pkg.surfacelinux.com/debian release/main amd64 Packages libwacom-surface | 2.17.0-1 | https://pkg.surfacelinux.com/debian release/main amd64 Packages iptsd | 3.1.0-1 | https://pkg.surfacelinux.com/debian release/main amd64 Packages
Sollte es sich ergeben, dass die Priorität der DEB-Pakete aus diesem Repository höher als normal sein müssen, oder niedriger, dann kann die Pin-Priority in der Datei:
/etc/apt/preferences.d/linux-surface.pref
... geändert werden. 500 ist Standardpriorität. Für weitere Information siehe im Wiki: