[SOLVED] Leafpad opens .png files by default
[SOLVED] Leafpad opens .png files by default
Alll my file managers (thunar, dolphin, spacefm, mc) open *.png files with leafpad which naturally does not make sense.
This is when I open the FMs as user. If I open as sudo the *.png files open with gthumb.
How can I change this that as user FMs will open with gthumb or viewnior?
This is when I open the FMs as user. If I open as sudo the *.png files open with gthumb.
How can I change this that as user FMs will open with gthumb or viewnior?
Last edited by Atip on 3. Jan 2017, 03:24, edited 1 time in total.
-
- Posts: 539
- Joined: 20. Jun 2016, 20:15
Re: Leafpad opens .png files by default
There are tools to do that but I don't remember which right now. Anyway you could type this as regular user:or directly edit the file ~/.local/share/applications to have in it:Of course replace viewnior with gthumb if you prefer.
Code: Select all
sed -i "s/png=.*/png=viewnior/" ~/.local/share/applications/defaults.list
Code: Select all
image/png=viewnior.desktop
image/x-png=viewnior.desktop
Re: Leafpad opens .png files by default
This can also be done at the graphical interface with graphical dialog, e.g. with thunar, instead of editing files.Atip wrote:Alll my file managers (thunar, dolphin, spacefm, mc) open *.png files with leafpad which naturally does not make sense.
This is when I open the FMs as user. If I open as sudo the *.png files open with gthumb.
How can I change this that as user FMs will open with gthumb or viewnior?
To do this, open the context menu of the PNG file to be opened in thunar and choose "Open with another application..." (possibly not literally). In the list that opens, select the application to be assigned. Then check the box "Use for files of this type" (possibly not literally). Then click on "Open" (possibly not literally). That's it.
Re: Leafpad opens .png files by default
This line:
is the default .local/share/applications/defaults.list. See: https://github.com/gapan/user-settings- ... aults.list
So this doesn't happen by default, it's something you did after installation.
Code: Select all
image/png=viewnior.desktop
So this doesn't happen by default, it's something you did after installation.
Re: Leafpad opens .png files by default
Thanks all!
There is/was nothing wrong with ~/.local/share/applications/defaults.list.
After setting in thunar and dolphin to open *.png files with viewnior as default
application spacefm and mc followed suite automatically.
There is/was nothing wrong with ~/.local/share/applications/defaults.list.
After setting in thunar and dolphin to open *.png files with viewnior as default
application spacefm and mc followed suite automatically.

Re: Leafpad opens .png files by default
Yes, like upgrading with gslapt libpng after which I could not open dillo and gedit anymore since libpng*s needed for those programs went missinggapan wrote:This line:is the default .local/share/applications/defaults.list. See: https://github.com/gapan/user-settings- ... aults.listCode: Select all
image/png=viewnior.desktop
So this doesn't happen by default, it's something you did after installation.


Re: Leafpad opens .png files by default
What on earth are you talking about? If any of that happened, you're not using Salix.Atip wrote:Yes, like upgrading with gslapt libpng after which I could not open dillo and gedit anymore since libpng*s needed for those programs went missingand possibly caused problem of Re: Subject as well.
Re: [SOLVED] Leafpad opens .png files by default
Well, I am just reporting what happened.
And if I am not using Salix then the Northern Philippine Cobra on my avatar shall sink its poison fangs into me.
In order to use dillo again I copied the missing libs libpng14.* over from slackel and for gedit made a symlinc afterwards:
And if I am not using Salix then the Northern Philippine Cobra on my avatar shall sink its poison fangs into me.

In order to use dillo again I copied the missing libs libpng14.* over from slackel and for gedit made a symlinc afterwards:
Code: Select all
ln /usr/lib/libpng14.so.14.12.0 /usr/lib/libpng12.so.0
Code: Select all
cat slackware-version
Slackware 14.2
Code: Select all
cat ./slapt-getrc
# Working directory for local storage/cache.
WORKINGDIR=/var/slapt-get
# Exclude package names and expressions.
# To exclude pre and beta packages, add this to the exclude:
# [0-9\_\.\-]{1}pre[0-9\-\.\-]{1}
EXCLUDE=^aaa_elflibs,^aaa_base,^devs,^glibc.*,^rootuser-settings,^zzz-settings.*,-x86_64-
# The Slackware repositories, including dependency information
SOURCE=http://ftp.cc.uoc.gr/mirrors/linux/salix/i486/slackware-14.2/:OFFICIAL
SOURCE=http://ftp.cc.uoc.gr/mirrors/linux/salix/i486/slackware-14.2/extra/:OFFICIAL
# The Salix repository
SOURCE=http://ftp.cc.uoc.gr/mirrors/linux/salix/i486/14.2/:PREFERRED
# And the Salix extra repository
SOURCE=http://ftp.cc.uoc.gr/mirrors/linux/salix/i486/extra-14.2/:OFFICIAL
Code: Select all
uname -a
Linux ispx 4.4.38-smp #2 SMP
Code: Select all
ls /var/log/packages/libpng*
/var/log/packages/libpng-1.6.27-i586-1_slack14.2
Re: [SOLVED] Leafpad opens .png files by default
You have changed so many things manually, outside of package management in your system, that it's not Salix, or any other distribution that anybody else is using anymore. There is no problem with libpng on Salix. It's only in your system, because of changes you have made.Atip wrote:Well, I am just reporting what happened.
And if I am not using Salix then the Northern Philippine Cobra on my avatar shall sink its poison fangs into me.
That's exactly what I mean.Atip wrote:In order to use dillo again I copied the missing libs libpng14.* over from slackel and for gedit made a symlinc afterwards:Code: Select all
ln /usr/lib/libpng14.so.14.12.0 /usr/lib/libpng12.so.0
Re: [SOLVED] Leafpad opens .png files by default
Maybe its time to create a Don't Break Salix, similar to the Don't break Debian threads/wiki's, of course modified for Salix/Slackware.
We do have these:
https://docs.salixos.org/wiki/Can_I_use ... itories%3F
https://docs.salixos.org/wiki/Can_I_use ... h_Salix%3F
I can start work on this, if you guys think it could help.
Ref: https://wiki.debian.org/DontBreakDebian
We do have these:
https://docs.salixos.org/wiki/Can_I_use ... itories%3F
https://docs.salixos.org/wiki/Can_I_use ... h_Salix%3F
I can start work on this, if you guys think it could help.
Ref: https://wiki.debian.org/DontBreakDebian

