# Starting Slicer in Ubuntu 20.04

**URL:** <https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078>\
**Category:** Support\
**Created:** [October 9, 2021, 5:03am UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078 "2021-10-09T05:03:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ogdenk](https://avatars.discourse-cdn.com/v4/letter/o/bbe5ce/32.png) [@ogdenk](https://discourse.slicer.org/u/ogdenk)\
**Post date:** [October 9, 2021, 5:03am UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/1 "2021-10-09T05:03:06Z")

</div>

Hi Everyone,

I am starting to use 3D Slicer in Linux. Overall it seems to be working great, but I have an issue with associating the application with the .mrml file format. I am not a long time Linux user, and I can’t seem to get this to work. Can someone offer me a suggestion for this?

Thanks!

Kent

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [October 9, 2021, 7:46am UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/2 "2021-10-09T07:46:41Z")

</div>

If you are already in your file manager, you could just drag and drop on a slice view or a 3D view.

File association depends on your desktop environment and file manager. In KDE/Dolphin, you would right click, Properties, Options. Not the best thing to do with Slicer files, it’s not like with a text editor that you would open and close many times a day.

---

<div class="post-metadata">

**Author:** ![ogdenk](https://avatars.discourse-cdn.com/v4/letter/o/bbe5ce/32.png) [@ogdenk](https://discourse.slicer.org/u/ogdenk)\
**Post date:** [October 12, 2021, 1:15pm UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/4 "2021-10-12T13:15:35Z")

</div>

Ok, Thanks for that. I was just hoping to avoid having to open Slicer, like I can do in Windows. Working in Ubuntu is just a little different, but no big deal.

Kent

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [October 12, 2021, 2:44pm UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/5 "2021-10-12T14:44:04Z")

</div>

you can write a little .desktop file, associate an icon it will be part of your applications. An example is here  
[virtualgl\_docker\_examples/slicer.desktop at vgl\_slicer\_turbovnc\_novnc-eglbackend · muratmaga/virtualgl\_docker\_examples · GitHub](https://github.com/muratmaga/virtualgl_docker_examples/blob/vgl_slicer_turbovnc_novnc-eglbackend/usr/share/applications/slicer.desktop).

Where you copy and add this file depends on your OS and window manager though.

@lassoan is it possible to bundle something like this in Slicer or have an easier way to integrate with the UIs application menu?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 12, 2021, 4:19pm UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/6 "2021-10-12T16:19:12Z")

</div>

What do you do with such a .desktop file?  
Drag-and-drop it somewhere in the window manager?

Does the file have to contain absolute path to the Slicer executable? If yes, then the file has to be generated at runtime. How is it usually done in other applications? Is a popup shown after the application starts?

Somewhat related: how file associations and custom URL handlers are usually set up on popular distributions and window managers?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [October 12, 2021, 4:46pm UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/7 "2021-10-12T16:46:41Z")

</div>

In most linuxes that I used (ubuntu/centos) they are added to /usr/share/applications to make it an item available in the start menu. but requires sudo access, and since most people use apt or yum to install these packages, it is not issue for them, but it would be for us.

I was hoping someone more knowledgeable than me with Linux can clarify if it is possible to do this in user space, without sudo access and in a WM generic way. I think some files written under .config.

I am not sure about the absolute vs relative path issue. I always put the full path to the executable. But in our case it is not predictable.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 12, 2021, 5:12pm UTC](https://discourse.slicer.org/t/starting-slicer-in-ubuntu-20-04/20078/8 "2021-10-12T17:12:49Z")

</div>

I’ve never explored these options deeply in linux because there’s so much variability across distributions. If we want to help people do this I’d suggest developing a script that would perform linux-specific customizations on the fly and let people debug and contribute so that it supports a range of systems.
