DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default Using nnn filemanager

In another thread:
Quote:
Originally Posted by victorvas View Post
Try nnn file browser (nnn-1.8.tgz), it's the best!
So I decided to try it, and like it, how ever it uses Gimp by default to open/view any images, and I read the manual, but can not find anything on how to change that.
I would like to have it using ImageMagick as the default if possible, anyone know how to change that ?
__________________
My best friends are parrots
Reply With Quote
  #2   (View Single Post)  
Old 25th May 2019
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

It uses xdg-open so it's likely that xdg-open is pointing to GIMP for images. You'll have to change it there.
Reply With Quote
  #3   (View Single Post)  
Old 25th May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Thanks
__________________
My best friends are parrots
Reply With Quote
  #4   (View Single Post)  
Old 25th May 2019
victorvas's Avatar
victorvas victorvas is offline
Real Name: Victor
Port Guard
 
Join Date: May 2019
Posts: 22
Default

Quote:
Originally Posted by ibara View Post
It uses xdg-open so it's likely that xdg-open is pointing to GIMP for images. You'll have to change it there.
It is indeed using xdg-open to determine default applications.
Also:
nnn does not use a config file. Instead it uses environmental variables from ~/.profile
for example: export NNN_SCRIPT="$HOME/.scripts/myScript
or for bookmarks:
export NNN_BMS="h:~;d:~/Documents;D:~/Downloads;w:~/Work;W:~/Work/.prn"
In nnn if you press "?" it will print out list of all hotkeys and stuff. (press "q" to go back to file browser)

ImageMagick? Try feh (feh-2.27.tgz)!
Reply With Quote
  #5   (View Single Post)  
Old 25th May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Ok, thanks,
Quote:
Also:
nnn does not use a config file.
I noticed that in the manual, but I still am not even coming close to understand this, I also looked at
'man xdg-open', which also suggested 'xdg-settings' and the xdg-setttings even had some examples, but only for :
Quote:
xdg-settings check default-web-browser firefox.desktop

Set the default web browser to google-chrome.desktop

xdg-settings set default-web-browser google-chrome.desktop

Set the default mailto URL scheme handler to be evolution.desktop

xdg-settings set default-url-scheme-handler mailto evolution.desk
Nothing on default graphics, ... I did see though, where there was a "gimp.desktop" file, so that gave me a idea, and it worked, I deleted the "Gimp" package, and now it (nnn) opens any images with the "netsurf" browser, which is ok since usually that is all I want to do is view the image.
I noticed with the key board shortcuts, or hotkeys,
Quote:
In nnn if you press "?" it will print out list of all hotkeys and stuff.
Code:
    ^O | Open with...
But using "^O " does not seem to give me any "open with" option,... any way , thanks for the "hints",
__________________
My best friends are parrots
Reply With Quote
  #6   (View Single Post)  
Old 25th May 2019
victorvas's Avatar
victorvas victorvas is offline
Real Name: Victor
Port Guard
 
Join Date: May 2019
Posts: 22
Default

Check default app:
xdg-mime query default image/png

Set feh as default app:
xdg-mime default feh.desktop image/png
xdg-mime default feh.desktop image/jpg
xdg-mime default feh.desktop image/bmp
for ImageMagick it should be something like display-im6.desktop
Reply With Quote
  #7   (View Single Post)  
Old 25th May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Thanks, That works, now it is using "feh" to open the images. If I want to use ImageMagick, I need to look into that more, but it probably will be easier to simpl use the 'display' command, when I want to open a image with ImageMagick,.. Thanks
__________________
My best friends are parrots
Reply With Quote
  #8   (View Single Post)  
Old 25th May 2019
victorvas's Avatar
victorvas victorvas is offline
Real Name: Victor
Port Guard
 
Join Date: May 2019
Posts: 22
Default

You're welcome. ImageMagick is actually a set of tools, and it's tool for displaying images is display, however it's *.desktop name is different (something like display-im6.desktop).
Reply With Quote
  #9   (View Single Post)  
Old 25th May 2019
victorvas's Avatar
victorvas victorvas is offline
Real Name: Victor
Port Guard
 
Join Date: May 2019
Posts: 22
Default

In Linux there is display-im6.desktop, but in OpenBSD you need to create one.

as root:
cd /usr/local/share/applications/
cp feh.desktop display-im6.desktop

then edit display-im6.desktop, replacing feh:

[Desktop Entry]
Name=ImageMagick
GenericName=Image viewer
Comment=Display and edit image files
Exec=display %U
Terminal=false
Type=Application
Icon=display-im6
Categories=Graphics;
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap;

then:
chown root:bin display-im6.desktop


as regular user:

xdg-mime default display-im6.desktop image/png
xdg-mime default display-im6.desktop image/jpg
xdg-mime default display-im6.desktop image/bmp

etc. for other mime types you need to be opened in ImageMagick
Reply With Quote
Old 25th May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Thanks, Yes, that was the conclusion I came to as well, I had searched and searched, and did not find one, so was figuring I would need to create one, but had not begun to try that.
__________________
My best friends are parrots
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick