# application show the banner image

**URL:** https://discourse.cmake.org/t/application-show-the-banner-image/7134
**Category:** Usage
**Tags:** os:linux
**Created:** [December 27, 2022, 7:20am UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134 "2022-12-27T07:20:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)
#### Post date: [December 27, 2022, 7:20am UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/1 "2022-12-27T07:20:45Z")

</div>

![image](https://discourse.cmake.org/uploads/default/original/2X/7/7f9eabf7488c353ffab4c18f87bc779aa1b34f07.png)

I write a application with cmake  
how to show the image when I start my application.  
Like google, picture, …  
 ![image](https://discourse.cmake.org/uploads/default/original/2X/1/1e287fa90d6c6af4d9357016251e0274ed3a7862.png)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 28, 2022, 12:40pm UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/2 "2022-12-28T12:40:58Z")

</div>

This probably involves a `.desktop` file. You’ll need to package one properly with your application for this to work; CMake doesn’t do anything with these icons on Linux.

---

<div class="post-metadata">

### Author: ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)
#### Post date: [December 29, 2022, 2:07am UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/3 "2022-12-29T02:07:34Z")

</div>

Do you have the sample for all process.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 29, 2022, 2:29am UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/4 "2022-12-29T02:29:44Z")

</div>

ParaView’s `.desktop` file is [here](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Clients/ParaView/org.paraview.ParaView.desktop.in). The CMake code to handle installation is [here](https://gitlab.kitware.com/paraview/paraview/-/blob/1e2b3ec47d811fd1d4ff606122240a62657392dc/Clients/ParaView/CMakeLists.txt#L140-160). The [spec](https://specifications.freedesktop.org/desktop-entry-spec/latest/) has more fields that may be of interest.

---

<div class="post-metadata">

### Author: ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)
#### Post date: [December 29, 2022, 3:25am UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/5 "2022-12-29T03:25:48Z")

</div>

It is so great. Thanks

I only see it put the .desktop into “${CMAKE\_INSTALL\_DATAROOTDIR}/applications”  
And then nothing to do. Does the project have the special command to implement the .desktop

###############################

> <https://stackoverflow.com/questions/14235798/specify-an-icon-and-menu-entry-for-cmake-cpack-application>

Here I found.  
But I meet the problem that the command is not work.  
If it work, I expect the 123.desktop will write to ~/.local/share/applications/123.desktop

```auto
sudo xdg-desktop-menu install --novendor --mode system /usr/share/applications/123.desktop

or 

sudo xdg-desktop-menu install --novendor --mode user /usr/share/applications/123.desktop

```

Here is the successful command without sudo.  
And it will write 123.desktop to ~/.local/share/applications/123.desktop.  
But there is not the 123.desktop on ~/.local/share/applications/ for the other user

```auto
xdg-desktop-menu install --novendor /usr/share/applications/123.desktop

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 29, 2022, 12:54pm UTC](https://discourse.cmake.org/t/application-show-the-banner-image/7134/6 "2022-12-29T12:54:38Z")

</div>

If you’re installing for multiple users, you can install to the system location. If you want it to be user-local, each user will need to install the application themselves.
