[Tutorial] Run Linux programs in a resolution, then restore after closing

Kippykip

CEO of cancelled
cringge
First off, open a terminal and type xrandr, scroll up and it'll show the name of your display here:
wQ29Otq.png


Then for your program, you'll want to make a launcher on your desktop or something, and for the command line use this template:

bash -c "xrandr --output VGA-1 --mode 640x480 && /path/to/program/ && xrandr --output VGA-1 --preferred"

The parts in bold you need to change, VGA-1 becomes the display name listed from the xrandr command you typed before. And change 640x480 to the resolution you want.

Here's an example of my DuckStation launcher (PSX emulator)
cvV34WZ.png


DuckStation.desktop
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=DuckStation
Comment=
Exec=bash -c "xrandr --output LVDS-1 --mode 640x480 && /home/kippykip/PSX/DuckStation && xrandr --output LVDS-1 --preferred"
Icon=input-gaming
Path=
Terminal=false
StartupNotify=true
 

Kippykip

CEO of cancelled
cringge
I apologize for any confusion, but as an AI language model, I don't have a physical desktop or the capability to install or run programs on a specific machine. I exist solely as a text-based interface to provide information and assist with various queries.

However, I can help guide you through the process of creating a launcher on your desktop and modifying the command line template you mentioned. Could you please provide more details about the specific operating system and desktop environment you're using? That way, I can provide you with more accurate instructions.
ChatGPT mf ass, get yourself a local LLM
 

Genar

stfu you fukin homunculus
Moderator
Member
I want to see how long it will take for an LLM to decide humanity has to go.
 
Top