#need help automating GSK_RENDERER=gl to run when opening minecraft

146 messages · Page 1 of 1 (latest)

edgy matrix
#

Im on fedora workstation

#

[Desktop Entry]
Type=Application
Name=TLauncher
GenericName=TLauncher
Comment=TLauncher
Icon=/home/l_l/GOG Games/Terraria/support/icon2.png
Exec=java -jar TLauncher.jar
Categories=Game;
Path=/home/l_l

#

this is my minecraft.dekstop file rn

prisma hawk
#

hmmpepe tlauncher

edgy matrix
prisma hawk
#

You'll need to create a new script
Call it something like minecraft.sh

#

Place it somewhere and take note of that

#

Add the commands you ran earlier in it

edgy matrix
#

done

prisma hawk
#

And add java -jar path/to/TLauncher.jar
I don't know the exact path so you'll have to search for it

edgy matrix
#

its in /home

prisma hawk
#

Then replace the exec line in the desktop entry with exec=/home/your_user_name/minecraft.sh

#

And test it

#

Its /home/l_l
I read?

edgy matrix
#

yeah

#

dont i need java-jar TLauncher.jar to be a exec?

prisma hawk
edgy matrix
#

2 exec at once?

prisma hawk
#

And it's not tlauncher anymore, it's the full path to that jar

prisma hawk
edgy matrix
prisma hawk
prisma hawk
edgy matrix
#

both jar and the .sh file

prisma hawk
#

Do you have TLauncher.jar as a file in /home/l_l ?

edgy matrix
prisma hawk
#

Oh then you add
java -jar /home/l_l/TLauncher.jar to the end of minecraft.sh

edgy matrix
prisma hawk
edgy matrix
prisma hawk
#

And just keep the first part in the exec

prisma hawk
edgy matrix
prisma hawk
#

Yeah, give it a chmod +x and try to run it

edgy matrix
prisma hawk
#

chmod +x ~/minecraft.sh
Run that in a terminal

edgy matrix
#

ok t launcher opend

#

i mean minecraft*

prisma hawk
#

Nice that's it

prisma hawk
edgy matrix
#

100% no piracy

leme restart and test it again to see if it works

edgy matrix
#

leme manually do that cmd and try again

prisma hawk
#

You might to need to change that to
export GSK_RENDERER=gl

edgy matrix
#

i have to exec that cmd in terminal?

prisma hawk
#

Replace the line in the Minecraft script

#

_or just append export to the beginning _

#

Ah btw
Before doing that

#

Can you run echo $GSK_RENDERER

#

And tell me what it says

edgy matrix
#

this works?

#

it says ngl

prisma hawk
prisma hawk
edgy matrix
#

oh wait sorry i forgot to use dedicated gpu when opening this time

prisma hawk
#

Oh

edgy matrix
#

forgot i had to manually do that

prisma hawk
#

Btw it says ngl but the script only sets it to gl
Did you by any chance run the GSK command manually without using the script?

edgy matrix
#

works now

edgy matrix
#

after i was getting 20fps

prisma hawk
edgy matrix
prisma hawk
#

ah you could also just log out and back in

edgy matrix
prisma hawk
#

Mkk

edgy matrix
#

Exec=/home/l_l/minecraft.sh

prisma hawk
#

?

edgy matrix
#

nothing, i just thought minecraft wassent appearing in the menu but it was there

prisma hawk
#

Ah

edgy matrix
#

i had Exec=exec= set in the .dekstop so maybye thats why it didint work

prisma hawk
#

Owh yeah that's why

edgy matrix
#

opennd with igpu again, reopning with dedicated

prisma hawk
#

:3

edgy matrix
#

9fps :D

prisma hawk
#

9?

edgy matrix
#

yeah

prisma hawk
#

then...

edgy matrix
#

i dont think its setting the thing unless i do it manually

#

leme check again now that i set it manually

prisma hawk
#

Change the first line to only:
GSK_RENDERER=ngl

edgy matrix
#

wait let me check gl if it has bad performence il check ngl then change line

prisma hawk
edgy matrix
prisma hawk
prisma hawk
edgy matrix
#

then laptop shutted down randomly

#

laptops tweaking fr, went from 21 to 32 to 42% battery

prisma hawk
#

Ah...
Let's set it to ngl and hope that never happens again :3

prisma hawk
edgy matrix
#

this is fine?

prisma hawk
#

Yep

edgy matrix
prisma hawk
#

Run the game, it's okay if you quit immediately then check the output of echo

prisma hawk
edgy matrix
#

my laptops so fucked omg, broken from 4 places has a random hole in it hinge protector is broken thers a white spot in the corner of the display lmao

#

and its 6 year old and the thermal paste is probably gone by now

prisma hawk
#

:'3

edgy matrix
#

opening mc

#

i dont think its registering

prisma hawk
#

Ah.. one sec

edgy matrix
#

9fps

#

my dream of sleeping before 1am will always remain a dream

#

wait, if other stuff works fine with ngl il just do this

#

uh @prisma hawk thanks for the help so far but i dont think i need anymore help

#

il just resort to usinng the cmd manually everytime

prisma hawk
#

We can try one more thing

edgy matrix
#

i would have to restart everytime i finish playing mc anyways

edgy matrix
prisma hawk
#

What text editor are you using?

edgy matrix
prisma hawk
#

You know how to use nano?

edgy matrix
#

neko lets stop, i would be fine with manually using it too

edgy matrix
prisma hawk
#

It's ok 5 mins

prisma hawk
#

What does it contain?

edgy matrix
#

oh setting it there?

prisma hawk
edgy matrix
edgy matrix
prisma hawk
edgy matrix
#

other apps dont work so great with ngl

#

so i cant really set it to be at ngl since the moment i boot

prisma hawk
# edgy matrix

Just type the GSR command inside here same way it's in the script at the moment
Then ctrl+s to save and then ctrl+x to exit

prisma hawk
edgy matrix
#

sorry for wasting so much of ur time

#

its 1am i havent slept sinec 3 days properly

#

every night im fixing some issue in linux

prisma hawk
#

If you wanna continue tomorrow I don't mind
You can use the export command but in a different way, I'll walk you through it tomorrow

edgy matrix
#

alright, thanks

#

im gonna go sleep now

prisma hawk
#

Okk good night

#

Leaving this for you when you wake up

#

In your minecraft.sh script run write this

#!/bin/bash

export GSK_RENDERER=ngl
echo "The current rendering backend is set to:"
echo $GSK_RENDERER
java -jar /home/l_l/TLauncher.jar
#

This will only export the variable in the script
So you won't be able to see it with echo

But to test it open a terminal and run the minecraft script manually just for test's sake using ./minecraft.sh it should show in the terminal that it's using ngl
Minecraft then will be using ngl
So after you make sure it's doing it correctly you can start it normally

edgy matrix
#

im gonna change back to mint

#

and see the screen tearing fix stunner posted

#

or i will move full time to windows, i cant be staying u ptill 3am everyday fixing issues only

prisma hawk
#

Alrighty then wish you luck