Results 1 to 8 of 8

Thread: is there a nohup for flatpak apps

  1. #1
    Join Date
    May 2015
    Beans
    42

    is there a nohup for flatpak apps

    hi i control a ubuntu laptop running kodi and open it via a ssh command from my phone this all worked fine until i just upgraded to latest version which is now flatpak not apt but when i leave the app it closes kodi not very familiar with flatpak was wondering if anyone knew how to keep it running when oged in terminal closes

    old ccode which worked --
    ("export DISPLAY=:0\n"+"nohup "+"kodi"+"\n");

    new code with the flatpak which opens it but closes once i leave the app
    ("export DISPLAY=:0\n"+"nohup "+"flatpak run tv.kodi.Kodi"+"\n");

    i have tried
    ("export DISPLAY=:0\n"+"nohup "+"flatpak run tv.kodi.Kodi"+" nohup\n");
    still did not work





    Last edited by buill; June 11th, 2024 at 08:23 PM.

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: is there a nohup for flatpak apps

    I'm guessing, but have you tried the working code with a trailing "&"
    ie:
    Code:
    ("export DISPLAY=:0\n"+"nohup "+"flatpak run tv.kodi.Kodi"+"\n") &
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  3. #3
    Join Date
    May 2015
    Beans
    42

    Re: is there a nohup for flatpak apps

    thanks for reply im using java you cant end a statement with and like sudo apt update & sudo apt upgrade will make system try both at once sudo apt update && sudo apt upgrade will update then upgrade once finished you cant say & without giving an anoher command or condition i have been reading about disown cmd maybe that could be the solution

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: is there a nohup for flatpak apps

    I know just enough java to get me and you in trouble, so I'm stepping to the sideline.

    Good Luck though
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  5. #5
    Join Date
    Dec 2014
    Beans
    2,658

    Re: is there a nohup for flatpak apps

    Neither kodi nor 1fallen's use of '&' have anything to do with Java. A '&' at the end of a shell command makes the process run in the background. That's what happens in the example you give, apt update is run in the background and the shell proceeds to execute the next command, 'apt upgrade' which of course tries to use the same resources as the update command and therefore fails.
    'disown' might actually be an idea, especially with the option '-h' which basically does the same thing as nohup: it stops the shell from passing on the 'hangup' signal to this child process. So what I'd try:
    Code:
    DISPLAY=:0.0 flatpak run tv.kodi.Kodi &
    This should print two numbers, the first one in brackets is the job number the second is the process id. Now you can use
    Code:
    disown -h jobnumber
    (replace the obvious ...)

    Holger

  6. #6
    Join Date
    May 2024
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: is there a nohup for flatpak apps

    Use tmux, a program which lets you leave running terminal sessions open which you can connect and disconnect to.

  7. #7
    Join Date
    May 2015
    Beans
    42

    Re: is there a nohup for flatpak apps

    thanks for replys

    i tryed
    "export DISPLAY=:0\n"+"nohup "+"flatpak run tv.kodi.Kodi"+" disown -a \n nohup\n"
    but it still closes when the session neds

    it print

    export DISPLAY=:0
    19:56:19.643 I nohup flatpak run tv.kodi.Kodi disown -a
    19:56:19.643 I nohup
    19:56:19.643 I med1a@med1a-Lat:~$ export DISPLAY=:0
    19:56:19.643 I med1a@med1a-Lat:~$ nohup flatpak run tv.kodi.Kodi disown -a
    19:56:19.643 I nohup: ignoring input and appending output to 'nohup.out'

    but then kodi closes aaargh i like flatpak but would in this case would pref if i coucld just get a deb

  8. #8
    Join Date
    May 2015
    Beans
    42

    Re: is there a nohup for flatpak apps

    A HA
    "export DISPLAY=:0\n"+"nohup "+"flatpak run tv.kodi.Kodi"+"& disown -a \n nohup\n"

    i left out the & oops now she is working thanks so much for help and replys

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •