Ярлык на рабочем столе для листа LibreCalc

Я недавно обновился с 16.04 до 20.04. Я уже давно пользуюсь Ubuntu (очевидно), но, разумеется, я не гуру.

Я не размещаю много иконок на своем рабочем столе, поэтому новые ограничения GNOME в этом отношении меня не слишком беспокоили. , У меня, однако, есть две таблицы, в которые я часто вводю информацию, поэтому я всегда помещаю значки для этих двух на рабочий стол, используя программные ссылки в папке рабочего стола. Не удивительно - это больше не работает.

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

Я создал это ePayments.desktop в ~ / .local / share / Applications и он появляется в «Показать приложения». Когда я нажимаю на него, LibreOffice начинает открываться, но я получаю только сообщение об ошибке:

/Bookkeeping/2020ePayments.ods does not exist

Вот содержимое моего файла ePayments.desktop :

[Desktop Entry]
Name=ePayments spreadsheet
Exec=xdg-open /mnt/Data/Bookkeeping/2020ePayments.ods
Comment=Open ePayments spreadsheet
Terminal=false
Type=Application
Icon=x-office-spreadsheet
$ ls -l /mnt/Data/Bookkeeping
-rwx------  1 brent brent 96249 Jul  3 09:25 2020ePayments.ods

Спасибо за любую помощь!

Обновление

Элия -

Я вставил параметры из файла, который вы опубликовали. В результате получается файл .desktop :

[Desktop Entry]  
Name=ePayments spreadsheet  
Exec=libreoffice --calc %U  
Comment=Open ePayments spreadsheet  
Terminal=false  
Type=Application  
Icon=libreoffice-calc  
StartupNotify=true  
X-GIO-NoFuse=true  

Я все еще получаю то же сообщение об ошибке. Я пропустил суть?


Решение снизу.

Замените оператор Exec = в файле .desktop выше на:

Exec=xdg-open /mnt/Data/Bookkeeping/2020ePayments.ods

Обратите внимание, что оператор Exec = был в моем исходном файле .desktop, поэтому одно из утверждений, которые я добавил после совета Елиаха, должно было что-то изменить.

1
задан 25 July 2020 в 13:59

2 ответа

In your case, the approach with a softlink is much quicker and obvious than working with a .desktop file.

Symlinks

Soft links on the desktop do work in Ubuntu 20.04. Perhaps your issue was in creating the soft link on the desktop?

Indeed, that will not work anymore using Ctrl+Shift and dragging, or dragging a soft link from Files to the desktop. Use one of the following methods to create a softlink on the desktop:

  • Create your softlinks in the folder "Desktop" in a Files window. Every file you place there will appear on the desktop. Your softlinks will work: you will be able to double click the icon on the desktop to launch the spreadsheet.
  • Alternatively, create the softlink from the right-click menu of the file. In order to have that option, you need to enable it in Preferences, Behavior tab: check "Show action to create symbolic links". After creation, hit Ctrl+x, then right-click the desktop and select "Paste".

.desktop launcher

Your .desktop file is correct and should work if Libreoffice has access to the mounted drive. Perhaps you are running the Snap version of Libreoffice. If that is the case, you will need to enable that by connecting Libreoffice to the removable-media interface.

Starred files

A new feature that would very well fit your user case, is the "Starred files" feature. After starring, they appear in the Starred folder in Files.

1
ответ дан 30 July 2020 в 22:14

I have installed LibreOffice from the official repo. I use CentOS, but I think it is the same in Ubuntu too. You can simply copy /usr/share/applications/libreoffice-calc.desktop file to the ~/.local/share/applications folder, so that this icon is available on your desktop.

Here is the content of libreoffice-calc.desktop (trimmed up a little):

# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
#   Licensed to the Apache Software Foundation (ASF) under one or more
#   contributor license agreements. See the NOTICE file distributed
#   with this work for additional information regarding copyright
#   ownership. The ASF licenses this file to you under the Apache
#   License, Version 2.0 (the "License"); you may not use this file
#   except in compliance with the License. You may obtain a copy of
#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-calc
Type=Application
Categories=Office;Spreadsheet;X-Red-Hat-Base;X-MandrivaLinux-Office-Spreadsheets;
Exec=libreoffice --calc %U
MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;text/csv;application/x-dbf;text/spreadsheet;application/csv;application/excel;application/tab-separated-values;application/vnd.lotus-1-2-3;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/x-dbase;application/x-dos_ms_excel;application/x-excel;application/x-msexcel;application/x-ms-excel;application/x-quattropro;application/x-123;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.ms-works;application/clarisworks;application/x-iwork-numbers-sffnumbers;application/x-starcalc;
Name=LibreOffice Calc
GenericName=Spreadsheet
GenericName[ru]=Электронная таблица
Comment=Perform calculations, analyze information and manage lists in spreadsheets by using Calc.
Comment[ru]=Выполнение вычислений, анализ информации и управление списками в электронных таблицах с помощью Calc.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Accounting;Stats;OpenDocument Spreadsheet;Chart;Microsoft Excel;Microsoft Works;OpenOffice Calc;ods;xls;xlsx;
InitialPreference=5
StartupWMClass=libreoffice-calc
X-KDE-Protocols=file,http,ftp,webdav
X-TryExec=oocalc

Actions=NewDocument;
[Desktop Action NewDocument]
Name=New Spreadsheet
Name[ru]=Создать эл.таблицу
Exec=libreoffice --calc
0
ответ дан 30 July 2020 в 22:14

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

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