3

I am working on Blender recently, but the problem turns up when I set up the desktop icon file. Sometimes I need Blender to open with a terminal, but most time is "no it is not useful". Although I can open a terminal and type blender to do so, but it is not convince, I think. What I want is a desktop/launcher icon with a "Open with terminal" item. I find a tutorial on help.ubuntu, and here is my desktop file(an action is added):

#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Blender
GenericName=3D modeler
Comment=3D modeling, animation, rendering and post-production
Keywords=3d;cg;modeling;animation;painting;sculpting;texturing;video editing;video tracking;rendering;render engine;cycles;game engine;python;
Exec=blender %f
Icon=blender
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;
MimeType=application/x-blender;
Name[en_US]=Blender

Actions=with_terminal

[Desktop Action with_terminal]
Name=Open-With-terminal
Exec=blender %f
Terminal=true
OnlyShowIn=Unity;

But actually, when I click on the right click list, the program start but no terminal was opened. For a detail description, here are my pictures(Sorry I cannot show a picture, but superlinks in my question for less reputations). enter image description here

Also, I want a customized icon not only in my launcher but on my desktop as well. enter image description here

In short, there are two problems:

  1. Why the terminal not turn up from the right click action?

  2. Can I customize the right click item on my desktop?

muru
  • 207,228

1 Answers1

1

These are actually two questions, but here we go:

  1. In a .desktop file, usually, combining Terminal=false and Terminal=true is not working out well. Most of the time, only one works well, the one in the "main" command. Alternatively, set for the command:

    Exec=gnome-terminal -e <command>
    

    In this case:

    Exec=gnome-terminal -e blender
    
  2. For your second issue, adding right-click option to the icon on your desktop: I do not have a Blender- specific solution, but you can create a small script:

    #!/bin/bash
    gnome-terminal -e blender
    

    Save it as Blender_wterminal (no extension) in

    ~/.local/share/nautilus/scripts
    

    Create the directory if it does not exist yet. Make the script executable. Subsequently, you might have to log out/in.

    Then, on right- click on any icon on your desktop, choose scripts > Blender_wterminal will open Blender in the terminal.

    enter image description here

Jacob Vlijm
  • 85,475