сряда, 18 януари 2023 г.

How to make Chrome open magnet links qith qBittorrent

Chrome was opening my magnet files with Stremio which didn't work at all. So I wanted to convince it to open them with my torrent client qBittorent. What I did is that I edited:

/home/denijane/.config/mimeapps.list

adding the line:

x-scheme-handler/magnet=org.qbittorrent.qBittorrent.desktop

I saved it and restarted Chrome and voila! 

Useful konsole commands:

xdg-mime query default x-scheme-handler/magnet

and

gio mime x-scheme-handler/magnet

and also the .desktop files seem to reside in  /usr/share/applications/

Also you can try to update the database with "update-desktop-database" but in my case it didn't seem to work, but closing and opening Chrome did.

вторник, 27 декември 2022 г.

Conda wouldn't install sundials and scikits.odes

I wanted to install a new integrator for my dear python, since scipi odeint was running crappy on my equations.  I tried to install scikits, but I kept on running into errors:

"ImportError: No module named 'scikits'"

Then after trying to install it, I got:

"Conda package install [Errno 13] Permission denied"

and then after upgrading pip:

"fatal error: sundials/sundials_types.h: No such file or directory"

First, I tried to manually install sundials from https://github.com/certik/sundials which I did with configure, make and make install, but the error in conda persisted. Then I did "export SUNDIALS_INST=/usr/local/include/sundials/" but conda didn't like it. After some digging, I've found it's better to install sundials with pip. So I first had to remove my manual installation:

sudo rm -R /usr/local/include/sundials  

unset SUNDIALS_INST=/usr/local/include/sundials/
 

Then I decided to clean up conda a bit:

conda clean -a -y 

Then I upgraded pip:

pip3 install --user --upgrade pip #that didn't work so:

sudo pacman -S pip
conda install pip 

Then I installed sundials:

pip3 install --user Sundials

sudo pacman -S sundials #that worked
 

Then installed just in case scikit-learn:

sudo pacman -S python-scikit-learn
 

To install it from pacman:

sudo pacman -S sundials

conda -c install conda-forge sundials

conda install -c conda-forge cython  

conda install -c conda-forge scikits.odes #see here for the explanation

sudo conda install -c conda-forge scikits.odes #this took super long because it verified dependencies

pip3 install --user scikits.odes #this one did it
And now, it's installed and loadable.
(see also https://github.com/bmcage/odes/issues/43)

вторник, 20 декември 2022 г.

Nvidia on Manjaro

Short note on Nvidia drivers, following this guide:

Apparently in Manjaro, you have to install it with

$ sudo mhwd -a pci nonfree 0300

But this won't give you nvidia-smi. To get it, you need to also install the driver from Pacman: 

sudo pacman -S lib32-nvidia-utils
sudo pacman -S nvidia-utils
sudo pacman -S linux60-nvidia

Then if you're lucky, it may work and you can switch to it with:

$optimus-manager --switch nvidia

If you're feeling naughty and you want to use another kernel, like xanmod, you do the same, but with nvidia-dkms and you have to install also linux-headers before.

Useful commands (source):

lshw -C display

glxinfo -B

xrandr --listproviders