|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi, I am running rtorrent and I was wondering if it is possible for the
system to turn the program off at certain times, and turn it back on at other times. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG/XBRowvbDpiw8RERAkByAJ92UAAM8zt7r5LnQ3RXtcNJ0882oQC fZaa9 n6TfNEr0dDJGyx7jQ7NCejE= =hKO3 -----END PGP SIGNATURE----- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Fri, 28 Sep 2007 17:21:16 -0400
Peter Smerdon <psmerdon@magma.ca> wrote: > Sid Arth <sidster802@gmail.com> writes: > > > Hi, I am running rtorrent and I was wondering if it is possible for the > > system to turn the program off at certain times, and turn it back on at > > other times. > > You can probably use use `cron' to achieve this. I struggled for a while to figure out how to do exactly this, without success. I believe that cron does not work, since (at least some) ncurses apps insist on being run from a terminal. > Peter Smerdon > psmerdon@magma.ca Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 9/30/07, Celejar <celejar@gmail.com> wrote:
> On Fri, 28 Sep 2007 17:21:16 -0400 > Peter Smerdon <psmerdon@magma.ca> wrote: > > > Sid Arth <sidster802@gmail.com> writes: > > > > > Hi, I am running rtorrent and I was wondering if it is possible for the > > > system to turn the program off at certain times, and turn it back on at > > > other times. > > > > You can probably use use `cron' to achieve this. > > I struggled for a while to figure out how to do exactly this, without > success. I believe that cron does not work, since (at least some) > ncurses apps insist on being run from a terminal. usually such problems have to do with the differences of the environment (bash variables) - you can customize the env. of cron to overcome this problem -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Sun, 30 Sep 2007 21:17:57 +0300
ndemou@gmail.com wrote: > On 9/30/07, Celejar <celejar@gmail.com> wrote: > > On Fri, 28 Sep 2007 17:21:16 -0400 > > Peter Smerdon <psmerdon@magma.ca> wrote: > > > > > Sid Arth <sidster802@gmail.com> writes: > > > > > > > Hi, I am running rtorrent and I was wondering if it is possible for the > > > > system to turn the program off at certain times, and turn it back on at > > > > other times. > > > > > > You can probably use use `cron' to achieve this. > > > > I struggled for a while to figure out how to do exactly this, without > > success. I believe that cron does not work, since (at least some) > > ncurses apps insist on being run from a terminal. > > > usually such problems have to do with the differences of the > environment (bash variables) - you can customize the env. of cron to > overcome this problem I don't currently have rtorrent installed, but can you give a bit more explanation or a pointer for future reference? What differences in the environment do you mean? Which variables have to be modified, and to what values? Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 09/28/2007 05:21 PM, Peter Smerdon wrote:
> Sid Arth <sidster802@gmail.com> writes: > >> Hi, I am running rtorrent and I was wondering if it is possible for the >> system to turn the program off at certain times, and turn it back on at >> other times. > > You can probably use use `cron' to achieve this. This may to start: $ man at and perhaps a script could be run to kill it as well, but I wouldn't know about graceful exits with that. Regards, Ralph -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
All,
Even if we solve this by going for an alternative approach as to using a text based program, we still need a method by which we can run some curses based application For this we can use "screen" (man screen) Open a new terminal and then run the program After running this program, we can use cron to send ***** kill -STOP <pid> ***** kill -CONT <pid> change (*****) with the cron timing which seuits you. This way we can start and stop the program at will. On Sun, 2007-09-30 at 17:07 -0400, Celejar wrote: > On Sun, 30 Sep 2007 21:17:57 +0300 > ndemou@gmail.com wrote: > > > On 9/30/07, Celejar <celejar@gmail.com> wrote: > > > On Fri, 28 Sep 2007 17:21:16 -0400 > > > Peter Smerdon <psmerdon@magma.ca> wrote: > > > > > > > Sid Arth <sidster802@gmail.com> writes: > > > > > > > > > Hi, I am running rtorrent and I was wondering if it is possible for the > > > > > system to turn the program off at certain times, and turn it back on at > > > > > other times. > > > > > > > > You can probably use use `cron' to achieve this. > > > > > > I struggled for a while to figure out how to do exactly this, without > > > success. I believe that cron does not work, since (at least some) > > > ncurses apps insist on being run from a terminal. > > > > > > usually such problems have to do with the differences of the > > environment (bash variables) - you can customize the env. of cron to > > overcome this problem > > I don't currently have rtorrent installed, but can you give a bit more > explanation or a pointer for future reference? What differences in the > environment do you mean? Which variables have to be modified, and to > what values? > > Celejar > -- > mailmin.sourceforge.net - remote access via secure (OpenPGP) email > ssuds.sourceforge.net - A Simple Sudoku Solver and Generator > > -- Bhasker C V Registered Linux user: #306349 (counter.li.org) The box said "Requires Windows 95, NT, or better", so I installed Linux. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On 10/1/07, Celejar <celejar@gmail.com> wrote:
> On Sun, 30 Sep 2007 21:17:57 +0300 > ndemou@gmail.com wrote: > > On 9/30/07, Celejar <celejar@gmail.com> wrote: > > > [...] > > > I struggled for a while to figure out how to do exactly this, without > > > success. I believe that cron does not work, since (at least some) > > > ncurses apps insist on being run from a terminal. > > > > > > usually such problems have to do with the differences of the > > environment (bash variables) - you can customize the env. of cron to > > overcome this problem > > I don't currently have rtorrent installed, but can you give a bit more > explanation or a pointer for future reference? What differences in the > environment do you mean? Which variables have to be modified, and to > what values? if you enter the "set" command in bash you get a list of bash variables that are accessible to all programms that you execute. This is called "the bash environment" (see [1] for more info). A lot of programms really need to check the values of some of these variables to execute. Cron has only a small portion of them set so a lot of programms fail when run from cron (can't tell if this is your specific case though) _____________ [1] http://tldp.org/LDP/Bash-Beginners-G...l/chap_03.html -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Mon, Oct 01, 2007 at 02:59:41PM +0300, ndemou@gmail.com wrote:
> On 10/1/07, Celejar <celejar@gmail.com> wrote: > > On Sun, 30 Sep 2007 21:17:57 +0300 > > ndemou@gmail.com wrote: > > > On 9/30/07, Celejar <celejar@gmail.com> wrote: > > > > [...] > > > > I struggled for a while to figure out how to do exactly this, without > > > > success. I believe that cron does not work, since (at least some) > > > > ncurses apps insist on being run from a terminal. > > > > if you enter the "set" command in bash you get a list of bash > variables that are accessible to all programms that you execute. This > is called "the bash environment" (see [1] for more info). A lot of > programms really need to check the values of some of these variables > to execute. Cron has only a small portion of them set so a lot of > programms fail when run from cron (can't tell if this is your specific > case though) What if you have cron run su - [user]? That should set up a login environment. Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
I know that it's not what you asked but may solve your problem.
I understand that you want to regulate the download time of your torrents I don't know rtorrent, but there is many that you can schedule download time and Bandwidth usage per hour, weekday, etc. (eg: Azureus) -- Henrique G. Abreu henrique@turbokit.com.br -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Mon, 1 Oct 2007 09:26:55 -0400
"Douglas A. Tutty" <dtutty@porchlight.ca> wrote: > On Mon, Oct 01, 2007 at 02:59:41PM +0300, ndemou@gmail.com wrote: > > On 10/1/07, Celejar <celejar@gmail.com> wrote: > > > On Sun, 30 Sep 2007 21:17:57 +0300 > > > ndemou@gmail.com wrote: > > > > On 9/30/07, Celejar <celejar@gmail.com> wrote: > > > > > [...] > > > > > I struggled for a while to figure out how to do exactly this, without > > > > > success. I believe that cron does not work, since (at least some) > > > > > ncurses apps insist on being run from a terminal. > > > > > > > if you enter the "set" command in bash you get a list of bash > > variables that are accessible to all programms that you execute. This > > is called "the bash environment" (see [1] for more info). A lot of > > programms really need to check the values of some of these variables > > to execute. Cron has only a small portion of them set so a lot of > > programms fail when run from cron (can't tell if this is your specific > > case though) > > What if you have cron run su - [user]? That should set up a login > environment. I tried (using at) 'su - username mc' and received a mail stating: su: must be run from a terminal > Doug. Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
On Oct 8, 2007, at 10:23 AM, Celejar wrote: > On Mon, 1 Oct 2007 09:26:55 -0400 > "Douglas A. Tutty" <dtutty@porchlight.ca> wrote: > >> On Mon, Oct 01, 2007 at 02:59:41PM +0300, ndemou@gmail.com wrote: >>> On 10/1/07, Celejar <celejar@gmail.com> wrote: >>>> On Sun, 30 Sep 2007 21:17:57 +0300 >>>> ndemou@gmail.com wrote: >>>>> On 9/30/07, Celejar <celejar@gmail.com> wrote: >>>>>> [...] >>>>>> I struggled for a while to figure out how to do exactly this, >>>>>> without >>>>>> success. I believe that cron does not work, since (at least >>>>>> some) >>>>>> ncurses apps insist on being run from a terminal. >>>>> >> >>> if you enter the "set" command in bash you get a list of bash >>> variables that are accessible to all programms that you execute. >>> This >>> is called "the bash environment" (see [1] for more info). A lot of >>> programms really need to check the values of some of these variables >>> to execute. Cron has only a small portion of them set so a lot of >>> programms fail when run from cron (can't tell if this is your >>> specific >>> case though) >> >> What if you have cron run su - [user]? That should set up a login >> environment. > > I tried (using at) 'su - username mc' and received a mail stating: > > su: must be run from a terminal I missed most of this thread, so this may not be what you're looking for, but has anyone suggested "rungetty", yet? Package: rungetty State: not installed Version: 1.2-10 Priority: optional Section: admin Maintainer: Gerfried Fuchs <alfie@debian.org> Uncompressed Size: 77.8k Depends: libc6 (>= 2.3.6-6) Description: minimal console getty that can run any process rungetty might be the getty you were looking for. It is able to run any program, not just login. If a different program than login is used it usually is run as nobody:nogroup, or the user/group specified on the commandline. rungetty can even be configured to autologin, under certain circumstances. See the manual page for more information. You have to change some lines in /etc/inittab for having any effect after installing the package. rungetty is based on mingetty and therefore not suitable for serial use. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
On Mon, 8 Oct 2007 10:33:53 -0700
David Brodbeck <brodbd@u.washington.edu> wrote: > > On Oct 8, 2007, at 10:23 AM, Celejar wrote: > > > On Mon, 1 Oct 2007 09:26:55 -0400 > > "Douglas A. Tutty" <dtutty@porchlight.ca> wrote: [snip] > >> What if you have cron run su - [user]? That should set up a login > >> environment. > > > > I tried (using at) 'su - username mc' and received a mail stating: > > > > su: must be run from a terminal > > I missed most of this thread, so this may not be what you're looking > for, but has anyone suggested "rungetty", yet? [snip] Thanks; we're looking for a way to run /control ncurses apps non-interactively, e.g. via at or cron. Does rungetty for this? Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
On 9/30/07, Celejar <celejar@gmail.com> wrote:
> I struggled for a while to figure out how to do exactly this, without > success. I believe that cron does not work, since (at least some) > ncurses apps insist on being run from a terminal. Lets get back to first principles then. How does a curses app know if its being run from a terminal? I can't read source and I don't have curses book handy so I'll guess: TERM= if it can look up that term in termcap/terminfo to see how to draw? The value of tty? Perhaps without an actual tty-type device it can't work? --- If you do your at su - (I forget the syntax) command but have it echo the env to a file, do you get a TERM set? Perhaps create a script that sets TERM and then runs mc. Then have at run that script? Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
![]() |
| Outils de la discussion | |
|
|