Jump to content

[KSP_1.4.*-ALL] KSP resolution fix and more for Linux


LatiMacciato

Recommended Posts

Hi folks, I hope you don't mind if I share a working script that sets a certain resolution in settings.cfg via bash (should work on mostly all Linux OS'es).

This is just a small snipped but I'm not sure where else to put that

Spoiler
Quote

#!/bin/bash

width=1920 # 1877
height=1080 # 1028
 
cd "/mnt/path_to_ksp" # mandatory, replace with your path
tmpFile="settings_temp.cfg"

echo "writing 'settings_backup.cfg'" && sleep 1s
cp "./settings.cfg" "./settings_backup.cfg"
cp "./settings.cfg" "./settings_temp.cfg"

sedParam='/SCREEN_RESOLUTION_WIDTH/ c\'"SCREEN_RESOLUTION_WIDTH = $width"
sed "$sedParam" "./settings_temp.cfg" > "./settings_new.cfg"
cp "./settings_new.cfg" "./settings_temp.cfg"

sedParam='/SCREEN_RESOLUTION_HEIGHT/ c\'"SCREEN_RESOLUTION_HEIGHT = $height"
sed "$sedParam" "./settings_temp.cfg" > "./settings_new.cfg"

cp "./settings_new.cfg" "./settings.cfg" && rm "./settings_temp.cfg" && rm "./settings_new.cfg"

 

Feedback is welcome!

Regards

EDIT: I have updated my shell script to start KSP make sure you read this info before something bad happens. You can grab the runKSP.sh here

Edited by LatiMacciato
updates, updates, updates ...
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...