HowToStartMLdonkey
Normal use
Before 2.6.1, MLdonkey stored several configuration files in the current directory.
So starting the core from the same directory every time mattered.
With those versions, it's best to create an empty directory, and to always cd to that directory before starting mlnet.
Now, *.ini are saved in $HOME/.mldonkey (unless $MLDONKEY_DIR is set, see below), so current directory doesn't matter anymore.
- Simple, displaying initial output, then silent in shell:
* $ mlnet
- Displaying continuous output:
* $ mlnet -stdout true
- As a daemon, instantly in the background:
* $ mlnet -daemon
(this setting has been removed in 2.5.30.16 as it did not work)
or * $ mlnet &> /dev/null & or * $ mlnet > /dev/null 2>&1 & or * $ mlnet </dev/null >/dev/null 2>/dev/null &
- Logging startup messages to file:
* $ mlnet &> file &
- Logging runtime messages to file:
* $ mlnet -log_file file (or set log_file in configuration file)
NOTE: as for older versions, the executable is called mldonkey
, not mlnet
.
NOTE 2: Setting the environment variable $MLDONKEY_DIR to the path where MLdonkey should save its settings is a working alternative to using the current directory as described above. This works well since 2.5.30.16.
Advanced
Use the previous information in combination with screen, allowing you to view output from mlnet, while disconnecting and reconnecting, running mlnet in the background.
- $ screen -dmS mldonkey ./mlnet
On Mac OS X, open Terminal, then choose File, Save As..., with the radio button selected "Execute this command", and "Execute this command in a shell". Put in the following, substituting /volumes/bigmac/mldonkey for the path to mlnet
- screen -dmS mldonkey $SHELL -c "cd /volumes/bigmac/mldonkey; exec /volumes/bigmac/mldonkey/mlnet -stdout true"
- Save it as a file in Applications called "mldonkey startup". Open up System Preferences, choose Accounts, and Startup Items. Add "mldonkey startup" as a startup item.
- MLdonkey will start. Terminal will remain open, but can be quit.
nohup mlnet & (Runs in background, stdout appended to ./nohup.out) On many modern unixy systems StartingSysVStyle is preferred
See Also
- Mldonkey logging options
- HowToRunAsWinService
- Screen
- Running MLdonkey Chrooted
- You dig unix and like elegant solutions: Controlling, logging and automatically relaunching MLdonkey UsingDaemonTools
- Using startup or control scripts (StartingSysVStyle, chrootuidWithSysV).
- How to stop Mldonkey?
Languages: English