Giter Club home page Giter Club logo

Comments (10)

Nadonate avatar Nadonate commented on July 23, 2024

...disregard. I found a solution

editing the kodi-openbox-runprogram.real script to force kodi closed seems to work

kodi forums solution post

from kodi-openbox.

lufinkey avatar lufinkey commented on July 23, 2024

Do you mind posting the change you made to the script, in case others have the same issue?

from kodi-openbox.

lufinkey avatar lufinkey commented on July 23, 2024

@Nadonate I think I encountered this issue as well, actually. When you launch steam via command, the command exits and steam is launched, rather than the command running until steam exits. If there is some way to keep the command running until steam exits, this will probably fix your issue of a second kodi window popping up.

from kodi-openbox.

Nadonate avatar Nadonate commented on July 23, 2024

(sorry for the late response!)

Thanks for the response! I'm still trying to troubleshoot this...

I've edited your runs script based on forum feedback I posted earlier.

I believe this is a less elegent approach, but it works:

#!/bin/bash
mkdir -p ~/.kodi-openbox
mkdir -p ~/.kodi-openbox/tmp
display=$(echo "${DISPLAY}" | tr ':' '_')
echo $$ > ~/.kodi-openbox/tmp/program-running.$display
kpid=$(cat ~/.kodi-openbox/tmp/session-pid.$display)
echo "closing kodi"
ps axf | grep kodi.bin | grep -v grep | awk '{print "kill -9 " $1}' | sh
echo "running program"
eval "$@"
eval_result=$?
echo "finished running program"
exit $eval_result

The issue I am having now, is when steam is launched kodi is not killed and stays running in the background (I can alt-tab between the two)

from kodi-openbox.

Nadonate avatar Nadonate commented on July 23, 2024

Ok, I think I found a solution, for my situation atleast.

I added this line to your script:

ps -ef | grep kodi-x11 | grep -v grep | awk '{print $2}' | xargs kill

This should find and close the PID associated with 'kodi-x11'. In testing it works and your script reopens kodi in the openbox session.

I'm not super experienced with scripting, and there is probably a better way to do this, but I'm happy with the result ;).

Thanks again for your work on kodi-openbox, its been perfect in helping me acheive a great HTPC setup! Closing this ticket.

from kodi-openbox.

lufinkey avatar lufinkey commented on July 23, 2024

@Nadonate do you mind running Kodi and giving me the path that it's running from? I have a bunch of specific "kodi" commands the script runs through and if it doesn't find the exact path to kodi it just runs the command kodi, which is an issue because this isn't the true kodi executable. Its a shell script that runs the true kodi executable.

I think I usually run into a similar issue when it falls back to the kodi command and that might be the cause, since you're having to manually kill something called kodi-x11

from kodi-openbox.

Nadonate avatar Nadonate commented on July 23, 2024

/usr/lib/x86_64-linux-gnu/kodi/kodi-x11

from kodi-openbox.

lufinkey avatar lufinkey commented on July 23, 2024

Sorry for the late response but do you mind reverting your changes and trying to add this code to line 95 of kodi-openbox-session?

elif [ -f /usr/lib/x86_64-linux-gnu/kodi/kodi-x11 ]
then
	/usr/lib/x86_64-linux-gnu/kodi/kodi-x11 &
	kpid=$!

I think this should solve your problem

from kodi-openbox.

Nadonate avatar Nadonate commented on July 23, 2024

Ok, got around to trying this:

  1. Reverted changes made to kodi-openbox-runprogram.real (luckily I backed up the origional)

  2. Added your suggestion to line 95 of kodi-openbox-session

kodi-OB-edit

Happy to report the changes worked! Everything functions as expeceted; kodi closes, external app launches... when the app closes kodi is resumed.

Thanks for your help!

from kodi-openbox.

lufinkey avatar lufinkey commented on July 23, 2024

Hell yeah! I'll add this to the official code and close this out once I do

from kodi-openbox.

Related Issues (3)

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.