Giter VIP home page Giter VIP logo

Comments (7)

erikthered avatar erikthered commented on August 17, 2024 1

I had a similar issue where this check would fail if I had an ssh session open, here's the example output from w -hs:

erikn    tty1     :0               33:37  lxqt-session
erikn    pts/0    192.168.1.104     1.00s w -sh
erikn    pts/1    192.168.1.104    28:53  less /home/erikn/.config/autostart/kodi.desktop

from teeedubb-xbmc-repo.

FlyingRatBull avatar FlyingRatBull commented on August 17, 2024 1

Is there a specific reason to set (and therefore potentially overwrite) the DISPLAY variable?
Maybe it would be appropriate to only set it when its not already set to a non empty value?

from teeedubb-xbmc-repo.

tcrass avatar tcrass commented on August 17, 2024 1

Hi,

Is there a specific reason to set (and therefore potentially overwrite) the DISPLAY variable?
Maybe it would be appropriate to only set it when its not already set to a non empty value?

I agree -- yesterday (before stumbling over this issue report ;) I removed the whole DP=$(w -hs | awk '{print $3}') && export DISPLAY=$DP part from both ~/.kodi/addons/script.steam.launcher/resources/main.py and ~/.kodi/addons/script.steam.launcher/resources/scripts/steam-launch.sh (or its copy in ~/.kodi/userdata/addon_data/script.steam.launcher/scripts/steam-launch.sh, respectively) and -- tadaa! -- the steam launcher did work again! I reckon explicitly setting DISPLAY should rarely, if ever, be necessary since if the launcher gets launched from Kodi it should already be running in an X environment.

(BTW, changing the steam-launcher.sh script was necessary since otherwise the steam executable itself would complain about not being able to open the -- incorrectly set -- display.)

Here's what w -hs gave me when calling it from an xterm running in the same display as Kodi:

mythtv   tty1     -                39.00s xterm
mythtv   pts/0    2003:dd:f25:2d00  8:31  -bash
mythtv   pts/1    :0                7.00s w -hs

In this case, even FlyingRedBull's head -n 1 wouldn't be of any help...

Cheers --

Torsten

from teeedubb-xbmc-repo.

teeedubb avatar teeedubb commented on August 17, 2024

Thanks for reporting this and providiing feedback. This all came about because two fresh ubuntu 18.10 installs default to using :1 as the DISPLAY, and the script wouldnt run. I cant remeber why I originally set the DISPLAY variable in the script, but removing it allows it to launch on my machine too.

I'll update the script in the repo. Thanks

from teeedubb-xbmc-repo.

teeedubb avatar teeedubb commented on August 17, 2024

OK, should be all fixed in the latest version.

from teeedubb-xbmc-repo.

racer290 avatar racer290 commented on August 17, 2024

I have encountered a similar problem on Manjaro KDE where the default.py script queries for windows. The output of w -hs does not contain the DISPLAY, which makes wmctrl -l fail because DISPLAY is incorrectly set. The script fails with an error message at that point and Steam will start. I have fixed this issue on my system by replacing $DPwith :0, but that's not a very portable solution.

from teeedubb-xbmc-repo.

teeedubb avatar teeedubb commented on August 17, 2024

Hi,

Sorry about the late reply.
I am going to target and test against the Linux OS recommended by Steam, which currently is Ubuntu LTS. One of Linux's strength is also its weakness and I dont have the time or resources to test against all distros out there and the addon allows for customisation of scripts to suit each system.

Though in saying that, I am more than happy to merge a better solution which allows for greater compatibility amongst distros.

from teeedubb-xbmc-repo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.