Lost file associations to Geany

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

Lost file associations to Geany

#1 Post by PappyPuppy »

I have both Fatdog 7.02 and 7.10 and I just lost the ability on one of my machines to double-click on a file and have it open in Geany.

I lost this ability soon after using Geany as a debugging envirionment, ie. writing programs, compiling, and executing and running gdb.

On one machine, Ihave either SourceForge inthe Run Action for .c files or /usr/local/bin/defaultexteditor

I can't geteither of these work on my 7.10 fatdog since I started using Geany for projects

User avatar
csipesz
Posts: 240
Joined: Fri 08 Nov 2013, 17:08
Location: Isaszeg, Hungary

#2 Post by csipesz »

Excuse me dear PappyPuppy, but it does not disturb you, that this is the Advanced Topics/Derivatives here, not though the House Training/Anything?
Or - why you do not write actually into a Fatdog topic?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

csipesz wrote:Excuse me dear PappyPuppy, but it does not disturb you, that this is the Advanced Topics/Derivatives here, not though the House Training/Anything?
Or - why you do not write actually into a Fatdog topic?
Hello all.

Please keep a cool head, everyone? :)

About the wrong classification, one of you could ask Flash to put this
thread in the correct section.

@PappyPuppy
You said:
> (...) I just lost the ability on one of my machines to double-click on a
file and have it open in Geany.


First let's be clear: Geany will only open a "text" file, not "a" file.
mtpaint will open jpg files, for example. Not Geany.
gnumeric will open gnumeric files. Not Geany.
bash will open (run) script (.sh) files. Not Geany.
And so on.

With that out of the way... :)
You (or some geany function, or some program you were compiling) may
have erased the MIME type for text and / or source files or similar.

We'll have to do some detective work.

For starters, here are some places where to look and a few questions that
may help solve this riddle:

1) With your ROX-Filer, please open directory /root/Choices/MIME-types.
In that list, what is listed as text files ? (Please see attached picture.)

2) Do you have a file named /root/.config/mimeapps.list ? Please do not
touch anything (very important at this point), but does it have anything
"text-file" related?

3) Is your file /usr/local/bin/defaulttexteditor still there? If yes, has it been
altered? Please provide a copy of its contents here. TIA.

4) What does your file /usr/share/applications/geany.desktop say at line
"MIME-Type"? If this line has been altered, you may have to re-install
Geany. (But do not do it now, we investigate first.)

5) Finally do you remember what source file you were editing / compiling
when the incident happened?

6) What date is your latest back-up for your pupsave file or directory?
If yesterday or just before the incident, you could forget the
questions above and use your back-up.

I don't know FatDog well, but please note that in general, in any Puppy,
nothing is ever totally gone, since Puppy has a read-only copy of its
original files in /initrd/pup_ro2, etc.

It's just a matter of hunting down the correct file and restoring it.

Thanks in advance for collaborating to the solution fo this problem.

BFN.
Attachments
some-MIME-types-for-txt-files.jpg
in my /root/Choices/MIME-types directory.
(41.22 KiB) Downloaded 261 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#4 Post by Sailor Enceladus »

Today, I tried opening /sys/class/backlight/*/brightness in Geany, and it didn't work. I thought it was because it wasn't a real text file, but doing Open With -> Leafpad worked. Doing some experimenting, I copied the file brightness to /root, and then it opened with Geany. I suppose the fact that * (intel_backlight) was a symlink to some weird directory called /sys/devices/pci0000:00/0000:00:02/drm/card0/card0-LVDS-1 confused Geany 1.23.1, I'll have to try it again with a newer version later.

This was probably super off-topic but it does have something to do with recent events of Geany and not opening files. :)

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#5 Post by slavvo67 »

Hi Sailor:

I had problems with Geany in the past. There were (are?) special characters or sequential characters that seem to confuse Geany or cause errors. Might be the version you're using. Maybe get a newer or older version? Wish I pinpointed it better when I saw the issue. There may be a thread around here, somewhere.

BTW, this is exactly why I keep leafpad around....


Slavvo67

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#6 Post by musher0 »

Sailor Enceladus wrote:Today, I tried opening /sys/class/backlight/*/brightness in Geany, and it didn't work. I thought it was because it wasn't a real text file, but doing Open With -> Leafpad worked. Doing some experimenting, I copied the file brightness to /root, and then it opened with Geany. I suppose the fact that * (intel_backlight) was a symlink to some weird directory called /sys/devices/pci0000:00/0000:00:02/drm/card0/card0-LVDS-1 confused Geany 1.23.1, I'll have to try it again with a newer version later.

This was probably super off-topic but it does have something to do with recent events of Geany and not opening files. :)
As a reminder, people, these types of data are not real text files. They
are not meant to be read directly in a text editor, because it's raw output
from the kernel, and it's always changing.

It is always better to make that data into a real text file first. For example:

Code: Select all

cat /proc/meminfo > /tmp/meminfo.txt
geany /tmp/meminfo.txt
Got it?

You can, in this case, do

Code: Select all

geany /proc/meminfo
and geany will show it, but it'll want to reload it every other second,
which is very inconvenient.

Salior, strangely, I get two files with "255" in them with

Code: Select all

geany /sys/class/backlight/*/brightness
.
But as I said, when trying to fish out raw data from the kernel's info base,
it's always better and safer to use an interim txt file.

I hope this info annoys you!!! :twisted: (Don't ask, I'm having a bad day.) :?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#7 Post by Sailor Enceladus »

musher0 wrote:I hope this info annoys you!!! :twisted: (Don't ask, I'm having a bad day.) :?
It's cool musher0. I like reading your posts! But why would you want to annoy me? We are bug buddies after all :lol:

Sidenote: If I "pipe leafpad through catdoc-0.94_2" I can open ANYTHING :lol:
http://www.murga-linux.com/puppy/viewto ... 235#898235

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

@Sailor Enceladus

:)

Image
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

PappyPuppy
Posts: 409
Joined: Sat 01 Oct 2016, 00:27

THANK YOU ALL FOR YOUR INSIGHTFUL COMMENTARY

#9 Post by PappyPuppy »

I will go through each comment and learn every morsel from them.

But to be honest, all I did to get Geany back to normal is reboot the machine. Now there are no problems at all with file associations. At the time I posted to the forum I was hoping I did NOT have to reboot as my machine is an old one and sometimes crashes on boot up. At least everything is running normally now.

Thanks for the clear exposition of the file associations mechanism! :D

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#10 Post by musher0 »

You're welcome, PappyPuppy.

There's nothing quite like a reboot to have some problems go away! ;)

Have a great day!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply