Add instructions for installing Linux desktop icons and integration #104718

Open
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.
First-time contributor

Note that these instructions are based on my own experiements and on
searching the Gnome and freedesktop.org online instructions. I was
unable to figure out any rule for placing icon files. These should
be tested on other Linux versions and the instructions improved.
However this is still a lot better than what existed previously.

I also changed the recommended install location to /opt to avoid
conflicts with packaged software.

Note that these instructions are based on my own experiements and on searching the Gnome and freedesktop.org online instructions. I was unable to figure out any rule for placing icon files. These should be tested on other Linux versions and the instructions improved. However this is still a lot better than what existed previously. I also changed the recommended install location to /opt to avoid conflicts with packaged software.
Bill-Spitzak added 1 commit 2024-02-27 00:08:27 +01:00
ee14304a4c Add instructions for installing Linux desktop icons and integration
Note that these instructions are based on my own experiements and on
searching the Gnome and freedesktop.org online instructions. I was
unable to figure out any rule for placing icon files. These should
be tested on other Linux versions and the instructions improved.
However this is still a lot better than the instructions that
existed previously.

I also changed the recommended install location to /opt to avoid
conflicts with packaged software.
Bill-Spitzak changed title from Add instructions for installing Linux desktop icons and integration to WIP: Add instructions for installing Linux desktop icons and integration 2024-02-28 05:53:55 +01:00
Bill-Spitzak changed title from WIP: Add instructions for installing Linux desktop icons and integration to Add instructions for installing Linux desktop icons and integration 2024-02-28 05:54:15 +01:00
Bill-Spitzak force-pushed main from ee14304a4c to cfa8c9aa42 2024-03-01 00:27:34 +01:00 Compare
Bill-Spitzak requested review from Campbell Barton 2024-03-01 00:31:16 +01:00
Bill-Spitzak requested review from Aaron Carlisle 2024-03-01 00:31:17 +01:00
Author
First-time contributor

I took a guess who I should say is a reviewer based on who did recent edits to the linux.rst file.

I took a guess who I should say is a reviewer based on who did recent edits to the ``linux.rst`` file.
G. Solis reviewed 2024-03-02 02:00:49 +01:00
G. Solis left a comment
First-time contributor

These instructions have been long due, so thanks for that.

Overall I think, however, that calling the page "Installing freedesktop.org icons" is underselling it. You've given instructions on how to:

  • Extract the files to an appropriate place
  • Create a version-independent symlinked folder for the "current" blender version.
  • Make it possible to run blender from the terminal
  • Register blender as a desktop application
  • Make the desktop icon work
  • Associate blender with .blend files
  • Make thumbnails work.

all of which are valuable guidance for unexperienced linux users. Not only that, but the intersection of users that know what "freedesktop" is but don't know how how to do the things listed here is rather small.

With that in mind, and considering it's only been tested on your machine, I'd suggest renaming it as an "Example install" or "Suggested installation steps".

These instructions have been long due, so thanks for that. Overall I think, however, that calling the page "Installing freedesktop.org icons" is underselling it. You've given instructions on how to: - Extract the files to an appropriate place - Create a version-independent symlinked folder for the "current" blender version. - Make it possible to run `blender` from the terminal - Register blender as a desktop application - Make the desktop icon work - Associate blender with `.blend` files - Make thumbnails work. all of which are valuable guidance for unexperienced linux users. Not only that, but the intersection of users that know what "freedesktop" is but don't know how how to do the things listed here is rather small. With that in mind, and considering it's only been tested on your machine, I'd suggest renaming it as an "Example install" or "Suggested installation steps".
@ -13,3 +13,3 @@
Download the Linux version for your architecture and decompress the file to the desired location
(e.g. ``~/software`` or ``/usr/local``).
(e.g. ``/opt`` or ``~/software``).
First-time contributor

To be fair, /usr/local is a pretty popular location as well.

To be fair, `/usr/local` is a pretty popular location as well.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +6,4 @@
Exactly where to place icons varies depending on the Linux distribution and the
desktop environment theme. These instructions worked for Pop!_OS, an Ubuntu
spinoff. In general you should search for similar files in order to figure out what
directory to place the icons in. Text you may have to change is in red.
First-time contributor

I can't see anything in red. Are the parts supposed to be in red the ones inside single-quotes?

I can't see anything in red. Are the parts supposed to be in red the ones inside single-quotes?
Author
First-time contributor

For me the stuff in single quotes is red. If this is not true for everybody, I'm not sure what can be done. Possibly just not do anything except say outside the box that some of the text might change. Did it produce any kind of formatting for you?

For me the stuff in single quotes is red. If this is not true for everybody, I'm not sure what can be done. Possibly just not do anything except say outside the box that some of the text might change. Did it produce any kind of formatting for you?
Author
First-time contributor

