DEV Community

Chris
Chris

Posted on

How to Fully Integrate CoppeliaSim in Ubuntu (Command Line & Desktop)

This guide provides a complete workflow for integrating a manually downloaded CoppeliaSim package into your Ubuntu system.

It covers moving it to a system-wide directory, making it runnable from the terminal, and adding a proper application launcher to your dock (taskbar).

We will assume you have already downloaded and extracted the CoppeliaSim folder, for example, to

~/Downloads/CoppeliaSim_Edu_V4_x_x_Ubuntu...


Part 1: Move CoppeliaSim to a System-wide Location

Using a standard location like /usr/local keeps your home directory clean and is a common practice for manually installed software.

  1. Move the Folder

Open a terminal and move the extracted folder to /usr/local/CoppeliaSim. You will need sudo permissions.

   # Adjust the source path to match your downloaded folder name
   sudo mv ~/Downloads/CoppeliaSim_Edu_V4_x_x_Ubuntu... /usr/local/CoppeliaSim
Enter fullscreen mode Exit fullscreen mode


`

  1. Adjust Ownership

Change the ownership of the folder to your user. This allows you to run it without sudo and makes it easier to manage.

bash
# Replace $USER with your username (or just use the $USER variable)
sudo chown -R $USER:$USER /usr/local/CoppeliaSim


Part 2: Set Up Command-Line Access

This allows you to type coppeliasim in your terminal to launch the application from any directory.

  1. Create a Symbolic Link

Link the executable script to a location in your system's PATH.

bash
sudo ln -s /usr/local/CoppeliaSim/coppeliaSim.sh /usr/local/bin/coppeliasim

You can now test this by typing:

bash
coppeliasim

  1. (Optional) Set Environment Variable

Some integrations (like ROS or Python APIs) expect a COPPELIASIM_ROOT environment variable.
Add this to your shell configuration file (e.g., ~/.bashrc or ~/.zshrc).

bash
echo 'export COPPELIASIM_ROOT=/usr/local/CoppeliaSim' >> ~/.bashrc
# Apply the changes to your current terminal session
source ~/.bashrc


Part 3: Create a Desktop Launcher (Dock Icon)

This creates a clickable icon in your Show Applications menu, which you can then pin to your dock.

Step 3.1: Download and Place a Logo

The default .desktop file may not have a high-quality icon. We can download one and place it in the installation directory.

  1. Download the Logo

bash
wget -O ~/Downloads/logo.png https://user-images.githubusercontent.com/8070210/114549467-5793d900-9c61-11eb-88f2-24996a6c03e6.png

  1. Create the Icon Folder

We'll place the logo inside the helpFiles directory. The -p flag creates parent directories if needed.

bash
sudo mkdir -p /usr/local/CoppeliaSim/helpFiles

  1. Move and Secure the Logo

bash
sudo mv ~/Downloads/logo.png /usr/local/CoppeliaSim/helpFiles/logo.png
sudo chown $USER:$USER /usr/local/CoppeliaSim/helpFiles/logo.png
sudo chmod 644 /usr/local/CoppeliaSim/helpFiles/logo.png


Step 3.2: Create the .desktop File

Application launchers are defined by .desktop files. We will create one for the current user.

bash
nano ~/.local/share/applications/CoppeliaSim.desktop


Step 3.3: Edit the .desktop File Content

Paste the following into the editor:

ini
[Desktop Entry]
Name=CoppeliaSim
Comment=Robotics simulation software
Exec=/usr/local/CoppeliaSim/coppeliaSim.sh
Icon=/usr/local/CoppeliaSim/helpFiles/logo.png
Terminal=false
Type=Application
Categories=Science;Education;Robotics;
StartupWMClass=CoppeliaSim

Field Explanations

  • Name: The name that appears in the applications menu.
  • Exec: The absolute path to the launch script.
  • Icon: The absolute path to the icon file we just moved.
  • Terminal: false because this is a GUI application.
  • Categories: Helps the app show up in the correct menu categories.
  • StartupWMClass: Ensures the dock recognizes the app window correctly (prevents duplicate icons).

Save and exit nano:

text
Ctrl + O, Enter, Ctrl + X


Step 3.4: Find the Correct StartupWMClass (Optional but Recommended)

The value CoppeliaSim is often correct, but this can vary.
If you get a duplicate icon on your dock, follow these steps:

  1. Launch CoppeliaSim:

bash
coppeliasim

  1. In another terminal, run:

bash
xprop | grep WM_CLASS

  1. Click on the running CoppeliaSim window.

  2. The terminal will output something like:


WM_CLASS(STRING) = "some-string", "CoppeliaSim"

  1. The second value (e.g., "CoppeliaSim") is what you should use for StartupWMClass in your .desktop file.

Step 3.5: Make Executable and Add to Dock

  1. (Optional) Make Executable

Some systems require the .desktop file to be executable.

bash
chmod +x ~/.local/share/applications/CoppeliaSim.desktop

  1. Add to Favorites (Pin to Dock)
  • Open the Show Applications menu (the grid icon).
  • Search for CoppeliaSim.
  • Right-click it and select Add to Favorites.

You’re all set!
CoppeliaSim is now fully integrated into your Ubuntu system.

Top comments (0)