Restart Steam from Terminal or Bash Script
Hello
How to shut down and restart Steam using the Linux terminal? Or better yet, how to restart Steam using a single command (if such a command exists)?
I’m not sure if this is an issue on my end or a bug in Steam, but when I execute:
pkill '^steam$'
or
steam -shutdown
these commands not only close Steam but also log me out of my KDE session.

I’m using Kubuntu 24.04
Plasma 5.27
QT 5.15
Kernel 6.8.0
< >
Сообщения 15 из 5
The problem is that Steam launches a large collection of processes, and all of these will have to be killed to make it perform a clean shutdown.

And running `pkill steam` is just iffy, it causes Steam to behave weird while all these processes are still running before they eventually shut down.

But I do not understand why it is killing your KDE session. It shouldn't do this, unless shutting down Steam crashes it somehow.
Отредактировано Omega; 24 июн. 2024 г. в 22:58
for windows use a batch script
restartsteam.bat
"..\games\steam\steam.exe" -shutdown echo wait 60sec timeout 60 start ..\games\steam\steam.exe

im sure something similar can work in linux
Отредактировано _I_; 25 июн. 2024 г. в 5:51
Install Steam via flatpak instead of the system package manager so it's containerized.

Then you can shut it all down with flatpak kill com.valvesoftware.Steam.

Start it with: xdg-open steam://open/games or in BPM: xdg-open steam://open/bigpicture.

Depending on where you intend to put the command you can chain multiple commands into one with a semicolon (command1; command2), or a shell invocation (sh -c "command1; command2") or another way.
Отредактировано Zygfryd; 24 июн. 2024 г. в 23:26
shutdown is typo'd

but yeah lol
< >
Сообщения 15 из 5
Показывать на странице: 1530 50

Дата создания: 24 июн. 2024 г. в 22:33
Сообщений: 5