PixivUtil2 icon indicating copy to clipboard operation
PixivUtil2 copied to clipboard

Linux setup and configuration instructions, converted from windows

Open 404Fox opened this issue 3 years ago • 1 comments

Compiled notes for anyone else trying to use this on linux but is also a noob. My experience was with Linux Mint 20.2 Cinnamon and then Manjaro and then Artix...

Setup

Open a terminal and install pip: On Mint/Ubuntu: sudo apt install python3-pip On Arch: sudo pacman -S python-pip

Download source git clone https://github.com/Nandaka/PixivUtil2/PixivUtil2-master

Move into the folder that we just made cd PixivUtil2-master

Install python dependencies with pip pip install -r requirements.txt or python -m pip install -r ./requirements.txt

Run PixivUtil from terminal python PixivUtil2.py You can also right click on it and use a "Run in Terminal" button (in KDE, Cinnamon, prob others).

Updating PixivUtil with git

For those not familiar with git, you can update pixivutil by opening the pixivutil folder in a terminal, and running git pull origin master

Notes for config.ini coming from Windows

If you want to use the ugoria -> webm feature, you'll need to change ffmpeg.exe to ffmpeg and have installed the ffmpeg package with apt-get, pacman, pamac, or whatever. I changed the paths for my download formatting (filenameFormat) to use forward slashes instead of backslashes. Don't know if that's actually relevant though.

Downloading to a NAS

In order for PixivUtil to save files to a NAS, you need to mount your NAS in linux and set the path in config.ini If your server can be accessed with NFS, I'd recommend using that.

Mounting server with SMB (when I was using Mint/Cinnamon)

For my specific case I use a SMB share on my NAS to save images to. After connecting to my SMB server in the file browser (nemo), I found the path to access the server is different between operating systems. On Windows 10 this looked like \\SERVERNAME\ShareName\images\pixiv

Here's what I used to get this running, I've read that the path will typically be under /mnt/ but its probably handled this way due to the setup of this specific distro: /run/user/1000/gvfs/smb-share:server=servername.local,share=sharename/images/pixiv Notes about that, 1000 refers to the current user and gvfs is what nemo is using to mount this network location. This will almost definitely be different on different linux distros or even file managers, or you could just do it manually however you'd like.

Other formats such as smb://servername.local/sharename/images would simply create this folder in the execution location . //smb://servername.local/.... would result a permission denied error. I tried creating a symbolic link as discussed in #471 but got "operation not supported" when trying the command. Could've just been the way I did it though.

Mounting server with NFS (setup in Artix/KDE)

For NFS, just add your server to /etc/fstab 127.0.0.1:/mnt/user/share /mnt/share nfs defaults,user,soft,_netdev 0 0 and make sure you went and made a /mnt/share folder and make sure you set pixivutil to save images there in config.ini: [Settings] rootDirectory = /mnt/

If you don't want it to mount at boot (in case it may not be online) then add noauto to the options list. It can then be mounted/unmounted in dolphin gui. user option allows it to be mounted in userspace, the rest are well-documented when researching this topic.

On the server side (in unraid for me) you must set the security to "Public" instead of Secure or it will mount as read-only.

404Fox avatar Dec 19 '21 14:12 404Fox

Using Manjaro (Arch-based) now, a couple of differences: Install pip from the software manager "python-pip" if it is not already installed. You'll need to find a way to mount your remote path into linux filesystem, as Dolphin doesn't do this for you. https://wiki.archlinux.org/title/samba#Automatic_mounting

I was able to do this using the systemd method which will mount it at boot. If you have any questions I will answer. You could do this for any system that uses systemd, which is most distros. This method will be much cleaner than using gvfs imo.

404Fox avatar Feb 23 '22 00:02 404Fox