Dual boot - same torrents in each OS?

General support for problems installing or using Deluge
Post Reply
uncertain
New User
New User
Posts: 4
Joined: Mon May 04, 2009 1:09 pm

Dual boot - same torrents in each OS?

Post by uncertain »

Being that Deluge is a cross-platform application, on a dual-boot system would it be possible to set up Deluge in both Windows and Linux so that no matter which OS is in use, torrents can continue to be downloaded and their progress kept?

Since my torrents download folder is by far the largest folder on my limited-space hard disk, I'm wondering if a shared partition (say, FAT32 but even NTFS would be OK) of maybe 60 or 80GB accessible by both Windows and Linux as a storage area for downloads and in-progress torrents.

I realize that there'd have to be shared data folders, too. In Linux, IIRC, current torrent state info (among other things) is stored in ~/.config/deluge. (I don't know about Windows just yet.) Are there any other files/folders I'd have to keep on the shared partition in order to have the same torrents working in either OS? Will the Windows version of Deluge be able to read these files, or are they totally different? Is there any way to make this happen?
loki
Moderator
Moderator
Posts: 787
Joined: Tue Dec 04, 2007 3:27 pm
Location: MI, USA

Re: Dual boot - same torrents in each OS?

Post by loki »

I believe you would have to copy the torrents state files back and forth each time because they would be in different places on the disk.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Dual boot - same torrents in each OS?

Post by johnnyg »

You could do it without syncing your deluge settings folders but it would recheck the torrents every time you switched OS.

A better solution would be to run deluge with the -c option in Linux and point it to the windows config folder (see http://dev.deluge-torrent.org/wiki/Faq# ... tssettings)

The best solution would be to get a cheap (free?) old PC, install Linux on it and use it as a seedbox.
You could then use Deluge as a thin client (http://dev.deluge-torrent.org/wiki/UserGuide/ThinClient) from your main PC in both Windows and Linux (this is what I do).
george.w
New User
New User
Posts: 3
Joined: Fri Jun 22, 2012 5:42 pm

Re: Dual boot - same torrents in each OS?

Post by george.w »

I know this thread is old but i am also very interested in achieving this. I just used an app to sync from windows deluge config folder to the ubuntu one. But when i started deluge in ubuntu, all the torrents started downloading and not seeding (as they should). Could this have been because these torrents were all in a removable disk and ubuntu does not use drive letters same as windows? is there any way to fix this?
scra5071
New User
New User
Posts: 2
Joined: Sat Mar 16, 2013 8:17 am

Re: Dual boot - same torrents in each OS?

Post by scra5071 »

I'm interested in the proposed solution. I am running Deluge on Windows 7 and Linux Mint 14 KDE. I'd like to sync the two by pointing Deluge on Linux to the Windows Deluge config folder. However, I can't find instructions on how to use the -c <dir> switch on my Linux version of Deluge. Perhaps I'm just being stupid, but coul someone explain how I do that?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Dual boot - same torrents in each OS?

Post by Cas »

The problem is that the full paths stored in the config state files are not compatible between linux (/home/user) and windows (C:\Users). There is a solution but it would require parsing the config through a script before starting Deluge each time.
abubin
Seeder
Seeder
Posts: 217
Joined: Thu Sep 13, 2007 6:03 am

Re: Dual boot - same torrents in each OS?

Post by abubin »

you could also run a vmware/virtualbox with deluge installed on it. Both linux or windows can start up that vm no problem. You could opt to run linux or windows on this vm but I would suggest linux as it is much less resource intensive.
cgar

Re: Dual boot - same torrents in each OS?

Post by cgar »

I couldn't find any other answers online to achive this. I ended up making it work myself. Its true, the problem is the file paths between windows and linux are different. But they are (at least for me) static and they mean the same thing. So I created a symlink of the windows state folder into my deluge config folder. Then I added a function to the deluge init script to change the windows paths to the equivilent linux paths.

The uncommented function I made is this:

Code: Select all

fix_paths()
{
   stateFilePath=/home/cgar/.config/deluge/state/torrents.state

   sed -i 's#S:\\\\Downloads#/mnt/dataDrive/Downloads#g' $stateFilePath
   sed -i 's#C:\\\\Users\\\\wCGar\\\\Downloads#/mnt/dataDrive/Downloads#g' $stateFilePath
}
Full Init sctipt: http://pastebin.com/kj907Q6s

I added that into /etc/init/d/deluged then called it from do_start

To do the opposite from windows. Its much easier. Since deluge doesnt autostart in windows normally unless you added a shortcut into your startup folder. I just created a vb script and replaced my shortcut with it.

Full vb script: http://pastebin.com/XvkU74nS

If anyone wants to use it. You would:
  • Shutdown deluge.

    Code: Select all

    sudo service deluged stop
  • Delete the linux state folder. Backup any torrents 1st, if you want to keep them.
  • Create a symlink of the windows state folder where the linux state folder used to be. For me, I ran:

    Code: Select all

    ln -s /mnt/windows/Users/wCGar/AppData/Roaming/deluge/state /home/cgar/.config/deluge/state
  • Edit your deluged init script, adding the fix_paths function then calling it inside do_start. Those of the lazy inclined could just copy the full one from pastebin, however any previous changes will be lost. Yours might be different too.
  • Test it, your windows torrents should now be in deluge with the correct ratios and everything =D. If you forgot something along the way like me, fix that then force recheck all to fix any errors.
  • Boot into windows.
  • Stop deluge if its set to autostart.
  • Add (or replace the shortcut with) the script file from pastebin into the startup folder in the start menu.
  • Edit the scripts variables to the correct values for your system.

When editing the init function. Just remember every windows slash must be escaped. "So C:\\Users\" becomes a crazy "C:\\\\Users\\".
Post Reply