View previous topic :: View next topic |
Author |
Message |
numlock n00b
Joined: 17 Sep 2004 Posts: 58
|
Posted: Sat Jul 29, 2006 10:55 pm Post subject: [HOWTO] Running azureus as p2p user, just like mldonkey |
|
|
IMHO it's always a good thing to isolate p2p network traffic from "regular" user network traffic, because it allows to use iptables rules to filter/shape/block it by UID very easily !
Yes, mldonkey runs as p2p user, but unfortunately, the Azureus bittorrent client doesn't.
Here's how to do it:
(Edit) see below for best, updated method
It works great for me, and (IMHO) it's well worth doing !!
Please tell your opinions about this...
Last edited by numlock on Fri Aug 04, 2006 12:57 pm; edited 2 times in total |
|
Back to top |
|
|
mark_alec Bodhisattva
Joined: 11 Sep 2004 Posts: 6066 Location: Melbourne, Australia
|
Posted: Sun Jul 30, 2006 7:34 am Post subject: |
|
|
Moved from Networking & Security to Documentation, Tips & Tricks. |
|
Back to top |
|
|
yoshi314 l33t
Joined: 30 Dec 2004 Posts: 850 Location: PL
|
Posted: Tue Aug 01, 2006 12:55 pm Post subject: |
|
|
actually you can use azureus entirely without X. you need to install the swing-ui plugin for it, and then start azureus via
Code: | java -jar /path/to/Azureus2.jar --ui=console |
you will need to install and copy a couple of java libraries into the directory where Azureus2.jar is. the errors will hint you (that's the way i figured it out) . (it was mentioned somewhere on the forums).
so i guess it's possible to combine it with your method and have azureus as a regular daemon which you can connect to via web interface ( http://localhost:6883 )
ps. i'm not sure whether azureus-bin works with it, i just tried azureus package. _________________ ~amd64
shrink your /usr/portage with squashfs+aufs |
|
Back to top |
|
|
numlock n00b
Joined: 17 Sep 2004 Posts: 58
|
Posted: Wed Aug 02, 2006 11:25 pm Post subject: |
|
|
Mmh.. sounds nice, I will try that swing-ui plugin - thanks !
In the meantime, some improvements:
(Edit) removed -- see updated method below
No manual sudo needed anymore
Last edited by numlock on Fri Aug 04, 2006 12:58 pm; edited 1 time in total |
|
Back to top |
|
|
yoshi314 l33t
Joined: 30 Dec 2004 Posts: 850 Location: PL
|
Posted: Thu Aug 03, 2006 7:39 am Post subject: |
|
|
okay, this plugin is called "swing web interface". there are also different plugins, like telnet access, or html web ui for azureus. i didn't try them yet.
the drawback is that the swingweb needs a browser with java, because it launches an applet.
maybe the php interface, or telnet one would be more convenient here, so that the user would not need to run X just to add some downloads. [well, you can always configure azureus to watch a specific directory for torrents to do that] _________________ ~amd64
shrink your /usr/portage with squashfs+aufs |
|
Back to top |
|
|
numlock n00b
Joined: 17 Sep 2004 Posts: 58
|
Posted: Thu Aug 03, 2006 9:02 pm Post subject: |
|
|
Here's a new version !
The "xhost LOCAL:" is not needed anymore, because we now use proper X11 authentication
Now only the p2p user (ie: Azureus) can interact with your X11 session. Other local users cannot, and that's much better.
Here it goes: (steps 1-3 must be done as root)
1 - Create a file named "/home/p2p/run-azureus" with the following contents:
Code: | #!/bin/bash
if [ -z "$1" ]; then
xauth extract - $DISPLAY | sudo -H -u p2p "$0" $DISPLAY
else
xauth merge - && ( DISPLAY=$1 nice -n15 /usr/bin/azureus & )
fi |
The "nice -n15" will start Azureus at lowest priority. Remove it if you don't want it.
2. Protect that script by doing:
Code: | chown p2p:users /home/p2p/run-azureus
chmod 550 /home/p2p/run-azureus |
3. Do "emerge sudo" then add this line to /etc/sudoers:
Code: | my_user_name ALL=(p2p) NOPASSWD: /home/p2p/run-azureus |
This allows your user to start azureus as the p2p user (ie: just as if you were the p2p user).
Of course, replace my_user_name with your regular user name.
4. Simply launch Azureus as regular user, by using the command (in Konsole or KDE shortcut):
Code: | /home/p2p/run-azureus |
Ain't it great ? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|