LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to continue to run a program after logging off ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-continue-to-run-a-program-after-logging-off-686280/)

nkd 11-26-2008 04:54 AM

how to continue to run a program after logging off ?
 
I am using fedora on my laptop.
I wish to run transmission client even when I am not logged in. Actually, I have a broadband connection, but when I am not on desk I log off using Ctrl+Backspace. But this makes transmission stop. I want transmission to continue even after I logout, since the system continues running.
I tried
nohup transmission-gtk &
and
( transmission-gtk &)
They didnot work ?!?
any other way? By the way, I donot want to put it in a startup script.
thanks in advance
nishith

acid_kewpie 11-26-2008 05:07 AM

that's not possible as the app will be connected to the X server display. so with no X session, all apps under it have to die. nohup or no nohup. you might want to spawn a seperate vnc server session to run it inside...?

rikijpn 11-26-2008 05:20 AM

how about using the cli version?
 
If you just want to log out the GUI but don't mind having a non-GUI session open, then you could use getty (press CTRL-ALT-F1, probably F7 to get back to X) login, and use the cli version of the transmission client (or some other command line torrent client).
You'd still be logged in though...
Another thing you could do is use cron or at and schedule the program (has to be command line). If you have your MTA correctly set you'd probably get an e-mail after the download is completed.

nidhinmd 11-26-2008 05:47 AM

Make a script and try to run with cron or atd

linuxlover.chaitanya 11-26-2008 06:00 AM

How would a script run a program that is GUI and with no X running?

ArfaSmif 11-26-2008 06:02 AM

Why not just lock your screen?

linuxlover.chaitanya 11-26-2008 06:14 AM

I guess root user is not allowed to lock the screen. I use rhel5 and it does not allow me lock the screen if I login as root.

GazL 11-26-2008 06:19 AM

I don't know whether fedora desktop login includes a switch user option, but that might do what you need. i.e. put you back to the login screen without terminating your session.

Failing that, as others have said, you could consider using a command line torrent program instead of transmission or if your only issue is security rather than allowing someone else to use the computer while your trasmission runs in the background you could just lock the screen.

edit: as a afterthought, if you don't want others to accidentally kill you transmission (if you choose the lock screen option), you might want to disable ctrl-alt-backspace too.

estabroo 11-26-2008 10:36 AM

As acid_kewpie already suggested the easiest thing to do is run it in a vnc server, it'll be completely independent of whether your logged in or not and you could actually connect to the vnc server and check on it remotely.

ArfaSmif 11-26-2008 07:18 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3355102)
I guess root user is not allowed to lock the screen. I use rhel5 and it does not allow me lock the screen if I login as root.

I wouldn't be logging in as root and running bit torrent clients. Log in as a normal user, become root, and run your program then. That way you can lock your screen.

jstephens84 11-26-2008 09:13 PM

Quote:

Originally Posted by acid_kewpie (Post 3355035)
that's not possible as the app will be connected to the X server display. so with no X session, all apps under it have to die. nohup or no nohup. you might want to spawn a seperate vnc server session to run it inside...?


Hey Acid_kewpie, What if he created a dummy user account the had a console set to false and use that login sort of as a way to control transmission in more of a service kind of like how httpd and mysqld and others do. I don't think it would work but that was all I could come up with.

nidhinmd 11-26-2008 11:19 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3355081)
How would a script run a program that is GUI and with no X running?

Easily run GUI programs with no X with the support of 'Xvfb'

nkd 11-28-2008 02:22 PM

seems like using the cli version of transmission through a script is the best option.
Quote:

Easily run GUI programs with no X with the support of 'Xvfb'
Shall try that out too...thanks
nishith


All times are GMT -5. The time now is 05:49 AM.