Skip to content

Instantly share code, notes, and snippets.

@Mihitoko
Last active April 8, 2026 23:47
Show Gist options
  • Select an option

  • Save Mihitoko/bd76340e56e78ec972c8a1365abb0d55 to your computer and use it in GitHub Desktop.

Select an option

Save Mihitoko/bd76340e56e78ec972c8a1365abb0d55 to your computer and use it in GitHub Desktop.
Install GeForceNow on Desktop Linux/Non SteamOs devices

Guide for installing GeForceNow on Desktop Linux

With GeForceNow now being available for Linux we can now use the service with optimal performance.

Unfortunately Nvidia only officially supports SteamDeck and during getting this to work on my systems I had to get through some hoops that i want to share here.

First of all the app Nvidia provided is just a normal Flatpak app so the installation is relatively straight forward.
We will not use the official binary that Nvidia proved here, we can install the Flatpak app ourselves.

Just for reference im on PopOs 22.04 but since this is a flatpak it should work the same for everyone.

The guide assumes you have a working flatpak installation.

Installation

Install runtime

First install the runtime that GeForceNow uses, high chance that this is already installed.
The official installer installs this with the --system flag but I find this unnecessary so we install it as user like everything else.

flatpak install --user flathub org.freedesktop.Sdk//24.08

Add Nvidia repository

flatpak remote-add --user  --if-not-exists GeForceNOW https://international.download.nvidia.com/GFNLinux/flatpak/geforcenow.flatpakrepo

Install GeForceNow

flatpak install --user GeForceNOW com.nvidia.geforcenow

That's it you should now be able to launch the app.

Troubleshooting

Some issues I encountered and how I worked around them.

GeForce now encountered a problem and needs to be reinstalled

I encountered while testing this in a VM. The application failed because some GPU features where not available. On real hardware I had no issues. However, if you encounter that check these log files.

cat ~/.var/app/com.nvidia.geforcenow/.local/state/NVIDIA/GeForceNOW/geronimo.log
cat ~/.var/app/com.nvidia.geforcenow/.local/state/NVIDIA/GeForceNOW/GeForceNOW.log

I'm on a full AMD system, I could imagine Nvidia GPUs might make some trouble since the SteamDeck uses AMD.

Logging in not possible (Endless loading spinner)

This is because GeForceNow is failing to open the hosts browser. Luckily Nvidia writes the oauth url it wants to open into a logfile.
You can extract the line with this command.

tac ~/.var/app/com.nvidia.geforcenow/.local/state/NVIDIA/GeForceNOW/console.log | grep starfleet/o-auth | head -n 1

Then paste it into your browser and continue as you would normally.

Network Test Failing

For me the Network Test always failed and claimed there was no connection to Nvidia servers. Even though the app was clearly online. I'm usure why this happens. What I ended up doing is:

  • Click the Burger Menu on the Left Top Corner
  • Go to Settings
  • Gameplay
  • Change Streaming Quality Mode to Custom

This will skip the network check.

Window not opening on Wayland

When the GeForceNow App is not opening and you are under wayland try removing the wayland permission from the flatpak to force it thorough XWayland.

flatpak override --user --nosocket=wayland com.nvidia.geforcenow 

End

Thats it, for me it worked flawlessly afterwards. If you have any additional issues and fixes write them in the comments so we can update the Gist.

@aMytho
Copy link
Copy Markdown

aMytho commented Nov 10, 2025

Games run perfectly well, exactly what I'd expect from this service anywhere else. Thanks for coming up with this solution!
I am having one problem: My mouse is not getting captured by the stream window, which means if I'm playing something that involves moving my mouse to control the camera, I end up clicking things on my 2nd monitor, which is a bit of a struggle. I tried giving the flatpak access to my input devices, doesn't fix it. I've also looked for the "Direct Mouse Input" option in the app itself, it wasn't present, so I modified the GeForceNOW.json file with a line that's supposed to make it show up, and again, nothing. Anyone else having the same issue, and is there a known fix? I'm on the newest EndeavourOS version, running KDE on Wayland. Thanks in advance!

Hello, personally I fix the mouse issue with gamescope with --force-grab-cursor option

Stupid question, but where do I add that option?

It's with an external program called gamescope by steam. You can install it and then run the geforce now script with it.
https://github.com/ValveSoftware/gamescope
Update your script to start the flatpak with gamescope
gamescope --force-grab-cursor -W 1920 -H 1080 -- flatpak run --user --command=bash com.nvidia.geforcenow -c '...

Unfortunately, this causes my system to have low FPS. Geforce still reports 60 (and runs in 60 when not using it) so I'm guessing there is another option I need to enable within gamescope. The mouse wheel doesn't work either.

I'm also having the issue where the cursor is not contained within the window when not using gamescope on Kubuntu 25.10 wayland. Gpu is Nvidia gtx 1050ti proprietary driver v580.

@WilliamFriconneau
Copy link
Copy Markdown

Same script as before but for cachyOS :

#!/usr/bin/env bash
# GeForce NOW (Flatpak) – Installeur et lanceur custom pour Arch/CachyOS (KDE/Wayland)
# Compatible AMD, NVIDIA, Intel
# - Installe Flatpak si absent (pacman)
# - Ajoute Flathub + repo NVIDIA
# - Installe com.nvidia.geforcenow (utilisateur)
# - Crée un lanceur avec spoof Steam Deck (DMI + os-release)
# - Gère raccourcis et intégration Steam

set -euo pipefail

# --- Vérification environnement Arch ---
if ! command -v pacman >/dev/null 2>&1; then
    echo "⚠️  Ce script est prévu pour Arch Linux / CachyOS. 'pacman' introuvable. Arrêt."
    exit 1
fi

# --- Variables globales ---
LAUNCHER_DIR="$HOME/.local/bin"
LAUNCHER_SCRIPT_PATH="$LAUNCHER_DIR/geforce-now-launcher.sh"

DESKTOP_FILE_NAME="com.nvidia.geforcenow.desktop"
LOCAL_SHARE_APPLICATIONS="$HOME/.local/share/applications"
MENU_FILE_PATH="$LOCAL_SHARE_APPLICATIONS/$DESKTOP_FILE_NAME"
DESKTOP_DIR=$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")
DESKTOP_FILE_PATH="$DESKTOP_DIR/$DESKTOP_FILE_NAME"
SUDOERS_FILE="/etc/sudoers.d/99-geforcenow-spoof"

echo
echo "🔧 Vérification/installation Flatpak (via pacman, nécessite sudo)…"
if ! command -v flatpak >/dev/null 2>&1; then
    sudo pacman -Sy --needed --noconfirm flatpak xdg-desktop-portal xdg-desktop-portal-kde
    echo "✅ Flatpak installé."
