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.

@InCaseOf
Copy link
Copy Markdown

InCaseOf commented Oct 30, 2025

Fixed, ended up doing flatseal to make it easier for my dumbass, got it to work with the script going around on my intel igpu since I think the nvidia one was giving me issues... Here is what I had to do, the blue hazard symbols...

Thanks yall for your hard work on this!

image image image

@garbma
Copy link
Copy Markdown

garbma commented Oct 31, 2025

Hello,

I've been following this thread from the beginning while also doing my own tests when I had some time.

The community's effort in sharing information helped me create an easy-to-use install script to get 4K at 120 FPS with HDR on AMD and NVIDIA devices. You can find it here: https://gitlab.com/anthrgk/geforcenow-installer-linux

I haven't tested it with Intel hardware as I don't own an Intel-based PC. I hope you all can take it to the next step so more people can enjoy Geforce NOW on Linux.

I hope this helps.

Thank you

Hey mate, thanks for this. Can see the TV mode working perfectly. Installed on SteamOS on a personal steam machine but can't enable 120FPS. Only goes up to 90fps. Any recommendations?

@Hoempi
Copy link
Copy Markdown

Hoempi commented Oct 31, 2025

Just wanted to leave a big thank you for everyone who tinkered on this. Just resubscribed GFN the other day and had to boot my Windows instance for the first time in over a year. But after searching if the Steamdeck has GFN and if this can be used on other distributions I found this Gist. I guess, my Windows installation will be gone in the near future.

@Mezaya08
Copy link
Copy Markdown

Mezaya08 commented Oct 31, 2025

I got it working with an i5 6600U (Intel® HD Graphics 520) by setting the environment variable ANV_DEBUG=video-decode,video-encode as instructed at https://wiki.archlinux.org/title/Hardware_video_acceleration chapter 3.3 for configuring Vulkan video. I'm running Debian 13 KDE for what it's worth.

Quick way to try it out is to run env ANV_DEBUG=video-decode,video-encode flatpak run com.nvidia.geforcenow

I also had to set these usual overrides:

flatpak override --user --unset-env=MESA_LOADER_DRIVER_OVERRIDE com.nvidia.geforcenow
flatpak override --user --unset-env=VK_ICD_FILENAMES com.nvidia.geforcenow

1440p+ 120fps+ also working with @BasedTester's script.

I have an HD 510 (which can normally decode H265) I tried the same settings as you but the app closes and in the logs I have this:

[2025-10-31 11:16:13,481]=12:16:13=    INFO [VulkanPlatform.cpp] {979EB000} - Blocking H265 on Intel
[2025-10-31 11:16:13,481]=12:16:13=    INFO [Platform] {979EB000} - Transcoding not supported for 7680x4320
[2025-10-31 11:16:13,481]=12:16:13=    INFO [Platform] {979EB000} - Transcoding not supported for 5120x2880
...
[2025-10-31 11:16:13,482]=12:16:13=    INFO [Platform] {979EB000} - Transcoding not supported for 1024x768
[2025-10-31 11:16:13,482]=12:16:13=    INFO [Platform] {979EB000} - maxEncodeSetting supported : 0x0 
[2025-10-31 11:16:13,482]=12:16:13=   DEBUG [ModeSelectionUtil] {979EB000} - Exit prefetchDeviceCapabilityUtil
[2025-10-31 11:16:13,482]=12:16:13=   DEBUG [ModeSelectionUtil] {979EB000} - Exit onDisplayChanged

any idea why he can't find a viable resolution?

Edited: I solved my problem. I have a PC with 2 graphics cards: dedicated card (Nvidia 1030) and integrated card (HD 510). my system detects both cards but the lspci command only detected my dedicated card. I changed the first BIOS monitor from PCI Express to the integrated card. And now, my system also detects both cards,and Geforce Now hardware decodes the video stream on my HD 510.

@armeldemarsac92
Copy link
Copy Markdown

armeldemarsac92 commented Oct 31, 2025

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'"```

@anthrgk
Copy link
Copy Markdown

anthrgk commented Oct 31, 2025

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'"```

