Рабочий стол добавления GNOME для меню GNOME, не проанализированного

Хороший день все

В соответствии с методом, указанным в GDM3 wiki для добавления файла на рабочем столе для меню GNOME,

Я получаю следующую ошибку:

Oct  4 09:54:06 cx-W55xEU gnome-software[1741]: failed to rescan: Failed to parse /home/cx/.local/share/applications/android-studio.desktop file: cannot process file of type application/x-desktop
Oct  4 09:54:47 cx-W55xEU gnome-software[1741]: failed to rescan: Failed to parse /usr/share/applications/android-studio.desktop file: cannot process file of type application/x-desktop

Файл на рабочем столе, который я пытаюсь создать, для Studio Android.

Содержание файла на рабочем столе

[Desktop Entry]

# The type as listed above
Type=Application

# The version of the desktop entry specification to which this file complies
Version=1.0

# The name of the application
Name=Android-Studio

# A comment which can/will be used as a tooltip
Comment=Android studio IDE

# The path to the folder in which the executable is run
Path=/opt/google/android-studio/android-studio/bin/

# The executable of the application.
Exec=studio.sh

# The name of the icon that will be used to display this entry
Icon=studio.png

# Describes whether this application needs to be run in a terminal or not
Terminal=false

# Describes the categories in which this entry should be shown
Categories=Education;Languages;Java;

Указанная ссылка пути содержит:

# ll /opt/google/android-studio/android-studio/bin/

total 152
drwxrwxr-x 1 root root   348 Sep 15 16:17 ./
drwxrwxr-x 1 root root   160 Sep 15 16:17 ../
-rw-r--r-- 1 root root   136 Sep 15 15:49 appletviewer.policy
-rwxr-xr-x 1 root root 23072 Sep 15 15:49 fsnotifier*
-rwxr-xr-x 1 root root 29648 Sep 15 15:49 fsnotifier64*
-rwxr-xr-x 1 root root 26453 Sep 15 15:49 fsnotifier-arm*
-rw-r--r-- 1 root root  7482 Sep 15 15:52 idea.properties
-rwxr-xr-x 1 root root   278 Sep 15 15:49 inspect.sh*
-rw-r--r-- 1 root root  8531 Sep 15 15:49 libbreakgen64.so
-rw-r--r-- 1 root root  6807 Sep 15 15:49 libbreakgen.so
drwxrwxr-x 1 root root    12 Sep 15 16:17 lldb/
-rw-r--r-- 1 root root  2275 Sep 15 15:49 log.xml
-rw-r--r-- 1 root root   527 Sep 15 15:49 studio64.vmoptions
-rw-r--r-- 1 root root  9816 Sep 15 15:49 studio.png
-rwxr-xr-x 1 root root  6876 Sep 15 15:49 studio.sh*
-rw-r--r-- 1 root root   534 Sep 15 15:49 studio.vmoptions

Это - любопытная ошибка относительно, у меня никогда не было проблемы как это при добавлении .desktop файла

Какие-либо мысли?

4
задан 4 October 2016 в 11:04

1 ответ

Я нашел свой ответ после 'крошечно-разрядного' больше поиска с помощью Google, удивительно что-то, что не упоминается на Wiki GDM, но чем-то, с чем я столкнулся случайно от сообщение askubuntu

Решение:

Добавляют bash -i infront Исполнительного файла, как показано

Exec=bash -i "/opt/google/android-studio/android-studio/bin/studio.sh" %f

Конечное решение

[Desktop Entry]

# The type as listed above
Type=Application

# The version of the desktop entry specification to which this file complies
Version=1.0

# The name of the application
Name=Android-Studio

# A comment which can/will be used as a tooltip
Comment=Android studio IDE

# The executable of the application.
Exec=bash -i "/opt/google/android-studio/android-studio/bin/studio.sh" %f

# The name of the icon that will be used to display this entry
Icon=/opt/google/android-studio/android-studio/bin/studio.png

# Describes whether this application needs to be run in a terminal or not
Terminal=false

# Describes the categories in which this entry should be shown
Categories=Education;Languages;Java;

StartupNotify=true

Примечание aswel, я добавил строку StartupNotify. Я нашел разумный explaination для его цели, aswel как несколько других компонентов .desktop файл

Hope, которой это помогает!

3
ответ дан 1 December 2019 в 10:01

Другие вопросы по тегам:

Похожие вопросы: