Steam for Linux

Steam for Linux

Darke May 27, 2020 @ 1:03pm
Steam Scaling & The GDK_SCALE=2 Mystery-SOLVED
Hey guys, new Linux guy here back with a problem I'm hitting a wall with. I tried to hold off on posting this, doing research on the issue. Alas, I'm lacking a solid answer which I'm guessing (hoping?) someone could give me in less than 30 seconds.

So I'm running PopOS 20.04 using GNOME on a 4k widescreen display. Steam does not scale upwards like other stuff in the OS (a GNOME thing I read). Research says to set an 'env variable' or 'pass' to Steam the GDK_SCALE=2 setting. The problem I have is 'how' to do that-I haven't found a clear answer on that yet.

I've seen how it can be done in Terminal, but then I'd have to open a window and run the command just to run Steam. That gets old quick and I shouldn't have to do that (least not in PopOS or most Distros for that matter).

I've seen an example like..."export GDK_SCALE=2 & flatpak run com.valvesoftware.Steam" which I think only works for Flatpacks (Have the Debian install). For yuks, I tried it anyway and of course, it didn't work.

I posted this on the Linux_noob forum on Reddit and a user there was telling me to add Exec env GDK_SCALE=2 to the steam.desktop file but that didn't work and I never heard back from him. :(

So would anyone mind telling this noob how I set the GDK_SCALE=2 variable for Steam? Is it a different config file somewhere I can edit or something I need to write up.

Thanks in advance...

AD

NEW EDIT: Jason says this is the new, better way

steam -forcedesktopscaling 1.5

OLD EDIT: The workaround for my issue was writing a desktop file written by Cat on Linux and modified by Engie Cat. I used Alacarte suggested by Houtworm to add the desktop shortcut to the GNOME program menu. Also had help from Jason, Marlock and WarnerCk. Read the thread below for the gritty details! :)
Last edited by Darke; Jul 8, 2023 @ 2:43am
< >
Showing 1-15 of 56 comments
Houtworm May 27, 2020 @ 1:05pm 
Hey, The easiest way is probably by installing Alacarte, Here you can find the menu entry for Steam and just edit the command :)

Zyro May 27, 2020 @ 1:11pm 
export GDK_SCALE=2 & steam

... or just...

GDK_SCALE=2 steam

... are worth a try. Can't test the moment.
Last edited by Zyro; May 27, 2020 @ 1:12pm
Cat on Linux May 27, 2020 @ 1:35pm 
you can create desktop shortcut with that command, something like this, create steam-scaled.desktop file in your /home/Desktop/ folder, give it similar content

[Desktop Entry] Name=Steam Exec=env GDK_SCALE=2 steam Type=Application StartupNotify=true Path=/home/USER/.steam Icon=10B4_steam.0 StartupWMClass=steam Name[en_US]=Steam

pay attention to path line, you'll need to edit it to point to your actual steam folder.
Last edited by Cat on Linux; May 27, 2020 @ 1:42pm
Darke May 27, 2020 @ 3:24pm 
Originally posted by Houtworm:
Hey, The easiest way is probably by installing Alacarte, Here you can find the menu entry for Steam and just edit the command :)

First time I've heard of Alacarte. Sounds like the ticket! Many Thanks!
Darke May 27, 2020 @ 3:26pm 
Originally posted by Zyro:
export GDK_SCALE=2 & steam

... or just...

GDK_SCALE=2 steam

... are worth a try. Can't test the moment.

is this a terminal command? I run the second line which boots steam up to proper levels but requires the opening terminal step first. If I run the first line, will that keep every time I run Steam without the terminal?
Darke May 27, 2020 @ 3:28pm 
Originally posted by Cat on Linux:
you can create desktop shortcut with that command, something like this, create steam-scaled.desktop file in your /home/Desktop/ folder, give it similar content

[Desktop Entry] Name=Steam Exec=env GDK_SCALE=2 steam Type=Application StartupNotify=true Path=/home/USER/.steam Icon=10B4_steam.0 StartupWMClass=steam Name[en_US]=Steam

pay attention to path line, you'll need to edit it to point to your actual steam folder.

This is the stuff I'm brandy new at. I'm use to editing a Windows shortcut, never bothering to think of creating a new one. I'll give that a shot. Thanks!
Houtworm May 27, 2020 @ 3:41pm 
Originally posted by Darke:
Originally posted by Houtworm:
Hey, The easiest way is probably by installing Alacarte, Here you can find the menu entry for Steam and just edit the command :)

First time I've heard of Alacarte. Sounds like the ticket! Many Thanks!

No problem, You can enter the terminal commands from above in Alacarte, So you don't need to launch the terminal first :) You just edit the command the computer executes when you open Steam the normal way.
WarnerCK May 27, 2020 @ 4:04pm 
Originally posted by Darke:
This is the stuff I'm brandy new at. I'm use to editing a Windows shortcut, never bothering to think of creating a new one. I'll give that a shot. Thanks!
All the application launchers - in the menu, on the desktop, on the panel, wherever - are just text files. There are graphical tools, like alacarte, to automatically make copies in your home directory so you can edit them and make it more discoverable that you can change things, but it's only text files really.
Darke May 28, 2020 @ 2:14pm 
So I tried nearly every suggestion on here....sadly, I couldn't get any of them to work :(

I went with Houtworm's suggestion and tried Alacarte first (easiest) Found the Steam shortcut with the command "usr/games/steam %U". So I added the Exec=env GDK_SCALE=2 Steam right after that. Didn't work. So I tried it before the %U bit-also didn't work. Then I tried leaving out the 'Exec=' bit. Didn't work. It certainly wouldn't let me add it at the beginning. No clue what I'm doing wrong here.

Next, I made the desktop shortcut. I pretty much copied/pasted the file you wrote Cat but I changed the path to what Alacarte showed me (usr/games/steam %U). Placed the contents in the right folder and it showed up on the desktop as a text file. In properties, I set it as 'executable' and set it to 'allow launching'. Icon changed from a document to a CRT with a red slash on it and no amount of clicking on it would do anything. Was making the file in a text editor the wrong app to use?

So I know I've made progress here but obviously I'm missing something. I have the right command and I know where it has to go but I'm doing something wrong. Clue for the clueless?

Thanks again,
Last edited by Darke; May 28, 2020 @ 2:15pm
jason May 28, 2020 @ 2:35pm 
Do you even need to set it at all as you actually have a 4k screen? I know I don't.

Steam > settings > Interface > [x] Enlarge text and icons based on monitor size.
Reverse Module May 28, 2020 @ 2:46pm 
What are you trying to do? I'm on a 4K screen and Steam displays just fine. I would second jason on his suggestion. :D
Darke May 28, 2020 @ 5:16pm 
Originally posted by jason:
Do you even need to set it at all as you actually have a 4k screen? I know I don't.

Steam > settings > Interface > [x] Enlarge text and icons based on monitor size.

Yes I do. I run at 3840 by 1600 and the text is very small. Also it's a curved wide-screen. You should see what Lutris wine dialog boxes look like! (hint, you need to put your face to the screen).

Gnome upscales everything else fine. Steam is just a stubborn asshat for me on this issue. :steamsad:
Cat on Linux May 28, 2020 @ 5:21pm 
Originally posted by Darke:
In properties, I set it as 'executable' and set it to 'allow launching'. Icon changed from a document to a CRT with a red slash on it and no amount of clicking on it would do anything. Was making the file in a text editor the wrong app to use?

recheck that file permissions. it should be executable for everyone, owner/group not root (should be your user). using text editor is what you had to do, there's no other way to create simple text files.
Last edited by Cat on Linux; May 28, 2020 @ 5:22pm
WarnerCK May 28, 2020 @ 6:34pm 
Originally posted by Darke:
I went with Houtworm's suggestion and tried Alacarte first (easiest) Found the Steam shortcut with the command "usr/games/steam %U". So I added the Exec=env GDK_SCALE=2 Steam right after that. Didn't work. So I tried it before the %U bit-also didn't work. Then I tried leaving out the 'Exec=' bit. Didn't work. It certainly wouldn't let me add it at the beginning. No clue what I'm doing wrong here.

It wouldn't be usr/games/steam. It could be /usr/bin/steam, or /usr/games/steam, but not usr/games/steam. Just steam would likely work, too.
jason May 28, 2020 @ 7:10pm 
I thought a 4k widescreen would be 4k, silly me. On an actual 4k screen it is enabled if that setting is checked.

Anyway, your .desktop file should say

Exec=GDK_SCALE=2 /usr/bin/steam %U

No env, export or any of that nonsense. If steam isn't actually in /usr/bin then use what was there originally.
< >
Showing 1-15 of 56 comments
Per page: 1530 50