You are not logged in.

#1 2024-08-04 19:35:00

davidgordiienko
Member
Registered: 2024-08-04
Posts: 3

Can't add environment variables to CurseForge Minecraft executable

I don't know if this is the right place to ask this question, but I searched online and couldn't find answers anywhere else. For context, I am using KDE Plasma and I'm editing all the .desktop files entirely through the GUI. I followed the instructions on the Arch Wiki and successfully got Minecraft to use my Nvidia graphics card instead of the integrated graphics by adding an environment variable (DRI_PRIME=1) to the Minecraft Launcher .desktop file. So I tried making a .desktop file to the CurseForge AppImage by right clicking on my desktop, clicking "Link to application," and selecting the CurseForge .AppImage file. Then, I added the environment variable DRI_PRIME=1. Launching CurseForge through the .desktop file worked, but for some reason when it launched Minecraft, it didn't use my graphics card and instead used the integrated graphics. I'm thinking that behind the scenes, CurseForge is actually using the Minecraft Launcher, meaning that to get Minecraft to use my graphics card, I need to find the second Minecraft Launcher's .desktop file and change the environment variable for that instead. So I launched CurseForge and opened the folder for my instance. This made it easier for me to find and navigate to /home/david/Documents/curseforge/minecraft/Install. I scrolled down until I found a minecraft-launcher file. Except in the properties it said "executable" instead of .desktop, and wouldn't let me add environment variables because there was no Application tab. Can I edit this file and add environment variables, such as DRI_PRIME=1, to it, or is that impossible?

Offline

#2 2024-08-04 20:01:08

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,055
Website

Re: Can't add environment variables to CurseForge Minecraft executable

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2024-08-05 10:05:10

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,370

Re: Can't add environment variables to CurseForge Minecraft executable

https://wiki.archlinux.org/title/Desktop_entries

.desktop files never call other .desktop files.

Each .desktop file must have an Exec= line that tells the system what command needs to be executed to start the application .

You will have to figure out how to convince curseforge to use dri_prime  with minecraft .
That is the command you want to use in the desktop file for curseforge.

Are you using https://aur.archlinux.org/packages/curseforge ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2024-08-05 12:27:41

davidgordiienko
Member
Registered: 2024-08-04
Posts: 3

Re: Can't add environment variables to CurseForge Minecraft executable

No, I downloaded a .zip file from https://www.curseforge.com/download/app. Would you recommend using the AUR instead though?

Offline

#5 2024-08-06 10:09:18

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,370

Re: Can't add environment variables to CurseForge Minecraft executable

In this case that won't help .

Curseforge is not a minecraft launcher, but a tool to manage addon collections for many gaems and and start them with such  a collection .
It focuses on windows and while supporting Mac OS & linux, those versions have less functionality .

While environment variables do exist on those other OSes, they tend to be used a lot less then on linux.
If they have an option for users to custimize a start command directly, it may work to change that.

I'm thinking that behind the scenes, CurseForge is actually using the Minecraft Launcher,

They are clearly starting minecraft in some way.
In case you can figure out which executable they start, there are tricks (like aliases) that can be used to change what is run.

This won't be easy , your best chance is probably to ask de curseforge developers / users for help.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2025-09-07 19:41:50

milan1miki
Member
Registered: 2025-09-07
Posts: 1

Re: Can't add environment variables to CurseForge Minecraft executable

Hi, I have the same issue, any chance you found a solution?

Offline

#7 2025-09-08 06:15:41

StarWolf3000
Member
Registered: 2025-06-23
Posts: 32

Re: Can't add environment variables to CurseForge Minecraft executable

milan1miki wrote:

Hi, I have the same issue, any chance you found a solution?

There is a better solution than using Curseforge Launcher: use Prism Launcher

The packages on main and AUR are all out-of-date though, but there is a thirdparty user repository on Chaotic-AUR which provides a more recent Git build.

With Prism Launcher you can have both global and per instance environment variables, and it also provides options to make it run on a dedicated than the primary GPU. Also it runs way faster, since it doesn't use Electron under the hood.

Last edited by StarWolf3000 (2025-09-08 06:24:28)


Mainboard: GIGABYTE B550 AORUS ELITE V2 | CPU: Ryzen 7 5800X | RAM: 32 GB
GPU: GeForce RTX 4060 8 GB (575.64.05 proprietary) | Display: BenQ BL2405 1920x1080
Kernel: 6.15.9 stable | Boot Manager: GRUB2 | DE: KDE Plasma | Login Manager: SDDM | Window Manager: KWin (Wayland)

Offline

#8 2025-09-08 09:17:24

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,370

Re: Can't add environment variables to CurseForge Minecraft executable

OP hasn't been back since august last year so won't see this.

Closing this thread.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB