Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 801  / 3 Years ago, sun, june 6, 2021, 2:38:46

I trying to run IDEA from dash menu. So I've create .desktop file for it and put it to /usr/share/applications:



$ cat /usr/share/applications/idea.desktop
[Desktop Entry]
Name=IDEA
Comment=IntelliJ IDEA
Exec=/opt/idea/bin/idea.sh
Icon=/opt/idea/bin/idea.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Development;IDE;Java;

$ ls -l /usr/share/applications/idea.desktop
-rw-rw-r-- 1 root root 179 Oct 3 11:01 /usr/share/applications/idea.desktop


When I type idea in dash I can see IDEA's icon, but when I click on it application not start. In the same time if i run /opt/idea/bin/idea.sh from console, it will run.



How to solve (or debug) this problem?


More From » unity-dash

 Answers
4

Possibly, you are missing some environment variables. Maybe some entries in your $PATH? How about the following. Create a script, say /home/user/testidea.sh (where user is your actual username, of course), containing




#!/bin/bash

/opt/idea/bin/idea.sh 2> /tmp/idea.err > /tmp/idea.out


Make it executable



chmod a+x /home/user/testidea.sh


And replace the respective line in the idea.desktop file by



exec=/home/user/testidea.sh


Maybe that will work, but if not, at least (hopefully) you will find what is wrong by inspecting /tmp/idea.err and /tmp/idea.out.


[#35062] Sunday, June 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
olltea

Total Points: 238
Total Questions: 115
Total Answers: 107

Location: Moldova
Member since Tue, Feb 7, 2023
1 Year ago
;