LibreCalcシートのデスクトップショートカット
最近、16.04から20.04にアップグレードしました。私はしばらくの間(明らかに)Ubuntuを使用していますが、明らかに私は教祖ではありません。
デスクトップに多くのアイコンを配置しないので、この点でのGNOMEの新しい制限はあまり心配しませんでした。ただし、私は頻繁に情報を入力する2つのスプレッドシートを持っているので、デスクトップフォルダー内のソフトリンクを使用して、これら2つのアイコンを常にデスクトップに配置しています。当然のことですが、それはもはや機能しません。
.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ファイルに含まれていたため、Eliahのアドバイスの後に追加したステートメントの1つが何かを変更したに違いないことに注意してください。
回答
あなたの場合、ソフトリンクを使用したアプローチは、.desktop
ファイルを操作するよりもはるかに迅速で明白です。
シンボリックリンク
デスクトップ上のソフトリンクはUbuntu20.04で機能します。おそらくあなたの問題はデスクトップ上にソフトリンクを作成することでしたか?
実際、Ctrl+Shiftを使用してドラッグしたり、ソフトリンクをファイルからデスクトップにドラッグしたりしても、これは機能しなくなります。次のいずれかの方法を使用して、デスクトップにソフトリンクを作成します。
- ファイルウィンドウの「デスクトップ」フォルダにソフトリンクを作成します。そこに配置したすべてのファイルがデスクトップに表示されます。ソフトリンクが機能します。デスクトップのアイコンをダブルクリックして、スプレッドシートを起動できます。
- または、ファイルの右クリックメニューからソフトリンクを作成します。このオプションを使用するには、[設定]の[動作]タブで有効にする必要があります。[シンボリックリンクを作成するためのアクションを表示する]をオンにします。作成後、Ctrl+をx押し、デスクトップを右クリックして[貼り付け]を選択します。
.desktopランチャー
あなたの.desktop
ファイルが正しいか、LibreOfficeのは、マウントされたドライブへのアクセス権を持っている場合は動作するはずです。おそらく、あなたはLibreofficeのSnapバージョンを実行しています。その場合は、Libreofficeをリムーバブルメディアインターフェイスに接続して有効にする必要があります。
スター付きファイル
ユーザーのケースに非常によく合う新機能は、「スター付きファイル」機能です。スターを付けた後、ファイルのスター付きフォルダーに表示されます。
公式リポジトリからLibreOfficeをインストールしました。私はCentOSを使用していますが、Ubuntuでも同じだと思います。/usr/share/applications/libreoffice-calc.desktop
ファイルを~/.local/share/applications
フォルダにコピーするだけで、このアイコンをデスクトップで使用できるようになります。
libreoffice-calc.desktop
(少しトリミングされた)の内容は次のとおりです。
# 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