# Processing file association on Linux (Ubuntu)

**URL:** <https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637>\
**Category:** Processing\
**Created:** [July 15, 2020, 5:16pm UTC](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637 "2020-07-15T17:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RenanRabelo](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@RenanRabelo](https://discourse.processing.org/u/RenanRabelo)\
**Post date:** [July 15, 2020, 5:16pm UTC](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637/1 "2020-07-15T17:16:43Z")

</div>

I started using Linux Ubuntu this week and the first thing I realized when trying to install Processing is that it doesn’t appear in the apps panel nor is possible to execute the “Processing” file on the installation folder.  
I used the “Main menu” app to solve the apps panel problem, but I can’t open an sketch directly from the sketch file as I used to in Windows. Processing isn’t the default app to open .pde files and I can’t change it because my computer doesn’t recognize Processing as an app.  
Thank you

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [July 15, 2020, 9:46pm UTC](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637/2 "2020-07-15T21:46:49Z")

</div>

You need to create a new mime-type and .desktop file.

**1. Adding a mime type**

Create a new file named `text-pde.xml` in the location `~/.local/share/mime/packages/`. I prefer to do this using the terminal:

`vim ~/.local/share/mime/packages/text-pde.xml`

You can replace `vim` with the name of your preferred text/code editor (`gedit` if you’re on Ubuntu?).

Add the following code to this file:

```auto
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/pde">
    <glob pattern="*.pde" />
  </mime-type>
</mime-info>

```

Now, run `update-mime-database ~/.local/share/mime`

**2. The .desktop file**

Next, create a new file named `processing.desktop` in the location `~/.local/share/applications/`. Again, I prefer to do this using the terminal:

`vim ~/.local/share/applications/processing.desktop`

Add the following to it:

```auto
[Desktop Entry]
Name=Processing
Exec=/path/to/processing/processing %F
Icon=/path/to/processing/lib/icons/pde-256.png
Type=Application
Terminal=false

```

Of course, you’ll have to replace `/path/to/processing` with the relevant path to your Processing install.

Now, right-click on any sketch (.pde) file; select “open with” and browse the extended list of apps to set Processing to the default for that file type.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 15, 2020, 10:48pm UTC](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637/3 "2020-07-15T22:48:55Z")

</div>

- [Forum.Processing.org/two/discussion/1523/shortcut-for-processing-in-ubuntu-13-10-and-unity#Item\_5](http://Forum.Processing.org/two/discussion/1523/shortcut-for-processing-in-ubuntu-13-10-and-unity#Item_5)
