This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Daemon mode

Tags: None
(comma "," separated)
tiptoe
Registered Member
Posts
2
Karma
0

Daemon mode

Sat Jun 06, 2009 2:28 am
I would like to congratulate you for the fine piece of software. But I think that the option to run ktorrent as a daemon will be very useful, or at least to
initailze the server process to run without the user interface

You need not to split off engine from front end, wouldn't just using a conditional test to bypass the qt init for the kde interface part would do the trick, please excuse me, I'm allowing to assume on the modularity of the code.

Thanks, and keep the good work
George
Moderator
Posts
5421
Karma
1

Re: Daemon mode

Sat Jun 06, 2009 10:21 am
tiptoe wrote:I would like to congratulate you for the fine piece of software. But I think that the option to run ktorrent as a daemon will be very useful, or at least to
initailze the server process to run without the user interface

You need not to split off engine from front end, wouldn't just using a conditional test to bypass the qt init for the kde interface part would do the trick, please excuse me, I'm allowing to assume on the modularity of the code.


It isn't that simple.

Other people have already asked this, we are not going to do this. A lot of work, with very little benefit.
go_torrents
Registered Member
Posts
4
Karma
0

I have the same need!

Sat Jun 06, 2009 11:09 pm
Hmm...

I just posted my problem HERE about pretty much the same need.

Except I thought that this idea would be super cool!!!

To quote from my other message:

"This is exactly what I am looking for... To have the ktorrent GUI frontend running on my local machine while the actual ktorrent server runs as a daemon on my remote server. If I could do that, I would be so HAPPY!!!"

Please rethink your opinion about this because it would benefit a lot more people than you think. Some people are blocked by their ISP's from even running torrent software.

Other people, like myself, have to go through a **** consumer router that constantly disconnects or crashes when I use torrent software. Plus, I can't replace it with a better one because my ISP has it fixed so that only their **** routers are able to connect to them!

I think that there are a LOT of people who would love to be able to run ktorrent as a daemon!

I should also note, ktorrent is the best linux torrent software that I have seen! All the other linux torrent software is pretty lame compared to ktorrent.

If you seriously will not support a remote daemon of some sort, then PLEASE tell me what other software that I can use for this purpose? As I explained in the post that I linked above, I just can't seem to find any torrent software that is suitable for running on a production server.
Lain_13
Registered Member
Posts
103
Karma
0

Sun Jun 07, 2009 2:28 am
Guys, George told you "It isn't that simple." and he totally right. To make kTorrent client-server program you need to change everything from top to bottom. It's sad, but it's true. You need to totally remove GUI part from server part and move it into separate module, you need to write API to control server part from GUI, you need to divide plugins on client-side and server-side (some plugins will work on both sides through API!) and a lot of other work. It's hard work.

On this moment I propose to use other torrent-clients, which already supports client-server architecture like Deluge.