else
    echo "✅ Flatpak déjà présent."
fi
echo

echo "🚀 Installation GeForce NOW (Flatpak)…"
echo "1) Dépôts/runtimes Flatpak…"
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Platform//24.08 || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Sdk//24.08 || true
echo "✅ Runtimes installés."

echo "2) Dépôt NVIDIA GeForce NOW…"
flatpak remote-add --user --if-not-exists GeForceNOW https://international.download.nvidia.com/GFNLinux/flatpak/geforcenow.flatpakrepo || true
echo "✅ Dépôt ajouté."

echo "3) Installation de l’application…"
flatpak uninstall --noninteractive -y --user com.nvidia.geforcenow &>/dev/null || true
flatpak install --noninteractive -y --user GeForceNOW com.nvidia.geforcenow || true
mkdir -p "$HOME/.local/share/icons/hicolor/512x512/apps"
curl -fsSL -o "$HOME/.local/share/icons/hicolor/512x512/apps/com.nvidia.geforcenow.png" \
  https://gitlab.com/anthrgk/geforcenow-installer-linux/-/raw/main/arch/img/com.nvidia.geforcenow.png || true
echo "✅ Application installée."

echo "4) Overrides Flatpak requis…"
flatpak override --user --nosocket=wayland com.nvidia.geforcenow || true
flatpak override --user --nofilesystem=host-etc com.nvidia.geforcenow || true
echo "✅ Overrides appliqués."

echo
echo "5) Configuration sudoers (optionnel) pour spoof DMI sans mot de passe…"
read -p "   Activer le spoof DMI automatique (requis pour 4K/120 Hz/HDR) ? [y/N] " -r
echo
if [[ "${REPLY:-N}" =~ ^[Yy]$ ]]; then
    SUDOERS_CONTENT="# Allow user $USER to run mount/umount for GeForce NOW DMI spoofing
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_sys_vendor /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_name /sys/class/dmi/id/board_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_name"
    echo "$SUDOERS_CONTENT" | sudo tee "$SUDOERS_FILE" >/dev/null
    sudo chmod 0440 "$SUDOERS_FILE"
    echo "✅ Sudoers configuré : $SUDOERS_FILE"
else
    echo "ℹ️  Sudoers non modifié : le lanceur n’essaiera pas de spoof DMI."
fi

echo
echo "6) Création du lanceur custom…"
mkdir -p "$LAUNCHER_DIR"
cat > "$LAUNCHER_SCRIPT_PATH" << 'EOF'
#!/usr/bin/env bash
set -euo pipefail

CONFIG_JSON_DIR="$HOME/.local/share/flatpak/app/com.nvidia.geforcenow/x86_64/master/"
CONFIG_FILE=$(find "$CONFIG_JSON_DIR" -type f -name "config.json" -print -quit 2>/dev/null || true)

if [[ -n "${CONFIG_FILE:-}" ]]; then
  if [[ -n "${SteamDeck:-}" && "${SteamDeck}" -eq 1 ]]; then
    sed -i 's/"tvMode": false,/"tvMode": true,/' "$CONFIG_FILE" || true
  else
    sed -i 's/"tvMode": true,/"tvMode": false,/' "$CONFIG_FILE" || true
  fi
fi

cleanup() {
  sudo umount /sys/class/dmi/id/board_name &>/dev/null || true
  sudo umount /sys/class/dmi/id/board_vendor &>/dev/null || true
  sudo umount /sys/class/dmi/id/sys_vendor &>/dev/null || true
  sudo umount /sys/class/dmi/id/product_name &>/dev/null || true
  rm -f /tmp/fake_product_name /tmp/fake_sys_vendor /tmp/fake_board_vendor /tmp/fake_board_name || true
}
trap cleanup EXIT

if sudo -n true 2>/dev/null; then
  echo "🚀 Spoof DMI (Lenovo Steam Deck-like)…"
  echo "83L3"  > /tmp/fake_product_name
  echo "Lenovo" > /tmp/fake_sys_vendor
  echo "Lenovo" > /tmp/fake_board_vendor
  echo "8ARP1" > /tmp/fake_board_name
  sudo mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name || true
  sudo mount --bind /tmp/fake_sys_vendor   /sys/class/dmi/id/sys_vendor   || true
  sudo mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor || true
  sudo mount --bind /tmp/fake_board_name   /sys/class/dmi/id/board_name   || true
fi

flatpak run --user --command=bash com.nvidia.geforcenow -c '
  set -e
  mkdir -p /run/host/etc/ssl
  cat > /run/host/etc/os-release << EOS
NAME="SteamOS"
PRETTY_NAME="SteamOS"
VERSION_CODENAME=holo
ID=steamos
ID_LIKE=arch
VARIANT_ID=steamdeck
VERSION_ID=3.7.13
EOS
  cp -r /etc/ssl /run/host/etc/ || true
  /app/bin/GeForceNOW
'
EOF
chmod +x "$LAUNCHER_SCRIPT_PATH"
echo "✅ Lanceur : $LAUNCHER_SCRIPT_PATH"

echo "7) Raccourcis menu et bureau…"
mkdir -p "$LOCAL_SHARE_APPLICATIONS" "$DESKTOP_DIR"
cat > "$MENU_FILE_PATH" << EOF
[Desktop Entry]
Version=1.0
Name=NVIDIA GeForce NOW
Exec=$LAUNCHER_SCRIPT_PATH
Icon=com.nvidia.geforcenow
Type=Application
Categories=Network;Game;
EOF
cp "$MENU_FILE_PATH" "$DESKTOP_FILE_PATH"
chmod +x "$MENU_FILE_PATH" "$DESKTOP_FILE_PATH"
echo "✅ Raccourcis créés."

echo "8) Intégration Steam (si dispo)…"
if command -v steamos-add-to-steam >/dev/null 2>&1; then
  steamos-add-to-steam "$MENU_FILE_PATH" || true
elif command -v xdg-open >/dev/null 2>&1; then
  xdg-open "steam://AddNonSteamGame" >/dev/null 2>&1 || true
fi

echo
echo "🎉 Installation terminée. Lancez GeForce NOW depuis le menu ou le bureau."
echo
echo "ℹ️ Désinstallation :"
echo "   flatpak uninstall --user com.nvidia.geforcenow"
echo "   sudo rm '$SUDOERS_FILE'"
echo "   rm '$LAUNCHER_SCRIPT_PATH' '$MENU_FILE_PATH' '$DESKTOP_FILE_PATH'"

This one doesn't have any OS checks and doesn't apply overrides depending on the client GPU. Dis you actually test it in your PC? What GPU does it have?

When I created the scripts posted at https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/arch you needed to ahav certain overrides depending on the OS & GPU

