Add instructions for installing Linux desktop icons and integration #104718

Closed
Bill-Spitzak wants to merge 2 commits from Bill-Spitzak/blender-manual:main into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 35 additions and 26 deletions
Showing only changes of commit 585869313a - Show all commits

View File

@ -77,5 +77,5 @@ Follow the steps for your platform.
.. toctree:: .. toctree::
:hidden: :hidden:
linux_freedesktop.rst linux_example_install.rst
linux_windowing_environment.rst linux_windowing_environment.rst

View File

@ -12,12 +12,12 @@ Install from blender.org
======================== ========================
Download the Linux version for your architecture and decompress the file to the desired location Download the Linux version for your architecture and decompress the file to the desired location
Review

Use a comma instead of multiple or's.

(e.g. ``/opt``, ``~/software`` or ``/usr/local``).
Use a comma instead of multiple or's. ``` (e.g. ``/opt``, ``~/software`` or ``/usr/local``). ```
(e.g. ``/opt`` or ``~/software``). (e.g. ``/opt`` or ``~/software`` or ``/usr/local``).
Blender can now be launched by running the ``blender`` executable in the installed directory. Blender can now be launched by running the ``blender`` executable in the installed directory.
Getting icons to work is somewhat tedious, but does not have to be redone when updating Getting icons to work is somewhat tedious, but does not have to be redone when updating
blender versions. See :doc:`Installing freedesktop.org icons <linux_freedesktop>`. blender versions. See :doc:`Linux Example Install <linux_example_install>`.
When using this method of installation, it is possible to have multiple versions of Blender installed When using this method of installation, it is possible to have multiple versions of Blender installed
as they each have a different directory name. as they each have a different directory name.

View File

@ -1,33 +1,36 @@
******************* *******************
Installing freedesktop.org icons Linux example install of downloaded Blender
******************* *******************
Exactly where to place icons varies depending on the Linux distribution and the The following commands sucessfully installed the downloaded 4.0.2 version of Blender
Review

References to exact blender versions and spesific distributions should be avoided.

If you want to note this it can be added in a comment which isn't included in the output.

.. Developer note:

   The following commands sucessfully installed the downloaded 4.0.2 on POP!_OS version 123.
References to exact blender versions and spesific distributions should be avoided. If you want to note this it can be added in a comment which isn't included in the output. ``` .. Developer note: The following commands sucessfully installed the downloaded 4.0.2 on POP!_OS version 123. ```
desktop environment theme. These instructions worked for Pop!_OS, an Ubuntu on POP!_OS (a spinoff of Ubuntu). This includes making the ``.blend`` files show
spinoff. In general you should search for similar files in order to figure out what thumbnails and icons and making double-clicking of them launch Blender.
directory to place the icons in. Text you may have to change is in red.
These instructions assume you want to install system-wide in ``/opt``. You can avoid This should work for other Linux distributions, however the directories files must be
the need for ``sudo`` by instead installing somewhere in your home directory, using placed into, especially icons, can change depending on the distribution and the
that directory instead of ``/opt`` and using ``~/.local`` instead of ``/usr``. desktop theme. Search around for similar directory names and files to locate where
they should go. `Freedesktop.org <https://www.freedesktop.org/wiki/Specifications/>`__
is the official specification for how these files work.
Use of ``sudo`` can be avoided by unpacking the download into your home directory, using
that instead of ``/opt``, and making all the links to ``~/.local`` instead of ``/usr/local``.
**Extract the downloaded ``.tar.xz`` file into a directory in ``/opt``** **Extract the downloaded ``.tar.xz`` file into a directory in ``/opt``**
.. code-block:: sh .. code-block:: sh
sudo mkdir /opt sudo mkdir -p /opt
cd /opt cd /opt
sudo tar -xf ~/Downloads/blender-'4.0.2-linux-x64'.tar.xz sudo tar -xf ~/Downloads/blender-4.0.2-linux-x64.tar.xz
**Add a symbolic link to skip the version number** **Add a symbolic link to skip the version number**
.. code-block:: sh .. code-block:: sh
sudo rm /opt/blender sudo ln -sTf blender-4.0.2-linux-x64 /opt/blender
sudo ln -s blender-'4.0.2-linux-x64' /opt/blender
**Make running blender from the command line work** **Make Blender commands work from the command line**
.. code-block:: sh .. code-block:: sh
@ -48,24 +51,24 @@ that directory instead of ``/opt`` and using ``~/.local`` instead of ``/usr``.
.. code-block:: sh .. code-block:: sh
sudo ln -s /opt/blender/blender.svg /usr/share/icons/'hicolor/'scalable/ sudo ln -s /opt/blender/blender.svg /usr/share/icons/hicolor/scalable/apps/blender.svg
Review

Prefer ~/.local/share/icons over /usr/share/icons

Prefer `~/.local/share/icons` over ` /usr/share/icons`
Here you need to locate the correct directory for your Linux distribution.
**Check if the "mime type" exists** **Check if the "mime type" exists**
This may be true of any modern Linux install. This should work on any modern Linux installation.
.. code-block:: sh .. code-block:: console
:emphasize-lines: 2
mimetype foo.blend $ mimetype foo.blend
foo.blend: application/x-blender foo.blend: application/x-blender
Alternative: Alternative:
.. code-block:: sh .. code-block:: console
:emphasize-lines: 2
grep blender /etc/mime.types $ grep blender /etc/mime.types
application/x-blender blend application/x-blender blend
**Add the mimetype if missing** **Add the mimetype if missing**
@ -94,11 +97,17 @@ that directory instead of ``/opt`` and using ``~/.local`` instead of ``/usr``.
.. code-block:: sh .. code-block:: sh
sudo ln -s /opt/blender/blender-symbolic.svg \ sudo ln -s /opt/blender/blender-symbolic.svg \
Review

This seems pop-os spesific, if we give instructions for a spesific distro I would rather use one of the main-stream Linux distros Ubuntu/Debian/Redhat for e.g.

This seems pop-os spesific, if we give instructions for a spesific distro I would rather use one of the main-stream Linux distros Ubuntu/Debian/Redhat for e.g.
Review

All I know is I had to try several directories before they appeared If anybody can decipher freedesktop.org's rules it would help. Would like something like "put it in $XDG_SECRET_DIRECTORY/scalable/blend.svg but have not found anything like that.

All I know is I had to try several directories before they appeared If anybody can decipher freedesktop.org's rules it would help. Would like something like "put it in `$XDG_SECRET_DIRECTORY/scalable/blend.svg` but have not found anything like that.
/usr/share/icons/'Pop/'scalable/mimetypes/application-x-blender.svg /usr/share/icons/Pop/scalable/mimetypes/application-x-blender.svg
sudo update-icon-caches /usr/share/icons/'Pop/' sudo update-icon-caches /usr/share/icons/Pop/
At least for this system, an entirely different subdirectory had to be used than
the one for the execuatble icon.
**Make thumbnails work for .blend files** **Make thumbnails work for .blend files**
Thumbnails may already be working, try saving a ``.blend`` file and then looking
at it in the files application. If not this should make them work:
Put the following into ``/usr/share/thumbnailers/x-blender.thumbnailer``: Put the following into ``/usr/share/thumbnailers/x-blender.thumbnailer``:
Review

~/.local/share/thumbnailers can be used here.

`~/.local/share/thumbnailers` can be used here.
.. code-block:: ini .. code-block:: ini