That's great! With your permission I added your script here:

https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/fedora

I suppose your Fedora version of the script could work for NVIDIA cards (if the GPU lines are modified accordingly) but I'm not uploading that because I'm not able to test it myself.

I prefer to only post scripts that either me or someone else tested successfully :)

@armeldemarsac92
Copy link
Copy Markdown

armeldemarsac92 commented Oct 31, 2025

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'"```

That's great! With your permission I added your script here:

https://gitlab.com/anthrgk/geforcenow-installer-linux/-/tree/main/fedora

I suppose your Fedora version of the script could work for NVIDIA cards (if the GPU lines are modified accordingly) but I'm not uploading that because I'm not able to test it myself.

I prefer to only post scripts that either me or someone else tested successfully :)

Perfect ! Feel free to add it to the collection. For the record I've been playing successfully the last 2h w my fedora GNOME laptop and integrated amd graphics. 4k 120fps HDR, no problem !

@Martwy022
Copy link
Copy Markdown

Hello,

I've been following this thread from the beginning while also doing my own tests when I had some time.

The community's effort in sharing information helped me create an easy-to-use install script to get 4K at 120 FPS with HDR on AMD and NVIDIA devices. You can find it here: https://gitlab.com/anthrgk/geforcenow-installer-linux

I haven't tested it with Intel hardware as I don't own an Intel-based PC. I hope you all can take it to the next step so more people can enjoy Geforce NOW on Linux.

I hope this helps.

Thank you

Can you use mouse wheel? Unfortunately, it doesn't work for me. I don't know if it matters, but I use Hyprland.

@dimadherdt
Copy link
Copy Markdown

dimadherdt commented Nov 1, 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

@twieland
Copy link
Copy Markdown

twieland commented Nov 2, 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?

@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'"

@anthrgk
Copy link
Copy Markdown

anthrgk commented Nov 4, 2025

Hello,
I've been following this thread from the beginning while also doing my own tests when I had some time.
The community's effort in sharing information helped me create an easy-to-use install script to get 4K at 120 FPS with HDR on AMD and NVIDIA devices. You can find it here: https://gitlab.com/anthrgk/geforcenow-installer-linux
I haven't tested it with Intel hardware as I don't own an Intel-based PC. I hope you all can take it to the next step so more people can enjoy Geforce NOW on Linux.
I hope this helps.
Thank you

Can you use mouse wheel? Unfortunately, it doesn't work for me. I don't know if it matters, but I use Hyprland.

I don't know, sorry. I don't play with mouse and keyboard so I don't even know what is the expected behavior if you use the mouse wheel in a game

@anthrgk
Copy link
Copy Markdown

anthrgk commented Nov 4, 2025

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

@Martwy022
Copy link
Copy Markdown

Hello,
I've been following this thread from the beginning while also doing my own tests when I had some time.
The community's effort in sharing information helped me create an easy-to-use install script to get 4K at 120 FPS with HDR on AMD and NVIDIA devices. You can find it here: https://gitlab.com/anthrgk/geforcenow-installer-linux
I haven't tested it with Intel hardware as I don't own an Intel-based PC. I hope you all can take it to the next step so more people can enjoy Geforce NOW on Linux.
I hope this helps.
Thank you

Can you use mouse wheel? Unfortunately, it doesn't work for me. I don't know if it matters, but I use Hyprland.

I don't know, sorry. I don't play with mouse and keyboard so I don't even know what is the expected behavior if you use the mouse wheel in a game

The mouse wheel allows you to zoom out/in on the map in games or simply scroll through settings list. I don't know what's causing it not to work. Another problem is that the mouse sensitivity in the game doesn't work, but that could be a problem with Flatpak or how Wayland works with such things. Everything works fine with the controller.
If anyone finds a solution, please let me know!

@Martwy022
Copy link
Copy Markdown

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

Yep, this worked! Using gamescope to run the flatpak with that flag fixes the issue, thanks! Something else popped up but it could be related to gamescope so I'll leave it out for now.

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

@samkar-codes
Copy link
Copy Markdown

samkar-codes commented Nov 7, 2025

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...

@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.

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