What isn`t remembered never happened. Memory is merely a record. You just need to rewrite that record.
George
Moderator
Posts
5421
Karma
1

Sun Jun 07, 2009 9:28 am
Lain_13 wrote:Guys, George told you "It isn't that simple." and he totally right. To make kTorrent client-server program you need to change everything from top to bottom. It's sad, but it's true. You need to totally remove GUI part from server part and move it into separate module, you need to write API to control server part from GUI, you need to divide plugins on client-side and server-side (some plugins will work on both sides through API!) and a lot of other work. It's hard work.


Exactly, it is a total redesign of KT. It would be like starting from scratch with only a torrent download engine as a part you could reuse (with some modifications probably), most of the rest would have to be rewritten.
tiptoe
Registered Member
Posts
2
Karma
0

Mon Jun 08, 2009 1:38 am
I think I was not CLEAR, when on previous email. What I mean is without UNDOING OR SEPARATING server from Client, could Ktorrent with a parameter bypass all of the GUI part and continue to execute, thus allowing for background execution.

I'm not asking to have a server and a client, same software just bypass GUI.

Again if this is to complicated, thankyou. It is to bad I stopped programming about 11 years ago, I would have liked to help.

Cheers javascript:emoticon(':P')
sek.tor
Registered Member
Posts
59
Karma
0
OS

Thu Jun 11, 2009 7:01 pm
+1 to request. maybe not now, but in future
stoeptegel
Registered Member
Posts
1075
Karma
0

Thu Jul 16, 2009 3:25 pm
+1 for this, it would be very slick to have a daemon running where you can access the client from a screen session like rtorrent does. It would be awesome if you could make it something like how rtorrent works.

This way you could have the option between a terminal client, a GUI and the webinterface. If you do this i will donate you 100 euro.
fyvekatz
Registered Member
Posts
1
Karma
0

Re: Daemon mode

Wed Aug 26, 2009 5:54 pm
Hello.

First, Ktorrent seems to be a great app (only been using it for about 24 hours), and I've adopted it over uTorrent via Wine as my linux bittorrent app of choice.

Second, +1 for the feature request to run Ktorrent as a daemon. As a matter of fact, I found this thread because I was searching the web looking for best practices on how to do just this. I do appreciate that separating the server backend from the gui would be a significant amount of work (ex-developer here), so my +1 is just for the record.

Third, maybe it wouldn't be that much work after all. Would it be more feasible to suppress the ui rather that programmatically separated it? If so, one could then rely on the web interface as the primary interface. If the web gui functionality can be "filled out" so that you have access to all of the data and functionality that's available in the primary gui, there's no reason that it can't serve as the standard ktorrent ui in a headless daemon mode.

Fourth: I want to directly address George's first comment:

"...with very little benefit."

I don't know how prevalent my usage model is. I have a linux box that's off in my home office somewhere, and it provides services to the rest of my home network including acting as a vpn server, a file server for a media player that's hooked up to my home entertainment center, etc. I want to be able to access a bittorrent daemon that's always running on my linux box so that I can start and manage downloads from a laptop while I'm sitting on my couch watching tv or even when I'm connected to my homework remotely via a vpn session. I don't want to have to keep a vnc or console session logged in to my linux box in order to accomplish this, I don't want a lot of network traffic from an X11 connection to run the standard Ktorrent gui on my laptop (especially when I'm connected via vpn), and I certainly don't want to have to keep my laptop on to keep the X11 session alive while I download a 6 gig file (litterally just finished downloading one last night).

All that say... the benefit is definitely there.

My holy grail for the past few months, really, has been to find a fully featured bittorrent client that's written in C/C++, can run on linux in daemon mode, and has a rich webui.

Fifth (and last): To accomplish all of this with ktorrent, I immediately employed a workaround that someone suggested for uTorrent which, of course, demands a gui. I use Xvfb, a virtual frame buffer. I'm having trouble attaching files to this so I'll paste the pertinent information here. At any rate, though, I'd ideally like a productized solution rather than a workaround.

start() {
echo -n $"Starting $DAEMON_PROG server daemon..."
export DISPLAY=:1
Xvfb :1 &
umask 022
daemon +1 --user $TORRENT_USER /usr/bin/ktorrent $DAEMON_OPTIONS > $LOG_DIR/$DAEMON_LOG_FILE 2> /dev/null &
RETVAL=$?
echo
umask 002

touch /var/lock/subsys/$DAEMON_PROG
[ $RETVAL -eq 0 ] && touch "/var/lock/subsys/DAEMON_PROG"
}


daemon, of course, is defined in /etc/functions.

Regards.
GregC
Registered Member
Posts
17
Karma
0

Re: Daemon mode

Mon Nov 09, 2009 9:47 am
Hi,

This is actually a general Linux / KDE question, but it concerns ktorrent. I have a home computer to which I can SSH and into which I am also logged in locally. Is there a way to start ktorrent for the locally logged-in user via SSH?

My use case is this: I am often not running ktorrent because it uses up network and CPU resources and my wife often uses the computer when I am at work. If I decide I want to download something, however, I would like to start ktorrent remotely and access its web interface. As I am doing this from work, I would rather disconnect my SSH session after I have started ktorrent (though this is not a must-have, I wouldn't get into trouble because of it, it would just be 'cleaner').

Any clues if this is possible? :)
agforsyth
Registered Member
Posts
133
Karma
0

Re: Daemon mode

Mon Nov 09, 2009 3:50 pm
The solution to this problem is to have the server auto login an X session and auto start ktorrent (and a script that auto restarts ktorrent if desired). Then use the webui for control.

Edit: Maybe the solution is a ktorrent menu option that adds ktorrent and an auto-restart script to the kde autostart file, so that the user doesn't need to know how to do it.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Re: Daemon mode

Mon Nov 09, 2009 6:13 pm
GregC wrote:Hi,

This is actually a general Linux / KDE question, but it concerns ktorrent. I have a home computer to which I can SSH and into which I am also logged in locally. Is there a way to start ktorrent for the locally logged-in user via SSH?

My use case is this: I am often not running ktorrent because it uses up network and CPU resources and my wife often uses the computer when I am at work. If I decide I want to download something, however, I would like to start ktorrent remotely and access its web interface. As I am doing this from work, I would rather disconnect my SSH session after I have started ktorrent (though this is not a must-have, I wouldn't get into trouble because of it, it would just be 'cleaner').

Any clues if this is possible? :)

I guess the cleanest way is to start a shell in 'screen' from your KDE session and detach from it. When you connect via ssh, retach to the screen session and run ktorrent from it. Then ktorrent will start in your KDE session normally (but probably not minimized) and you will be able to access it via web interface.

Alternative is to reexport all environment variables from your running KDE session into your current ssh session. For example, you may use something like this on Linux (provided there is only one knotify4 running on your system):

Code: Select all
f=`tempfile`; cat /proc/`pidof knotify4`/environ | xargs -0 env > $f; while read e; do export "$e"; done < $f; rm $f
ialongiya
Registered Member
Posts
1
Karma
0

Re: Daemon mode

Mon Nov 30, 2009 7:42 am
How can I get enough experience for my Linux + certification? I've been worrying about this for a while. I've been studying what I need to know to get my Linux + certification, and in order to take the cert exam I need to have 6-12 months of Linux network administration, but I don't know who would hire an uncertified network administrator.
_____________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator

Last edited by ialongiya on Tue Dec 01, 2009 11:34 am, edited 1 time in total.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Re: Daemon mode

Mon Nov 30, 2009 10:44 am
ialongiya wrote:How can I get enough experience for my Linux + certification? I've been worrying about this for a while. I've been studying what I need to know to get my Linux + certification, and in order to take the cert exam I need to have 6-12 months of Linux network administration, but I don't know who would hire an uncertified network administrator.

What does this question have to do with this thread and even with this forum?
yvangkwheng
Registered Member
Posts
5
Karma
0

Re: Daemon mode

Tue Dec 01, 2009 2:56 am
easier said than done. ur gonna get into some troubles.




Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]