ทางลัดบนเดสก์ท็อปสำหรับแผ่นงาน LibreCalc

Jul 04 2020

ฉันเพิ่งอัปเกรดจาก 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 ดั้งเดิมของฉันดังนั้นหนึ่งในข้อความที่ฉันเพิ่มหลังจากคำแนะนำของ Eliah ต้องมีการเปลี่ยนแปลงบางอย่าง

คำตอบ

1 vanadium Jul 04 2020 at 02:09

ในกรณีของคุณวิธีการใช้ซอฟต์ลิงก์นั้นรวดเร็วและชัดเจนกว่าการทำงานกับ.desktopไฟล์มาก

Symlinks

ซอฟต์ลิงค์บนเดสก์ท็อปใช้งานได้ใน Ubuntu 20.04 บางทีปัญหาของคุณอยู่ที่การสร้างซอฟต์ลิงค์บนเดสก์ท็อป

แน่นอนว่าจะใช้ไม่ได้อีกต่อไปโดยใช้Ctrl+ Shiftแล้วลากหรือลากซอฟต์ลิงก์จากไฟล์ไปยังเดสก์ท็อป ใช้หนึ่งในวิธีต่อไปนี้เพื่อสร้างซอฟต์ลิงก์บนเดสก์ท็อป:

  • สร้างซอฟต์ลิงก์ของคุณในโฟลเดอร์ "เดสก์ท็อป" ในหน้าต่างไฟล์ ทุกไฟล์ที่คุณวางไว้จะปรากฏบนเดสก์ท็อป ซอฟต์ลิงก์ของคุณจะใช้งานได้: คุณจะสามารถดับเบิลคลิกที่ไอคอนบนเดสก์ท็อปเพื่อเปิดสเปรดชีต
  • หรือสร้างซอฟต์ลิงก์จากเมนูคลิกขวาของไฟล์ ในการมีตัวเลือกนั้นคุณต้องเปิดใช้งานในการตั้งค่าแท็บพฤติกรรม: เลือก "แสดงการดำเนินการเพื่อสร้างลิงก์สัญลักษณ์" หลังจากสร้างแล้วให้กดCtrl+ xจากนั้นคลิกขวาที่เดสก์ท็อปแล้วเลือก "วาง"

ตัวเรียกใช้. เดสก์ท็อป

.desktopไฟล์ของคุณถูกต้องและควรใช้งานได้หาก Libreoffice เข้าถึงไดรฟ์ที่ต่อเชื่อม บางทีคุณอาจใช้ Libreoffice เวอร์ชัน Snap ในกรณีนี้คุณจะต้องเปิดใช้งานโดยเชื่อมต่อ Libreoffice กับอินเทอร์เฟซสื่อแบบถอดได้

ไฟล์ที่ติดดาว

คุณลักษณะใหม่ที่เหมาะกับกรณีผู้ใช้ของคุณเป็นอย่างดีคือคุณลักษณะ "ไฟล์ที่ติดดาว" หลังจากติดดาวแล้วจะปรากฏในโฟลเดอร์ที่ติดดาวในไฟล์

Noname Jul 04 2020 at 01:24

ฉันได้ติดตั้ง LibreOffice จาก repo อย่างเป็นทางการแล้ว ฉันใช้ 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