The arch scripts from my gitlatb works in cachyos since the beginning. It's just in the arch folder because that's what cachyos is built on

CachyOS with gtx 1060, perfect :)

@rp86
Copy link
Copy Markdown

rp86 commented Nov 13, 2025

Since it now works on fedpra I wonder if it would work on bazzite too? I am running steamos on my rog ally x but geforce now thwre is limited to 4k 90hz instead of 120hz, and I would love to avoid running windows just for that. If it works woth bazzite that would be amazing so I can use my dock and play on my tv

anthrgk's Fedora script (https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/arch) worked for me, though it did silently fail until I manually ran dnf - from a new Bazzite install it needed approval at a prompt that the script can't deal with.

@dimadherdt
Copy link
Copy Markdown

Since it now works on fedpra I wonder if it would work on bazzite too? I am running steamos on my rog ally x but geforce now thwre is limited to 4k 90hz instead of 120hz, and I would love to avoid running windows just for that. If it works woth bazzite that would be amazing so I can use my dock and play on my tv

anthrgk's Fedora script (https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/arch) worked for me, though it did silently fail until I manually ran dnf - from a new Bazzite install it needed approval at a prompt that the script can't deal with.

Yea i used grok to make it work on bazzite ans after a lot i got it to install however i get the encountered a problem, while i can click it away when not in gamescope when i ran it in gamescope it will just close the app. Gave up fpr.now and reverted back to steamos for now

@VoxCodice
Copy link
Copy Markdown

If scroll wheel does not work for you and you happen to be using a mouse with high resolution scrolling, try disabling it
https://www.reddit.com/r/archlinux/comments/19bjnf4/highresolution_scrolling_is_enabled_as_default_on/

Alternatively, if you have a thumbwheel, that works as a scroll wheel as well in GFN, at least for me.

@CDeLeon94
Copy link
Copy Markdown

We should probably move this convo to a full repo at this point, so much info here on various aspects and thus could use organization.

Just going to add,

On an arch system with nvidia graphics

I got an error just now that an error had occurred and I need to reinstall Geforce Now, checking logs per existing instructions:

cat ~/.var/app/com.nvidia.geforcenow/.local/state/NVIDIA/GeForceNOW/geronimo.log
cat ~/.var/app/com.nvidia.geforcenow/.local/state/NVIDIA/GeForceNOW/GeForceNOW.log

I saw an error about no usable physical devices found with all required extensions / vulkaninitdevice failed

I ended up opening the Discover application and let it do updates, which included nvidia drivers, after that update geforcenow is launching again

@regulator-g
Copy link
Copy Markdown

On fedora, following the main steps, after disabling wayland the login screen appears, then when I press "get in" it just spins indefinitely and I cant put my credentials in

log snippet

[5:34:2025-12-08/ 16:39:56.974:ERROR:cast_crl.cc(443)] CRL - Verification failed.
cat: /run/host/etc/os-release: No such file or directory
cat: /run/host/etc/os-release: No such file or directory
sh: line 1: x-www-browser: command not found
Portal call failed: Failed to start command: Failed to execute child process “modetest” (No such file or directory)
cat: /run/host/etc/os-release: No such file or directory
sh: line 1: x-www-browser: command not found

@Spurlos
Copy link
Copy Markdown

Spurlos commented Dec 8, 2025

On fedora, following the main steps, after disabling wayland the login screen appears, then when I press "get in" it just spins indefinitely and I cant put my credentials in

log snippet

[5:34:2025-12-08/ 16:39:56.974:ERROR:cast_crl.cc(443)] CRL - Verification failed.
cat: /run/host/etc/os-release: No such file or directory
cat: /run/host/etc/os-release: No such file or directory
sh: line 1: x-www-browser: command not found
Portal call failed: Failed to start command: Failed to execute child process “modetest” (No such file or directory)
cat: /run/host/etc/os-release: No such file or directory
sh: line 1: x-www-browser: command not found

This helped me with same issue on Ubuntu https://gist.github.com/Mihitoko/bd76340e56e78ec972c8a1365abb0d55#logging-in-not-possible-endless-loading-spinner

@regulator-g
Copy link
Copy Markdown

This helped me with same issue on Ubuntu

Sorry I totally missed that in the troubleshooting section, logged in now thanks!

@raimondoraffaele-byte
Copy link
Copy Markdown

Great thread, I edited the script quickly w gemini ai for it to work on fedora w amd integrated graphics, works great in 4k 120

# GPU check: Verify that the graphics card is from AMD
if ! lspci | grep -i 'VGA' | grep -qi 'amd\|advanced micro devices'; then
    echo "⚠️ This script requires an AMD GPU. Exiting."
    exit 1
fi
echo ""
echo "✅ AMD GPU detected. So far, so good."
echo ""
# Check if dnf is installed, it should if it's a Fedora distro:
if ! command -v dnf &> /dev/null; then
    echo "⚠️ This script is designed for Fedora and Fedora-based distributions."
    echo "   'dnf' command not found. Exiting."
    exit 1
fi
echo ""
# Exit immediately if a command exits with a non-zero status.
set -e

# --- Configuration ---
# Path for the custom launcher script
LAUNCHER_DIR="$HOME/.local/bin"
LAUNCHER_SCRIPT_PATH="$LAUNCHER_DIR/geforce-now-launcher.sh"

# Define the file name and the two key locations
DESKTOP_FILE_NAME="com.nvidia.geforcenow.desktop"
LOCAL_SHARE_APPLICATIONS="$HOME/.local/share/applications"
MENU_FILE_PATH="$HOME/.local/share/applications/$DESKTOP_FILE_NAME" # The "source" file for the app menu
# Find the user's desktop directory, falling back to "$HOME/Desktop" if the command fails
DESKTOP_DIR=$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")
# Define the full path for the desktop shortcut
DESKTOP_FILE_PATH="$DESKTOP_DIR/$DESKTOP_FILE_NAME"
# --- NEW: Define sudoers file for passwordless mounting ---
SUDOERS_FILE="/etc/sudoers.d/99-geforcenow-spoof"

echo ""
echo "Before we start we will need to install Flatpak, which requires root permissions to get it installed"
echo ""
if dnf list installed flatpak &> /dev/null; then
    echo "✅ Flatpak is already installed. Good!"
else
    echo "Flatpak is not installed. We will need to install it, which requires root permissions."
    sudo dnf install -y flatpak
    echo "✅ Flatpak has been successfully installed."
fi
echo ""

# --- Installation Steps ---
echo "🚀 Starting GeForce NOW Installer for AMD Linux Systems..."
echo "1. Adding Flathub repo and installing required Flatpak runtimes..."
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Platform//24.08 || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Sdk//24.08 || true
echo "✅ Required runtimes installed"

echo "2. Adding the GeForce NOW Flatpak repository..."
flatpak remote-add --user --if-not-exists GeForceNOW https://international.download.nvidia.com/GFNLinux/flatpak/geforcenow.flatpakrepo || true
echo "✅ GeForce NOW repo added"

echo "3. Installing GeForce NOW..."
flatpak uninstall --noninteractive -y --user com.nvidia.geforcenow &>/dev/null || echo "✅ GeForce NOW not found. Ready for a fresh installation."
flatpak install --noninteractive -y --user GeForceNOW com.nvidia.geforcenow || echo "✅ App installed. In the next steps we'll apply some custom tweaks so it can work."
mkdir -p "$HOME/.local/share/icons/hicolor/512x512/apps"
curl -sL -o "$HOME/.local/share/icons/hicolor/512x512/apps/com.nvidia.geforcenow.png" https://gitlab.com/anthrgk/geforcenow-installer-linux/-/raw/main/arch/img/com.nvidia.geforcenow.png
echo "✅ GeForce NOW installed. Tweaking few things so it can launch succesfully..."
echo "4. Applying required Flatpak overrides..."
flatpak override --user --nosocket=wayland com.nvidia.geforcenow
flatpak override --user --nofilesystem=host-etc com.nvidia.geforcenow
echo "✅ Flatpak overrides applied"

# --- NEW STEP: Configure passwordless sudo for the mounting commands ---
echo "5. Configuring passwordless sudo for automatic system value spoofing..."
echo ""
echo "   This next step is optional, but required if you want to enable up to 4K 120FPS streaming."
echo "   If you agree, your device's system information (product, vendor, and board name) will be temporarily"
echo "   'spoofed' or disguised to look like a different device while GeForce NOW is running."
echo ""
echo "   ⚠️ IMPORTANT: Because of this temporary change, it is strongly recommended NOT to perform"
echo "   any system or software updates while GeForce NOW is open."
echo "   Proceed at your own risk."
echo ""
read -p "   Do you want to proceed? (y/N) " -n 1 -r
echo # Move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    # Define the exact commands that will be allowed without a password
    SUDOERS_CONTENT="
# Allow user $USER to run mount/umount for GeForce NOW DMI spoofing
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_sys_vendor /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_name /sys/class/dmi/id/board_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_name
"
    # Use tee with sudo to write the file, as we need root privileges
    echo "$SUDOERS_CONTENT" | sudo tee "$SUDOERS_FILE" > /dev/null
    sudo chmod 0440 "$SUDOERS_FILE"
    echo "✅ Sudoers file created successfully."
else
    echo "⚠️  Skipping sudoers configuration. The launcher will not be able to spoof DMI values."
fi


echo "6. Creating the custom launcher script..."
# Ensure the local bin directory exists
mkdir -p "$LAUNCHER_DIR"
# --- HEAVILY MODIFIED: Create the new launcher script with spoofing and cleanup ---
cat > "$LAUNCHER_SCRIPT_PATH" << 'EOF'
#!/bin/bash
# The first section toggles the GeForce NOW TV Mode.
# It will obviously skip the modification if the directory or config file is not found,
# allowing the rest of the launch script to continue.

# 1. Define the base directory.
CONFIG_JSON_DIR="$HOME/.local/share/flatpak/app/com.nvidia.geforcenow/x86_64/master/"
# 2. Attempt to find the config file path.
CONFIG_FILE=$(find "$CONFIG_JSON_DIR" -type f -name "config.json" -print -quit 2>/dev/null)

# 3. Proceed with modifications ONLY if the config file was found.
if [ -n "$CONFIG_FILE" ]; then
    echo "Found config file: $CONFIG_FILE"

    # Check if we are on a Steam Deck Gaming Mode or we launched the GeForce NOW via Steam, and apply the appropriate setting so it launches with tv layout.
    if [ -n "$SteamDeck" ] && [ "$SteamDeck" -eq 1 ]; then
        echo "App launched via Steam. Enabling TV Mode..."
        sed -i 's/"tvMode": false,/"tvMode": true,/' "$CONFIG_FILE"
        echo "✅ 'tvMode' set to 'true'."
    else
    # If we aren't on Steam Deck Gaming Mode nor launched GeForce NOW via Steam, it will set GFN with the desktop layout.
        echo "Standard environment detected. Disabling TV Mode..."
        sed -i 's/"tvMode": true,/"tvMode": false,/' "$CONFIG_FILE"
        echo "✅ 'tvMode' set to 'false'."
    fi
else
    echo "GeForce NOW config not found. Skipping modification."
fi
echo ""
# This section of the script performs two main functions:
# 1. DMI Spoofing: Mounts temporary files to pretend the system is a Steam Deck.
# 2. Flatpak Spoofing: Runs GeForce NOW inside a Flatpak sandbox with a fake os-release.
# It automatically cleans up the DMI mounts when the application is closed.

# --- Function to clean up the mounts and temp files ---
cleanup() {
    echo "GeForce NOW closed. Cleaning up DMI spoof..."
    # Unmount in reverse order, ignoring errors if they are already unmounted
    sudo umount /sys/class/dmi/id/board_name &>/dev/null || true
    sudo umount /sys/class/dmi/id/board_vendor &>/dev/null || true
    sudo umount /sys/class/dmi/id/sys_vendor &>/dev/null || true
    sudo umount /sys/class/dmi/id/product_name &>/dev/null || true

    # Remove the temporary files
    rm -f /tmp/fake_product_name /tmp/fake_sys_vendor /tmp/fake_board_vendor /tmp/fake_board_name
    echo "✅ Cleanup complete."
}

# --- Trap the exit signal to ensure cleanup always runs ---
# This makes sure the 'cleanup' function is called when the script exits for any reason.
trap cleanup EXIT

# --- Step 1: Perform DMI Spoofing on the host system ---
echo "🚀 Applying DMI spoof so we can mimic another device and enable 4k 120FPS with HDR.."
echo "83L3" > /tmp/fake_product_name
echo "Lenovo" > /tmp/fake_sys_vendor
echo "Lenovo" > /tmp/fake_board_vendor
echo "8ARP1" > /tmp/fake_board_name

# Use sudo for the mount commands (passwordless due to sudoers config)
sudo mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name
sudo mount --bind /tmp/fake_sys_vendor /sys/class/dmi/id/sys_vendor
sudo mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor
sudo mount --bind /tmp/fake_board_name /sys/class/dmi/id/board_name
echo "✅ DMI values spoofed. Launching GeForce NOW..."

# --- Step 2: Launch GeForce NOW with Flatpak Spoofing ---
# The rest of this is the original flatpak sandboxed launch command
flatpak run --user --command=bash com.nvidia.geforcenow -c '
    # Exit immediately if a command exits with a non-zero status.
    set -e

    # Create the directory that holds the os-release and SSL certs
    mkdir -p /run/host/etc/ssl

    # Create the SteamOS os-release file
    cat > /run/host/etc/os-release << EOL
