Author Topic: Starting ktorrent using the AT command [Solved]  (Read 501 times)

Offline dixonpete

  • Hero Member
  • *****
  • Posts: 897
Starting ktorrent using the AT command [Solved]
« on: November 17, 2011, 07:37:11 PM »
I'd like to use the AT command to start up kTorrent after we all go to bed since the bandwidth it uses makes surfing/online video problematic.

simply using
at 23:00
ktorrent [enter]
^D
doesn't seem to cut it

Any suggestions?
« Last Edit: November 19, 2011, 05:09:28 PM by dixonpete »

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5337
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Starting ktorrent using the AT command
« Reply #1 on: November 17, 2011, 08:47:35 PM »
I'd like to use the AT command to start up kTorrent after we all go to bed since the bandwidth it uses makes surfing/online video problematic.

simply using
at 23:00
ktorrent [enter]
^D
doesn't seem to cut it

Any suggestions?


I thought the format was

AT {shell} {filename} {time}

example:   at -b -f myprogram -t 23:00

Here is the man page for AT  http://unixhelp.ed.ac.uk/CGI/man-cgi?at




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8598
  • Aurum nostrum non est aurum vulgi.
Re: Starting ktorrent using the AT command
« Reply #2 on: November 17, 2011, 09:59:59 PM »
@dixonpete, check out mail and you ought to get a message similar to the following:

Quote
KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work
ktorrent: cannot connect to X server
unnamed app(7808): Communication problem with  "ktorrent" , it probably crashed.

I am not sure why ktorrent is not launching/crashing but your syntax should be good.
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8598
  • Aurum nostrum non est aurum vulgi.
Re: Starting ktorrent using the AT command
« Reply #3 on: November 17, 2011, 10:26:27 PM »
I think I figured it out.

add -display :0.0 after the app you want to launch at a specified time.

Code: [Select]
[archie@localhost ~]$ at 12:00
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> ktorrent -display :0.0
at> <EOT>
job 14 at Fri Nov 18 12:00:00 2011

I hope it also fix it up for you.
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline dixonpete

  • Hero Member
  • *****
  • Posts: 897
Re: Starting ktorrent using the AT command [Solved]
« Reply #4 on: November 19, 2011, 05:13:53 PM »
Sure did, tx. Any idea then how to safely terminate ktorrent in a similar way? Currently I use halt.

It's great to be able to start programs that way.


Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8598
  • Aurum nostrum non est aurum vulgi.
Re: Starting ktorrent using the AT command [Solved]
« Reply #5 on: November 19, 2011, 06:35:31 PM »
Have you tried

Code: [Select]
killall ktorrent
it's what I command my conky.  ;D
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42