I gave up on highlighting it.

I gave up on highlighting it.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +16,4 @@
.. code-block:: sh
sudo mkdir /opt
First-time contributor

Is this necessary? If so, perhaps it'd better be addressed in the preceding text ("if you happen not to have /opt, then you're free to create it/use the appropriate folder for your setup.").
It'd be confusing for a newbie to start the tutorial getting an error on the first command (and it's going to happen to almost(?) every user that tries it).

Is this necessary? If so, perhaps it'd better be addressed in the preceding text ("*if you happen not to have `/opt`, then you're free to create it/use the appropriate folder for your setup.*"). It'd be confusing for a newbie to start the tutorial getting an error on the first command (and it's going to happen to almost(?) every user that tries it).
Author
First-time contributor

Can also put in -p similar to your suggestion for fixing the symbolic links.

Can also put in ``-p`` similar to your suggestion for fixing the symbolic links.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +25,4 @@
.. code-block:: sh
sudo rm /opt/blender
sudo ln -s blender-'4.0.2-linux-x64' /opt/blender
First-time contributor

You can substitute the existing link in a single command, with ln's -Tf flags:
sudo ln -sTf blender-'4.0.2-linux-x64' /opt/blender
instead of manually removing /opt/blender, which is going to yield an error in the probable case that it doesn't exist.

You can substitute the existing link in a single command, with `ln`'s `-Tf` flags: `sudo ln -sTf blender-'4.0.2-linux-x64' /opt/blender` instead of manually removing `/opt/blender`, which is going to yield an error in the probable case that it doesn't exist.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +32,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender /usr/bin/blender
sudo ln -s /opt/blender/blender-thumbnailer /usr/bin/blender-thumbnailer
First-time contributor

Should this step be placed somewhere else?

Should this step be placed somewhere else?
Author
First-time contributor

I probably should change the text to "make the commands in the blender installation work from the command line". I was concerned that there may be more than these two in the future, and that putting all the similar commands next to each other is better.

I probably should change the text to "make the commands in the blender installation work from the command line". I was concerned that there may be more than these two in the future, and that putting all the similar commands next to each other is better.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +48,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender.svg /usr/share/icons/'hicolor/'scalable/
First-time contributor

I guess everything under /usr/share/icons/ is freedesktop-compliant, but based on what other apps on my machine do, I'd go one level further still: /usr/share/icons/hicolor/scalable/apps/.

I guess everything under `/usr/share/icons/` is freedesktop-compliant, but based on what other apps on my machine do, I'd go one level further still: `/usr/share/icons/hicolor/scalable/apps/`.
Author
First-time contributor

Yes looks like a good idea, and it works for me.

Yes looks like a good idea, and it works for me.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +52,4 @@
**Check if the "mime type" exists**
This may be true of any modern Linux install.
First-time contributor

"This may be true"? Perhaps "This should work in any modern..."

"This may be true"? Perhaps "*This should work in any modern...*"
Bill-Spitzak marked this conversation as resolved
@ -0,0 +58,4 @@
:emphasize-lines: 2
mimetype foo.blend
foo.blend: application/x-blender
First-time contributor

The formatting makes it seem like this is another command, not an output from the previous command. You could put the prompt sign $ before every command, or write about the expected output here in text, out of the code-block, or something else. I'd favour the first option.

The formatting makes it seem like this is another command, not an output from the previous command. You could put the prompt sign `$` before every command, or write about the expected output here in text, out of the code-block, or something else. I'd favour the first option.
Bill-Spitzak marked this conversation as resolved
@ -0,0 +97,4 @@
/usr/share/icons/'Pop/'scalable/mimetypes/application-x-blender.svg
sudo update-icon-caches /usr/share/icons/'Pop/'
**Make thumbnails work for .blend files**
First-time contributor

Is this needed? Mine seem to have worked out-of-the-box.

Is this needed? Mine seem to have worked out-of-the-box.
Author
First-time contributor

I needed it but maybe you had something left over from a previous blender install, or it comes already setup on some systems? Also once a thumbnail is created it seems to stay around even if you remove the thumbnailing setup.

Probably should change the text to say "do this if thumbnails don't work".

I needed it but maybe you had something left over from a previous blender install, or it comes already setup on some systems? Also once a thumbnail is created it seems to stay around even if you remove the thumbnailing setup. Probably should change the text to say "do this if thumbnails don't work".
Bill-Spitzak marked this conversation as resolved
Bill-Spitzak added 1 commit 2024-03-04 00:01:12 +01:00
First-time contributor

Blender 4.1 is coming in two weeks, and the blender devs are focused on that at the moment. I've reached out to them in the chat (#docs, in blender.chat) and @blendify assured me he is aware of this PR and hopes to get to it soon.

Blender 4.1 is coming in two weeks, and the blender devs are focused on that at the moment. I've reached out to them in the chat ([#docs, in blender.chat](https://blender.chat/channel/docs)) and @blendify assured me he is aware of this PR and hopes to get to it soon.

@Bill-Spitzak thanks for looking into this, a few notes:

  • Much of these instructions seems like something we could automate, for example, setting up the file association & thumbnailer would be nicer to have something similar to windows --register and --register-allusers, which would setup file associations & create a desktop file.

  • I'm not so keen on recommending users link files directly into /usr/, nowadays ~/.local/ is often used for user-local executable, mime types, desktop files etc. This also removes the need to use sudo for most/all commands.


Even though it would be good to have blender --register working, it's not a good reason to block this PR, I'll note some minor requests inline.

@Bill-Spitzak thanks for looking into this, a few notes: - Much of these instructions seems like something we could automate, for example, setting up the file association & thumbnailer would be nicer to have something similar to windows `--register` and `--register-allusers`, which would setup file associations & create a desktop file. - I'm not so keen on recommending users link files directly into `/usr/`, nowadays `~/.local/` is often used for user-local executable, mime types, desktop files etc. This also removes the need to use sudo for most/all commands. ---- Even though it would be good to have `blender --register` working, it's not a good reason to block this PR, I'll note some minor requests inline.
Campbell Barton requested changes 2024-04-03 14:37:49 +02:00
Dismissed
@ -12,16 +12,15 @@ Install from blender.org
========================
Download the Linux version for your architecture and decompress the file to the desired location

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``). ```
@ -0,0 +3,4 @@
Linux example install of downloaded Blender
*******************
The following commands sucessfully installed the downloaded 4.0.2 version of Blender

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. ```
@ -0,0 +34,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender /usr/bin/blender

Prefer ~/.local/bin over /usr/bin.

Prefer `~/.local/bin` over `/usr/bin`.
@ -0,0 +43,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender.desktop /usr/share/applications/

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

Prefer `~/.local/share/applications/` over `/usr/share/applications/`.
@ -0,0 +51,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender.svg /usr/share/icons/hicolor/scalable/apps/blender.svg

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

Prefer `~/.local/share/icons` over ` /usr/share/icons`
@ -0,0 +75,4 @@
Put the following into ``/usr/share/mime/packages/Overrides.xml``:
.. code-block:: xml

This seems like something Blender should bundle, then it can be installed via:

xdg-mime install x-blender.xml

Arch Linux for e.g. includes an x-blender.xml, so I assume we could bundle this too.

This seems like something Blender should bundle, then it can be installed via: ``` xdg-mime install x-blender.xml ``` Arch Linux for e.g. includes an `x-blender.xml`, so I assume we could bundle this too.
Author
First-time contributor

My system also already contained the .blend file mime type, but no icon for it. I just copied these instructions from a web page about adding mime types, do not know for certain if they work. I do not know enough about how to cleanly remove things (there seem to be cache files) in order to be able to actually test if this stuff works.

My system also already contained the .blend file mime type, but no icon for it. I just copied these instructions from a web page about adding mime types, do not know for certain if they work. I do not know enough about how to cleanly remove things (there seem to be cache files) in order to be able to actually test if this stuff works.
@ -0,0 +96,4 @@
.. code-block:: sh
sudo ln -s /opt/blender/blender-symbolic.svg \

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.
Author
First-time contributor

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.
@ -0,0 +108,4 @@
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``:

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

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

Submitted a WIP patch to handle some of these operations via blender --register blender/blender!120283.

Submitted a WIP patch to handle some of these operations via `blender --register` blender/blender!120283.
Campbell Barton requested changes 2024-04-18 04:48:09 +02:00
Campbell Barton left a comment
Owner

Since blender/blender@9cb3a17352, blender --register can be used, replacing many of the commends from the document.

Requesting changes to simplify text to remove commands now handled by register.

Since blender/blender@9cb3a17352bd7ed57df82f35a56dcf0af85fbf03, `blender --register` can be used, replacing many of the commends from the document. Requesting changes to simplify text to remove commands now handled by register.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u main:Bill-Spitzak-main
git checkout Bill-Spitzak-main

Merge

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff Bill-Spitzak-main
git checkout main
git merge --ff-only Bill-Spitzak-main
git checkout Bill-Spitzak-main
git rebase main
git checkout main
git merge --no-ff Bill-Spitzak-main
git checkout main
git merge --squash Bill-Spitzak-main
git checkout main
git merge Bill-Spitzak-main
git push origin main
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#104718
No description provided.