NAME="SteamOS"
PRETTY_NAME="SteamOS"
VERSION_CODENAME=holo
ID=steamos
ID_LIKE=arch
ANSI_COLOR="1;35"
HOME_URL="https://www.steampowered.com/"
DOCUMENTATION_URL="https://support.steampowered.com/"
SUPPORT_URL="https://support.steampowered.com/"
BUG_REPORT_URL="https://support.steampowered.com/"
LOGO=steamos
VARIANT_ID=steamdeck
VERSION_ID=3.7.13
BUILD_ID=20250630.1
STEAMOS_DEFAULT_UPDATE_BRANCH=stable
EOL

    # Recursively copy the host system'\''s SSL certificates into the sandbox
    cp -r /etc/ssl /run/host/etc/

    # Launch GeForce NOW (this command blocks until the app is closed)
    /app/bin/GeForceNOW
'
EOF

# Make the launcher script executable
chmod +x "$LAUNCHER_SCRIPT_PATH"
echo "✅ Custom launcher script created at: $LAUNCHER_SCRIPT_PATH"

echo "7. Creating and modifying the main application menu shortcut..."
mkdir -p "$LOCAL_SHARE_APPLICATIONS"
cat > "$MENU_FILE_PATH" << EOF
[Desktop Entry]
Version=1.0
Name=NVIDIA GeForce NOW
GenericName=NVIDIA GeForce NOW
Exec=$LAUNCHER_SCRIPT_PATH
Icon=com.nvidia.geforcenow
Type=Application
Categories=Network;Game;
EOF
echo "✅ Main menu shortcut modified to use the custom launcher script."

echo "8. Creating/Updating the desktop shortcut and if possible adding GeForce NOW to Steam..."
cp "$MENU_FILE_PATH" "$DESKTOP_FILE_PATH"
echo "✅ Desktop shortcut created and synchronized with the main menu entry."
if command -v steamos-add-to-steam >/dev/null 2>&1; then
  steamos-add-to-steam "$MENU_FILE_PATH" || steamos-add-to-steam com.nvidia.geforcenow || true
  echo "✅ GeForce NOW shortcut added to Steam as well."
elif command -v xdg-open >/dev/null 2>&1; then
  xdg-open "steam://AddNonSteamGame" >/dev/null 2>&1 || true
fi

echo "9. Making shortcuts launchable..."
case "$XDG_CURRENT_DESKTOP" in
    *GNOME*|*Cinnamon*|*MATE*|*Budgie*)
        echo "   Detected a GNOME-based desktop. Using 'gio' to trust files."
        /usr/bin/gio set "$MENU_FILE_PATH" metadata::trusted true || echo "⚠️  Warning: Could not trust the main menu shortcut."
        /usr/bin/gio set "$DESKTOP_FILE_PATH" metadata::trusted true || echo "⚠️  Warning: Could not trust the desktop shortcut."
        ;;
    *KDE*|*)
        echo "✅ Detected KDE or another desktop. Setting executable permissions."
        chmod +x "$MENU_FILE_PATH"
        chmod +x "$DESKTOP_FILE_PATH"
        ;;
