Announcement

Collapse
No announcement yet.

[SOLVED] Dolphin - Trying to create a service menu to create new OOo files

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Dolphin - Trying to create a service menu to create new OOo files

    I know this might be a weird question but could you please tell me what should I add to the following .desktop file in order to make it possible for me to create a new OOo file just like we create a new text or html file on Dolphin?

    I know this script is incorrect, incomplete, that's why I'm asking for your help. I know I may take a look at DBUS but after several attempts to find the right exec instruction or command I gave up... Well, DBUS didn't make it easy, it should be terminated every so often... I guess it's quite unstable.

    Code:
    [Desktop Entry]
    Type=Service
    Actions=make_new_odt;make_new_ods;make_new_odp
    Encoding=UTF-8
    Version=1.4
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/all
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=Create New
    X-KDE-Submenu[es]=Crear Nuevo
    
    [Desktop Action make_new_odt]
    Exec=
    Icon=application-vnd.oasis.opendocument.text
    Name=ODT File
    Name[es]=Archivo ODT
    
    [Desktop Action make_new_ods]
    Exec=
    Icon=application-vnd.oasis.opendocument.spreadsheet
    Name=ODS File
    Name[es]=Archivo ODS
    
    [Desktop Action make_new_odp]
    Exec=
    Icon=application-vnd.oasis.opendocument.presentation
    Name=ODP File
    Name[es]=Archivo ODP
    Multibooting: Kubuntu Noble 24.04
    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win XP, 7 & 10 sadly
    Using Linux since June, 2008

    #2
    Re: Dolphin - Trying to create a service menu to create new OOo files

    This was tested with the KDE 4.2 (JJ)

    KDE has a build in template/create new system. If you drop a desktop file to the /usr/share/templates/ and a template source file to the /usr/share/templates/.source/ you will get new "Create New" options to the Dolphin, Konqueror and the Folder view plasmoid.


    Example:

    Making BashScript.desktop file ( /usr/share/templates):
    Code:
    [Desktop Entry]
    Name=Bash File.sh...
    Type=Link
    URL=.source/BASHFile.sh
    Icon=text-x-script
    X-Ubuntu-Gettext-Domain=desktop_kdebase

    and a template source file, BASHFile.sh, (/usr/share/templates/.source):
    Code:
    #!/bin/bash

    Now: Right click > Create New > Bash file.sh > ...




    You probably could use the OO files as template sources. The "Create New" system is a copy (from: URL=.source/BASHFile.sh) with a name query.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      [SOLVED] Dolphin - Trying to create a service menu to create new OOo files

      Interesting...

      I tried it and it really works this way. Excellent, I never thought it could be so damn easy. Thanks for your help, pal.

      By the way, where can I take a look at the available icons for this kind of menus?
      Multibooting: Kubuntu Noble 24.04
      Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
      Win XP, 7 & 10 sadly
      Using Linux since June, 2008

      Comment


        #4
        Re: [SOLVED] Dolphin - Trying to create a service menu to create new OOo files

        Well, I guess I ended up answering my own question regarding the available icons that I might choose in order to let the system show the correct icon type for a specific file type menu. Open the .desktop file and look for Icon= and replace it with the following one...

        Code:
        Icon=application-vnd.oasis.opendocument.text
        will show you an icon that belongs to a OOo Document. Just replace text with spreadsheet or presentation and voila you've got what you were looking for.

        I could find the right icon name by just clicking on a desktop shortcut properties and then on its respective icon button. On the new window I picked up Mimetypes next to System icons. Now you can just choose the icon of your liking... well, don't choose it just hover over the icon and there's the name you need to enter after Icon= in the .desktop script file so it shows that very same icon on your brand new service menu option.

        Edit...

        Here's what you need if any of you are also interested in adding such options to Konqueror and Dolphin.

        Code:
        [Desktop Entry]
        Name=OOo3 Document File...
        Comment=Enter Document filename:
        Comment[it]=Inserisci il nome per il file:
        Type=Link
        URL=.source/OOo3Document.ods
        Icon=application-vnd.oasis.opendocument.text
        X-Ubuntu-Gettext-Domain=desktop_kdebase
        The only thing that changes in every single .desktop file is the following line:

        Icon=application-vnd.oasis.opendocument.text

        Replace it with:

        Icon=application-vnd.oasis.opendocument.presentation

        or

        Icon=application-vnd.oasis.opendocument.spreadsheet
        Multibooting: Kubuntu Noble 24.04
        Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
        Win XP, 7 & 10 sadly
        Using Linux since June, 2008

        Comment

        Working...
        X