While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Fedora KDE gets approval to be upgraded to sit alongside Fedora Workstation
- Steam gets new tools for game devs to offer players version switching in-game
- GOG launch their Preservation Program to make games live forever with a hundred classics being 're-released'
- Sony say their PSN account requirement on PC is so you can enjoy their games 'safely'
- AYANEO 3 now officially announced with AMD Ryzen AI 9 HX 370 and HDR OLED
- > See more over 30 days here
-
Hybrid gaming controller MoveMaster has a new website, …
- Ehvis -
Hybrid gaming controller MoveMaster has a new website, …
- Romlok -
Hybrid gaming controller MoveMaster has a new website, …
- grigi -
Avowed from Obsidian gets a release date, and pre-order…
- scaine -
Avowed from Obsidian gets a release date, and pre-order…
- Ehvis - > See more comments
- What do you want to see on GamingOnLinux?
- Ehvis - Steam and offline gaming
- missingno - Does Sinden Lightgun work?
- helloCLD - No more posting on X / Twitter
- Liam Dawe - Weekend Players' Club 10/11/2024
- Pengling - See more posts
View PC info
Now, I've never truly had a mind to test whether that was the case on any of my systems and I probably wouldn't care to fix it either if that was the case, but after noticing the thread on reddit (yeah, don't judge by by the way, it's only 2 linux subreddits :P) I got anxious and decided to write a fix for it, so [here](http://hastebin.com/ohidagulap.vhdl)'s my script for anyone that might possibly need it.
How it works: It's basically a while loop checking whether the inactivity time of the user in the current Xsession exceeds a set amount of milliseconds (which can be easily modified to suit the user's needs in the beginning of the file among other settings). If that's the case it will set the steam user's status to Away using steam's protocol. When the Xsession wakes up it will set the status back to Online.
There's a sleep delay (in seconds) in the end of the loop included in order to minimize system usage due to countless useless repetitions of the loop. You could modify it to whatever you like, just make sure it's lower than the inactivity setting value and not too big either (if the while loop isn't repeating fast enough it will also increase the delay between your getting back to the desktop and your steam status being set back to Online), default value is 15 (secs). Additionally, the script will check whether there's an instance of steam running before it tries to do anything so steam won't automagically launch on its own (cause it likes to launch itself whether the action recuested justifies it or not...).
There's a status flag variable meant to deter the script from repetitively setting the same setting while there's no alteration in the user's activity in the x session.
In order for the script to work you should have a version of xprintidle installed. One that's not bundled with a while loop and outputting to stdout that is... had some bad lack with downstream in gentoo (wirelay overlay). xprintidle's upstream is dead so those things happen... Well, if executing xprintidle returns a single int value you should be good to go.
The script is a config/executable hybrid since there's not enough variations of the desired outcome to justify a separate config file or shell parameter arguments, meaning that there are 2 (actually 3) things you might have a mind to change in the script without modifying it and they're both defined as variables in the top of the file. Just place it somewhere, chmod +x it and launch it on startup through a startup script file or however you wish.
I'd appreciate any feedback regarding it :)
edit: While the script is only meant to switch steam's status to the appropriate mode, by default, it could easily be modified to include other cron-like jobs based on a single Xsession inactivity status.
This is precisely why I'm utilizing a flag, executing an if/else block bundled with everything on each repetion would be both resource consuming and problematic for a lot of cases.
View PC info
Cool! I didn't know this was a thing, but at least we've fixed the thing that I didn't know was a thing! :)
View PC info
Couldn't agree more, though it's usually both easier and less frustrating to fix the cause of your issue than argue regarding the issues of others, including whatever mental disorders they might "feature".
View PC info
The away mode is working fine but it doesnt bring me back to online mode when I start typing on my computer...
EDIT:
ok got it, the script kicks me out when it put me on away status
some requests :
1. can you make it infinite loop ?
2. if I am idle for X Minutes put me away but if I am idle 2*X minutes put me offline
3. if I use the keyboard again or mouse put me online.
or
4. Popup a window to ask me if I want to put steam Online.
5. Systray Icon with right click options to setup Mins etc a
I know I am asking a lot but since I fall asleep last night and got like a flood of msgs from my friends I understand the importance of this script :P
Thanks!
View PC info
View PC info
You confused me, how does it kick you out? Does steam log you out of it or does it crash?
The script should set your status back to online as soon as the else block underneath xprintidle > MAXIDLE is executed, however as already documented in the script a big LOOP_DELAY value won't just omit unnecessary repetitions when it comes to setting your user status to Away but it will also increase the time before the script is aware of your coming back.
Technically speaking, in order for the execution of anything inside the else block where your user is set to Online the while loop must be repeated and before this can happen the delay must be over. What is your current LOOP_DELAY setting inside the script? Is it the default one (15)? Are you sure it's not setting you to online after 15 secs? You could lower the delay if you need the script to realize you're back earlier. We can try debugging it further if none of these helped.
1. it is an infinite loop
2. will work on this
3. already the case, see above
4. might implement this at some point but can't promise anything at this point
5. same with 4, if there's need for extending the script I'll start working on it further and upload it to github
View PC info
hmm maybe whatever you have as "steam" in your path is a modified downstream/custom launcher script?
As long as it calls steam and passes its own arguments (append $@) to it you should be fine.
Try launching steam and then run this: steam steam://friends/status/away
Does executing the above manually still crash steam for you? does it set you to Away?
I'll ping you on freenode.
View PC info
for example
exec steam steam://friends/status/online >/dev/null
Replaced with
steam steam://friends/status/online >/dev/null
View PC info
exec was kicking me out of script and also crashing steam :)