esac
echo "✅ Both shortcuts are now ready to launch."
echo ""
echo "🎉 Installation complete! You can now launch GeForce NOW from your desktop OR your application menu."
echo ""
echo "ℹ️  NOTE: To uninstall, you can delete the application and manually remove the files added by this script with:"
echo "   flatpak uninstall --user com.nvidia.geforcenow"
echo "   sudo rm '$SUDOERS_FILE'"
echo "   rm '$LAUNCHER_SCRIPT_PATH' '$MENU_FILE_PATH' '$DESKTOP_FILE_PATH'"```

Hi, is it possible to have this script for Ubuntu and derivates? I have tried to modify it but it is not working.

@bacatta
Copy link
Copy Markdown

bacatta commented Dec 9, 2025

@Martwy022
Copy link
Copy Markdown

@bacatta Is there an easy way to turn off TV Mode?
I launch it on my desktop and every time I get TV Mode. Arch with Hyprland, I do not turn it on through Steam.

@bacatta
Copy link
Copy Markdown

bacatta commented Dec 13, 2025

Well, the launcher script is suppose to detect and set it to desktop mode...
By execution it in terminal, you may see "'tvMode' set to 'false'."... but it's not working for me neither.

@Martwy022
Copy link
Copy Markdown

I get exactly ‘tvMode’ set to ‘false’, but just like for you, it doesn't work.

@luisfer153
Copy link
Copy Markdown

before test some env's of the top comment the most far i can go with a braswell igpu with xorg in mint its:

[2025-12-14 06:45:14,441]=01:45:14= ERROR [SDLGraphicsContext] {890CB000} -SDL Error : 'Installed Vulkan doesn't implement the VK_KHR_surface extension'
[2025-12-14 06:45:14,442]=01:45:14= ERROR [SDLGraphicsContext] {890CB000} - Error Line : 581

any hero?

@Forceres
Copy link
Copy Markdown

Can you use the mouse wheel? The button works, but scrolling doesn't.

I am experiencing the same problem. Seems to be related to how the stream-window captures the input of the scroll wheel when running in fullscreen. The interesting thing is that when you use the GFN overlay to activate on-screen keyboard & mouse, it works for a little while.

A quick-fix for me was to force the stream to run in windowed mode in order to capture the correct input. Here's how:

Open the /home/<user>/.local/share/flatpak/app/com.nvidia.geforcenow/x86_64/master/active/files/mall/shared/assets/config/config.json file, and change the requireFullscreenInStreaming to false. Then you run the stream in maximized windowed mode. Not sure how we can force the fullscreen process to use the same source of input as the windowed process.

The downside of this is that you cant run fullscreen, which probably comes with some downsides...

The downsides make it unusable. It's funny that without gamescope mouse wheel works, but with gamescope doesn't.
We need other solution.

Copy link
Copy Markdown

ghost commented Dec 17, 2025

Since the latest NVIDIA GeForce Now update (the commit 95ca9950ebbc764e5a28d7b3af85aeed902d546fcff5fcd4dc7e84faa5c7e686), spoofing the os-release file is no longer sufficient to get the tvMode UI along with its exclusive streaming options.

I hope someone more knowledgeable than me who has found the solution can chime in, because I am no longer able to use the following workaround,

I am experiencing the same problem. Seems to be related to how the stream-window captures the input of the scroll wheel when running in fullscreen. The interesting thing is that when you use the GFN overlay to activate on-screen keyboard & mouse, it works for a little while.

in order to temporarily regain the ability to use my mouse wheel.

For the same reason, I am also unable to re-enable the system clipboard support from within the GeForce Now overlay to get it back to work if the client fails to synchronize with the clipboard, which is another issue that made me depend on that UI.

Reverting to the commit 7c743ebd1635b2c2b9ba6fdb0fb9de5c7758f0195e88d4867da17a377223f2c1 by running flatpak update --user --commit=7c743ebd1635b2c2b9ba6fdb0fb9de5c7758f0195e88d4867da17a377223f2c1 com.nvidia.geforcenow is how I currently work around this newly introduced limitation, but I suspect this workaround will not work forever so it is not sustainable in the long term.

@vpopovic
Copy link
Copy Markdown

Running on CachyOS, following the latest GeforceNow update (2.0.80.173) I have also lost the ability to run games in 4k 120fps.

So launching with the spoofing script now results in the same situation as running a native GeforceNow install: forced 1080p 60fps.

Too bad, because this worked perfectly! Would now additional spoofing steps be needed, or other ways to bypass the forced resolution?

@aMytho
Copy link
Copy Markdown

aMytho commented Dec 18, 2025

I have the same issue, but I still have h265 encoding (as opposed to only h264 in chromium). Resolution is limited to 1080p60.

To stop the app from updating automatically

flatpak mask com.nvidia.geforcenow

@anthrgk
Copy link
Copy Markdown

anthrgk commented Dec 19, 2025

Hi guys, I fixed the Arch/CachyOS installer and now 4K 120FPS works again with the latest app version (2.0.80.173).

Now we need one override less, at least on CachyOS (no more --nosocket=wayland). Anyway, here it is the updated installer for arch/cachyos:

https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/arch?ref_type=heads

I don't have any PC with Fedora, Ubuntu or Intel GPU, but if someone (@bacatta @armeldemarsac92 or anyone else) merges what I did for arch/cachyos and adapt it for Ubuntu/Fedora then I won't mind updating it on my gitlab repo.

I don't have much time lately and I don't use those distros, hence I prefer to be cautious.

@bacatta
Copy link
Copy Markdown

bacatta commented Dec 21, 2025

Hi, I submit a merge request for ubuntu: https://gitlab.com/anthrgk/geforcenow-installer-linux/-/merge_requests/3

Got errors against os-release, cert and gamescope... but QHD is working again (and so I think 4k if you got the sub) !

@anthrgk
Copy link
Copy Markdown

anthrgk commented Dec 22, 2025

Got errors against os-release, cert and gamescope... but QHD is working again (and so I think 4k if you got the sub) !

Thank you! I merged it

@krxdow
Copy link
Copy Markdown

krxdow commented Dec 23, 2025

hello everyone

I’m running GeForce NOW via the official Linux Flatpak on Arch Linux (KDE Plasma, Wayland) with an AZERTY keyboard (fr).

At the GeForce NOW interface level, the keyboard layout is correctly handled as AZERTY.
However, once I launch a game, and I reach a third-party launcher (Steam, Battle.net, Ubisoft Connect, etc.), the keyboard layout switches to QWERTY.

Does anyone know a way to force or persist AZERTY keyboard layout inside game launchers (Steam / Battle.net) when using GeForce NOW on Linux?

Any insight, workaround, environment variable, or internal GFN setting would be greatly appreciated.

@Martwy022
Copy link
Copy Markdown

@anthrgk I reinstalled my system. Now, when I try to use the script, I get an error when I try to run ./geforce-now-launcher.sh.

bash: line 3: /run/host/etc/os-release: No such file or directory
GeForce NOW closed. Cleaning up...

Any ideas?

@laurentpayot
Copy link
Copy Markdown

Does anyone know a way to force or persist AZERTY keyboard layout inside game launchers (Steam / Battle.net) when using GeForce NOW on Linux?

@krxdow Same for me with BÉPO or AZERTY layouts. GFN uses an English version of Steam with a QWERTY layout, and I know no workaround for this. Many people already complained about this in the GFN forum.

@bacatta
Copy link
Copy Markdown

bacatta commented Dec 24, 2025

Does anyone know a way to force or persist AZERTY keyboard layout inside game launchers (Steam / Battle.net) when using GeForce NOW on Linux?

@krxdow Same for me with BÉPO or AZERTY layouts. GFN uses an English version of Steam with a QWERTY layout, and I know no workaround for this. Many people already complained about this in the GFN forum.

Yes, I confirm this is not Linux nor SteamOS specific.
https://gist.github.com/Mihitoko/bd76340e56e78ec972c8a1365abb0d55?permalink_comment_id=5812552#gistcomment-5812552
If you find a solution somewhere, please share it here, i will do the same :)

@bacatta
Copy link
Copy Markdown

bacatta commented Dec 25, 2025

Does anyone know a way to force or persist AZERTY keyboard layout inside game launchers (Steam / Battle.net) when using GeForce NOW on Linux?

@krxdow Same for me with BÉPO or AZERTY layouts. GFN uses an English version of Steam with a QWERTY layout, and I know no workaround for this. Many people already complained about this in the GFN forum.

Yes, I confirm this is not Linux nor SteamOS specific. https://gist.github.com/Mihitoko/bd76340e56e78ec972c8a1365abb0d55?permalink_comment_id=5812552#gistcomment-5812552 If you find a solution somewhere, please share it here, i will do the same :)

I've just tested again on Chromebook and there is actually an option for keyboard layout that is working !
I think it's the Android client since I also got the same option available on my smartphone (but not tested).

@KingPin
Copy link
Copy Markdown

KingPin commented Dec 26, 2025

anyone know how I can connect to my epic account? i just get the popup saying a browser tab is open, finish connecting your account. but nothing happens

thanks

@armeldemarsac92
Copy link
Copy Markdown

armeldemarsac92 commented Dec 28, 2025

Updated script for fedora, with the right geforce client version, the latest update broke everyhting.

# https://gist.github.com/Mihitoko/bd76340e56e78ec972c8a1365abb0d55?permalink_comment_id=5840016#gistcomment-5840016
# GPU check: Verify that the graphics card is from AMD
if ! lspci | grep -i 'VGA' | grep -qi 'amd\|advanced micro devices'; then
    echo "⚠️ This script requires an AMD GPU. Exiting."
    exit 1
fi
echo ""
echo "✅ AMD GPU detected. So far, so good."
echo ""
# Check if dnf is installed, it should if it's a Fedora distro:
if ! command -v dnf &> /dev/null; then
    echo "⚠️ This script is designed for Fedora and Fedora-based distributions."
    echo "   'dnf' command not found. Exiting."
    exit 1
fi
echo ""
# Exit immediately if a command exits with a non-zero status.
set -e

# --- Configuration ---
# Path for the custom launcher script
LAUNCHER_DIR="$HOME/.local/bin"
LAUNCHER_SCRIPT_PATH="$LAUNCHER_DIR/geforce-now-launcher.sh"

# Define the file name and the two key locations
DESKTOP_FILE_NAME="com.nvidia.geforcenow.desktop"
LOCAL_SHARE_APPLICATIONS="$HOME/.local/share/applications"
MENU_FILE_PATH="$HOME/.local/share/applications/$DESKTOP_FILE_NAME" # The "source" file for the app menu
# Find the user's desktop directory, falling back to "$HOME/Desktop" if the command fails
DESKTOP_DIR=$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")
# Define the full path for the desktop shortcut
DESKTOP_FILE_PATH="$DESKTOP_DIR/$DESKTOP_FILE_NAME"
# --- NEW: Define sudoers file for passwordless mounting ---
SUDOERS_FILE="/etc/sudoers.d/99-geforcenow-spoof"

echo ""
echo "Before we start we will need to install Flatpak, which requires root permissions to get it installed"
echo ""
if dnf list installed flatpak &> /dev/null; then
    echo "✅ Flatpak is already installed. Good!"
else
    echo "Flatpak is not installed. We will need to install it, which requires root permissions."
    sudo dnf install -y flatpak
    echo "✅ Flatpak has been successfully installed."
fi
echo ""

# --- Installation Steps ---
echo "🚀 Starting GeForce NOW Installer for AMD Linux Systems..."
echo "1. Adding Flathub repo and installing required Flatpak runtimes..."
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Platform//24.08 || true
flatpak install --noninteractive -y --system flathub org.freedesktop.Sdk//24.08 || true
echo "✅ Required runtimes installed"

echo "2. Adding the GeForce NOW Flatpak repository..."
flatpak remote-add --user --if-not-exists GeForceNOW https://international.download.nvidia.com/GFNLinux/flatpak/geforcenow.flatpakrepo || true
echo "✅ GeForce NOW repo added"

echo "3. Installing GeForce NOW..."
flatpak uninstall --noninteractive -y --user com.nvidia.geforcenow &>/dev/null || echo "✅ GeForce NOW not found. Ready for a fresh installation."
flatpak install --noninteractive -y --user GeForceNOW com.nvidia.geforcenow || echo "✅ App installed. In the next steps we'll apply some custom tweaks so it can work."

# --- MODIFICATION START: Force Specific Version ---
echo "⬇️  Downgrading to requested version: 2.0.78.147..."
flatpak update --noninteractive -y --user --commit=0d56051d6c9c81177f685a988d666fa12b647ca25f994e9bb378d4c9305b10c2 com.nvidia.geforcenow
echo "🔒 Locking version to prevent auto-updates..."
flatpak mask --user com.nvidia.geforcenow
# --- MODIFICATION END ---

mkdir -p "$HOME/.local/share/icons/hicolor/512x512/apps"
curl -sL -o "$HOME/.local/share/icons/hicolor/512x512/apps/com.nvidia.geforcenow.png" https://gitlab.com/anthrgk/geforcenow-installer-linux/-/raw/main/arch/img/com.nvidia.geforcenow.png
echo "✅ GeForce NOW installed. Tweaking few things so it can launch succesfully..."
echo "4. Applying required Flatpak overrides..."
flatpak override --user --nosocket=wayland com.nvidia.geforcenow
flatpak override --user --nofilesystem=host-etc com.nvidia.geforcenow
echo "✅ Flatpak overrides applied"

# --- NEW STEP: Configure passwordless sudo for the mounting commands ---
echo "5. Configuring passwordless sudo for automatic system value spoofing..."
echo ""
echo "   This next step is optional, but required if you want to enable up to 4K 120FPS streaming."
echo "   If you agree, your device's system information (product, vendor, and board name) will be temporarily"
echo "   'spoofed' or disguised to look like a different device while GeForce NOW is running."
echo ""
echo "   ⚠️ IMPORTANT: Because of this temporary change, it is strongly recommended NOT to perform"
echo "   any system or software updates while GeForce NOW is open."
echo "   Proceed at your own risk."
echo ""
read -p "   Do you want to proceed? (y/N) " -n 1 -r
echo # Move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    # Define the exact commands that will be allowed without a password
    SUDOERS_CONTENT="
# Allow user $USER to run mount/umount for GeForce NOW DMI spoofing
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_sys_vendor /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/mount --bind /tmp/fake_board_name /sys/class/dmi/id/board_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/product_name
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/sys_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_vendor
$USER ALL=(ALL) NOPASSWD: /usr/bin/umount /sys/class/dmi/id/board_name
"
    # Use tee with sudo to write the file, as we need root privileges
    echo "$SUDOERS_CONTENT" | sudo tee "$SUDOERS_FILE" > /dev/null
    sudo chmod 0440 "$SUDOERS_FILE"
    echo "✅ Sudoers file created successfully."
else
    echo "⚠️  Skipping sudoers configuration. The launcher will not be able to spoof DMI values."
fi


echo "6. Creating the custom launcher script..."
# Ensure the local bin directory exists
mkdir -p "$LAUNCHER_DIR"
# --- HEAVILY MODIFIED: Create the new launcher script with spoofing and cleanup ---
cat > "$LAUNCHER_SCRIPT_PATH" << 'EOF'
#!/bin/bash
# The first section toggles the GeForce NOW TV Mode.
# It will obviously skip the modification if the directory or config file is not found,
# allowing the rest of the launch script to continue.

# 1. Define the base directory.
CONFIG_JSON_DIR="$HOME/.local/share/flatpak/app/com.nvidia.geforcenow/x86_64/master/"
# 2. Attempt to find the config file path.
CONFIG_FILE=$(find "$CONFIG_JSON_DIR" -type f -name "config.json" -print -quit 2>/dev/null)

# 3. Proceed with modifications ONLY if the config file was found.
if [ -n "$CONFIG_FILE" ]; then
    echo "Found config file: $CONFIG_FILE"

    # Check if we are on a Steam Deck Gaming Mode or we launched the GeForce NOW via Steam, and apply the appropriate setting so it launches with tv layout.
    if [ -n "$SteamDeck" ] && [ "$SteamDeck" -eq 1 ]; then
        echo "App launched via Steam. Enabling TV Mode..."
        sed -i 's/"tvMode": false,/"tvMode": true,/' "$CONFIG_FILE"
        echo "✅ 'tvMode' set to 'true'."
    else
    # If we aren't on Steam Deck Gaming Mode nor launched GeForce NOW via Steam, it will set GFN with the desktop layout.
        echo "Standard environment detected. Disabling TV Mode..."
        sed -i 's/"tvMode": true,/"tvMode": false,/' "$CONFIG_FILE"
        echo "✅ 'tvMode' set to 'false'."
    fi
else
    echo "GeForce NOW config not found. Skipping modification."
fi
echo ""
# This section of the script performs two main functions:
# 1. DMI Spoofing: Mounts temporary files to pretend the system is a Steam Deck.
# 2. Flatpak Spoofing: Runs GeForce NOW inside a Flatpak sandbox with a fake os-release.
# It automatically cleans up the DMI mounts when the application is closed.

# --- Function to clean up the mounts and temp files ---
cleanup() {
    echo "GeForce NOW closed. Cleaning up DMI spoof..."
    # Unmount in reverse order, ignoring errors if they are already unmounted
    sudo umount /sys/class/dmi/id/board_name &>/dev/null || true
    sudo umount /sys/class/dmi/id/board_vendor &>/dev/null || true
    sudo umount /sys/class/dmi/id/sys_vendor &>/dev/null || true
    sudo umount /sys/class/dmi/id/product_name &>/dev/null || true

    # Remove the temporary files
    rm -f /tmp/fake_product_name /tmp/fake_sys_vendor /tmp/fake_board_vendor /tmp/fake_board_name
    echo "✅ Cleanup complete."
}

# --- Trap the exit signal to ensure cleanup always runs ---
# This makes sure the 'cleanup' function is called when the script exits for any reason.
trap cleanup EXIT

# --- Step 1: Perform DMI Spoofing on the host system ---
echo "🚀 Applying DMI spoof so we can mimic another device and enable 4k 120FPS with HDR.."
echo "83L3" > /tmp/fake_product_name
echo "Lenovo" > /tmp/fake_sys_vendor
echo "Lenovo" > /tmp/fake_board_vendor
echo "8ARP1" > /tmp/fake_board_name

# Use sudo for the mount commands (passwordless due to sudoers config)
sudo mount --bind /tmp/fake_product_name /sys/class/dmi/id/product_name
sudo mount --bind /tmp/fake_sys_vendor /sys/class/dmi/id/sys_vendor
sudo mount --bind /tmp/fake_board_vendor /sys/class/dmi/id/board_vendor
sudo mount --bind /tmp/fake_board_name /sys/class/dmi/id/board_name
echo "✅ DMI values spoofed. Launching GeForce NOW..."

# --- Step 2: Launch GeForce NOW with Flatpak Spoofing ---
# The rest of this is the original flatpak sandboxed launch command
flatpak run --user --command=bash com.nvidia.geforcenow -c '
    # Exit immediately if a command exits with a non-zero status.
    set -e

    # Create the directory that holds the os-release and SSL certs
    mkdir -p /run/host/etc/ssl

    # Create the SteamOS os-release file
    cat > /run/host/etc/os-release << EOL
NAME="SteamOS"
PRETTY_NAME="SteamOS"
VERSION_CODENAME=holo
ID=steamos
ID_LIKE=arch
ANSI_COLOR="1;35"
HOME_URL="https://www.steampowered.com/"
DOCUMENTATION_URL="https://support.steampowered.com/"
SUPPORT_URL="https://support.steampowered.com/"
BUG_REPORT_URL="https://support.steampowered.com/"
LOGO=steamos
VARIANT_ID=steamdeck
VERSION_ID=3.7.13
BUILD_ID=20250630.1
STEAMOS_DEFAULT_UPDATE_BRANCH=stable
EOL

    # Recursively copy the host system'\''s SSL certificates into the sandbox
    cp -r /etc/ssl /run/host/etc/

    # Launch GeForce NOW (this command blocks until the app is closed)
    /app/bin/GeForceNOW
'
EOF

# Make the launcher script executable
chmod +x "$LAUNCHER_SCRIPT_PATH"
echo "✅ Custom launcher script created at: $LAUNCHER_SCRIPT_PATH"

echo "7. Creating and modifying the main application menu shortcut..."
mkdir -p "$LOCAL_SHARE_APPLICATIONS"
cat > "$MENU_FILE_PATH" << EOF
[Desktop Entry]
Version=1.0
Name=NVIDIA GeForce NOW
GenericName=NVIDIA GeForce NOW
Exec=$LAUNCHER_SCRIPT_PATH
Icon=com.nvidia.geforcenow
Type=Application
Categories=Network;Game;
EOF
echo "✅ Main menu shortcut modified to use the custom launcher script."

echo "8. Creating/Updating the desktop shortcut and if possible adding GeForce NOW to Steam..."
cp "$MENU_FILE_PATH" "$DESKTOP_FILE_PATH"
echo "✅ Desktop shortcut created and synchronized with the main menu entry."
if command -v steamos-add-to-steam >/dev/null 2>&1; then
  steamos-add-to-steam "$MENU_FILE_PATH" || steamos-add-to-steam com.nvidia.geforcenow || true
  echo "✅ GeForce NOW shortcut added to Steam as well."
elif command -v xdg-open >/dev/null 2>&1; then
  xdg-open "steam://AddNonSteamGame" >/dev/null 2>&1 || true
fi

echo "9. Making shortcuts launchable..."
case "$XDG_CURRENT_DESKTOP" in
    *GNOME*|*Cinnamon*|*MATE*|*Budgie*)
        echo "   Detected a GNOME-based desktop. Using 'gio' to trust files."
        /usr/bin/gio set "$MENU_FILE_PATH" metadata::trusted true || echo "⚠️  Warning: Could not trust the main menu shortcut."
        /usr/bin/gio set "$DESKTOP_FILE_PATH" metadata::trusted true || echo "⚠️  Warning: Could not trust the desktop shortcut."
        ;;
    *KDE*|*)
        echo "✅ Detected KDE or another desktop. Setting executable permissions."
        chmod +x "$MENU_FILE_PATH"
        chmod +x "$DESKTOP_FILE_PATH"
        ;;
esac
echo "✅ Both shortcuts are now ready to launch."
echo ""
echo "🎉 Installation complete! You can now launch GeForce NOW from your desktop OR your application menu."
echo ""
echo "ℹ️  NOTE: To uninstall, you can delete the application and manually remove the files added by this script with:"
echo "   flatpak uninstall --user com.nvidia.geforcenow"
echo "   sudo rm '$SUDOERS_FILE'"
echo "   rm '$LAUNCHER_SCRIPT_PATH' '$MENU_FILE_PATH' '$DESKTOP_FILE_PATH'"```

@d4vid1
Copy link
Copy Markdown

d4vid1 commented Jan 3, 2026

Hi guys, installed GeforceNow from here ubuntu but i cannot start a game. become Network Test window and it say that i can not connect to the nvidia server, and iam Change Streaming Quality Mode to Custom already, but that doesn’t help.
What can i do to skip that Network Test Window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment