User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Bookshelf Download Destination

Thu May 28, 2020 11:20 pm

Currently, magazines, books, and so on, download to a Bookshelf folder within Raspberry Pi’s internal storage. I would like to have the location of the Download folder be on a USB hard drive. How do I accomplish this?
Ron

User avatar
RaspbianUser1
Posts: 289
Joined: Thu Mar 05, 2020 6:34 pm

Re: Bookshelf Download Destination

Fri May 29, 2020 2:08 am

Can’t you just copy them from the sd? simple then delete from pi after
Running Raspberry Pi OS Full, therefore my comments will be based on that
Using RPI-4B 4GB at 2.1GHz CPU and 700MHz GPU
don't format your sd because someone said so.
Or put your favourite cutlery into your nearest outlet (May result in death) ;)

DarkElvenAngel
Posts: 925
Joined: Tue Mar 20, 2018 9:53 pm

Re: Bookshelf Download Destination

Fri May 29, 2020 3:16 am

It looks like once you open it up it creates a Bookshelf folder in your home directory.

So you can use symlinks to point that folder to your USB stick.

User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Re: Bookshelf Download Destination

Fri May 29, 2020 1:38 pm

RaspbianUser1 wrote:
Fri May 29, 2020 2:08 am
Can’t you just copy them from the sd? simple then delete from pi after
Of course but why should I go through that every time I download.
Ron

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 403
Joined: Fri Dec 26, 2014 11:02 am

Re: Bookshelf Download Destination

Fri May 29, 2020 1:52 pm

It writes to ~/Bookshelf by default. We'll look at making this customisable in future, but a symlink will probably work just fine.

User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Re: Bookshelf Download Destination

Fri May 29, 2020 3:05 pm

I use the following:
sudo ln -s /home/pi/Bookshelf /NetDrive

The symbolic link worked but now there are other issues:
  • While I can now see Bookshelf folder on my network drive the contents of the Bookshelf directory on the Raspberry Pi remain. What I had hoped to achieve was only partially successful. I wanted the OS to not fill the Raspberry Pi with literature.
  • I am working on a permissions issue as well, though I am using the same userid for a terminal session, a VNC session, and connections from my iPad/iPhone. Finder on my Mac does not see the folder at all even though I did a killall on Finder

    pi@raspberrypi:~ $ ls -l /NetDrive/Bookshelf
    lrwxrwxrwx 1 root root 18 May 29 10:01 /NetDrive/Bookshelf -> /home/pi/Bookshelf.
Ron

DarkElvenAngel
Posts: 925
Joined: Tue Mar 20, 2018 9:53 pm

Re: Bookshelf Download Destination

Fri May 29, 2020 3:20 pm

ApexRon wrote:
Fri May 29, 2020 3:05 pm
I use the following:
sudo ln -s /home/pi/Bookshelf /NetDrive

The symbolic link worked but now there are other issues:
  • While I can now see Bookshelf folder on my network drive the contents of the Bookshelf directory on the Raspberry Pi remain. What I had hoped to achieve was only partially successful. I wanted the OS to not fill the Raspberry Pi with literature.
  • I am working on a permissions issue as well, though I am using the same userid for a terminal session, a VNC session, and connections from my iPad/iPhone. Finder on my Mac does not see the folder at all even though I did a killall on Finder

    pi@raspberrypi:~ $ ls -l /NetDrive/Bookshelf
    lrwxrwxrwx 1 root root 18 May 29 10:01 /NetDrive/Bookshelf -> /home/pi/Bookshelf.
Don't create your link with sudo.

You need to

Code: Select all

sudo rm /home/pi/Bookshelf
ln -s /home/pi/Bookshelf /NetDrive
Try that way

User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Re: Bookshelf Download Destination

Fri May 29, 2020 3:36 pm

DarkElvenAngel wrote:
Fri May 29, 2020 3:20 pm
Don't create your link with sudo.

You need to

Code: Select all

sudo rm /home/pi/Bookshelf
ln -s /home/pi/Bookshelf /NetDrive
Try that way
I used 'rmdir' instead.
Back to where I was.
  • Permissions issue
  • Not visible in Mac Finder (not a biggie)
  • Bookshelf was created on Raspberry Pi with downloaded file appearing in both Bookshelf directories (as you would expect)
Ron

DarkElvenAngel
Posts: 925
Joined: Tue Mar 20, 2018 9:53 pm

Re: Bookshelf Download Destination

Fri May 29, 2020 3:58 pm

The location pointed to by the link can pi write to it normally? The might be your permission issue

User avatar
dickon
Posts: 1652
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Bookshelf Download Destination

Fri May 29, 2020 4:07 pm

Er. ln takes the destination as its first argument, not the second.

Code: Select all

sudo mv Bookshelf /NetDrive
ln -s /NetDrive/Bookshelf .
is, I think, what you want.

User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Re: Bookshelf Download Destination

Fri May 29, 2020 4:18 pm

DarkElvenAngel wrote:
Fri May 29, 2020 3:58 pm
The location pointed to by the link can pi write to it normally? The might be your permission issue
Okay this is getting weird. Raspberry OS wrote the file with minimum permissions and I did a chmod to the Directory and the file. Then I downloaded another file. Note that Raspberry OS continues to use the same permissions when writing a new file:
pi@raspberrypi:~ $ ls -l /home/pi/Bookshelf/
total 74920
-rw-r--r-- 1 pi pi 39359295 May 29 12:05 MagPi93.pdf
-rwxrwxrwx 1 pi pi 37354589 May 29 11:27 MagPi94.pdf
pi@raspberrypi:~ $ ls -l /NetDrive/Bookshelf/
total 74920
-rw-r--r-- 1 pi pi 39359295 May 29 12:05 MagPi93.pdf
-rwxrwxrwx 1 pi pi 37354589 May 29 11:27 MagPi94.pdf
Ron

User avatar
ApexRon
Posts: 6
Joined: Thu May 28, 2020 2:18 pm
Location: Apex, NC

Re: Bookshelf Download Destination

Fri May 29, 2020 4:52 pm

dickon wrote:
Fri May 29, 2020 4:07 pm
Er. ln takes the destination as its first argument, not the second.

Code: Select all

sudo mv Bookshelf /NetDrive
ln -s /NetDrive/Bookshelf .
is, I think, what you want.
I can now access and read from my Mac and iPad. Yea!!!

Only issue is that the Bookshelf app still stores on Raspberry Pi.
Ron

Return to “Raspberry Pi OS”