LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-23-2018, 10:10 AM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Rep: Reputation: 13
Libre Office, open file with other application


With Libre Office open and showing a list of files in a directory, right click on a dot cpp file and select
Quote:
Open with Other Application
Libre presents a list of Recommended Applications with one entry that is not what I want. At the bottom click
Quote:
View All Applications
A longer list is presented. Vi and vim are not present. I detect no method of adding either one.
What are the steps needed to add vi to the list of Recommended Applications?
 
Old 04-23-2018, 02:28 PM   #2
bgstack15
Member
 
Registered: Jul 2017
Distribution: korora
Posts: 90

Rep: Reputation: Disabled
Generally, you can use a mime editor to update what application is used to open files. In a graphical desktop environment, you probably will need to make a .desktop file in /usr/share/applications/.

Copy one of the existing .desktop files in there, and update it to execute /usr/bin/vi, along with the other properties that are fairly obvious.

Once you have that vim.desktop, your DE should be able to show you vim in the list of "other applications."
 
Old 04-23-2018, 03:30 PM   #3
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
I am a Linux novice but I did try this:
Quote:
cd /usr/share/applications/
where there is a flock of mate* files. So right click on a file within Mate Files application / GUI to find this text in the user prompt:
Quote:
"Open With Other Applications"
Cool, so find the configuration file with that text using:
Quote:
grep -r "Open With Other" ./
That came up empty. Am I on the right track? I am looking for the right file to edit and include vi / vim as an option.

Last edited by bkelly; 04-23-2018 at 03:31 PM.
 
Old 04-23-2018, 04:05 PM   #4
bgstack15
Member
 
Registered: Jul 2017
Distribution: korora
Posts: 90

Rep: Reputation: Disabled
Quote:
Originally Posted by bkelly View Post
I am a Linux novice but I did try this:

where there is a flock of mate* files. So right click on a file within Mate Files application / GUI to find this text in the user prompt:

Cool, so find the configuration file with that text using:
That came up empty. Am I on the right track? I am looking for the right file to edit and include vi / vim as an option.

Nope. You're going in the wrong direction.

Generally, a desktop environment looks at the contents of the .desktop files. Each file represents a single application.
Here's an example file for you: /usr/share/applications/vim.desktop
Code:
[Desktop Entry]
Version=1.0
Name=vim
GenericName=Text Editor
Comment=Edit files
Exec=/usr/bin/vim %F
MimeType=text/plain;
Icon=vim
Terminal=true
Type=Application
StartupNotify=true
Categories=TextEditor;Development
Keywords=text;editor;
X-Desktop-File-Install-Version=0.23

You can get more details about what these items in a desktop file mean: https://specifications.freedesktop.o...ec-latest.html
 
Old 04-27-2018, 12:49 PM   #5
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
Quote:
Originally Posted by bgstack15 View Post
Nope. You're going in the wrong direction.

Generally, a desktop environment looks at the contents of the .desktop files. Each file represents a single application.
Making this short, you wrote I am going in the wrong direction but I read your post as indicating I am going in the right direction.

Mate has a bunch of .desktop files. I did find this one:
Quote:
mate-panel.desktop
That has this comment:
Quote:
Launch other applications ....
However, there is no list of other applications to launch.

If you have MATE on your system and know how to edit the dot desktop files, please tell me where and how to edit in order to add vi to the list of other application for opening a file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Libre office vs Open office Arcane Linux - Software 25 11-26-2019 05:57 PM
Libre Office and Open Office both fail to open MS Office documents correctly. Observed Linux - Newbie 8 07-18-2014 10:48 AM
[SOLVED] libre office writer cannot open older file drmjh Linux - General 1 05-05-2013 02:51 PM
Unoconv Convertor for RHEL 6 : Libre office & open office utility vishwajeet jagtap Linux - Software 0 02-15-2013 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration