LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-23-2005, 11:42 PM   #1
wombat53
Member
 
Registered: Jun 2005
Location: Australia
Distribution: Linux linux01 3.9.5-301.fc19.x86_64
Posts: 179

Rep: Reputation: 30
Folders, and Mounts and File associations in KDE


Hi friends - haven't been on Linux for over a month but something strange has happened. In Konqueror (under KDE 3.2.2), whenever I click on a folder/directory/share icon - anything, I get the following message: "Sorry - KWrite: the file "file:/opt could not be opened, it is not a normal file: it is a folder." Which of course is exactly correct, it is a folder and I want to expand it, and NOT have KWrite invoked, opening a blank KWrite window. It seems every Folder has been somehow associated with Kwrite. and I need to dis-associate this. Of course, I don't remember changing anything this drastic <g>..really, I don't.

Something has gotten completely messed up with Associations here, and I am sure that this is a trivial thing that has somehow been accidentally changed. I can't figure out how to undo this damage from Setting, Configure, Associations. ,,,,
All help appreciated here, thanks.
George
 
Old 09-24-2005, 02:23 AM   #2
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Look in the KDE start menu thing for something called KDE components, then look for File Associations under there. That is where you can associate .jpg with Gimp etc etc etc.

You may can also right click and select open, then tell it to open with Konqueror as well. If you google around, you may can find where the file associations are kept and just rename it then restart KDE. It should restart with a default file. I messed mine up once and I just did this:

Code:
rm -rf /home/dale/.kde/*
You can also just rename the directory to .kde.old or something just in case you need something back out of it, or it doesn't replace it like it should.

Maybe someone will come up with something better. It is easy to add a file type but hard to find and get rid of a bad one.

Later

 
Old 09-26-2005, 10:18 PM   #3
wombat53
Member
 
Registered: Jun 2005
Location: Australia
Distribution: Linux linux01 3.9.5-301.fc19.x86_64
Posts: 179

Original Poster
Rep: Reputation: 30
dalek - thanks, but I wonder if its "safe" to just wipe out my .kde directory....I realizing taking a backup is pro-active but I figure there must be some setting I have inadvertently change??? Perhaps I could try and copy the desktop settingsa from one of the other userids I use (like root)?
George
 
Old 09-26-2005, 10:35 PM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
I have done that before. KDE looks and if it is not there, it makes a new one with the defaults. You can rename it to .kde_old and then try it. If it don't create a new one, then you can just change it back to .kde and carry on.

You can just make a new user and login to the new user, which will create that new .kde directory, then copy it over.

I'm 99% sure it will just create a new directory though. I know when I first installed KDE during my install and was in command line, I didn't even have my /home partition mounted at the time.

There is more than one way to "skin this cat" though. If you are worried, just make a new user, login, then copy it over. You can even use Konqueror to copy it over, as root of course. Also, make sure you change the permissions and ownership to the new user. If the permissions are wrong, it won't work.

Later

 
Old 09-27-2005, 11:26 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Finding GUI config files

Code:
rm -rf /home/dale/.kde/*
seems a little drastic, look in ~/.kde/share/config/profilerc, I think you'll find the file associations there.

General Technique for finding GUI config files
  1. Make a small change with the GUI.
  2. Use a stat `find` | awk | sort | head pipeline to identify the likely target files.
  3. Make a filelist, use it in the following steps.
  4. Make baseline files.
  5. Make another change with the GUI.
  6. 'diff' the target files against the baseline files.
  7. Investigate the promising candidates.
  8. Restore any changes with the GUI.
  9. Clean up: remove the filelist & the baseline files.
The main guesswork/artistry comes in selecting the top directory for targeting the find.

Specifics for this case
I opened (Settings) Configure Konqueror and went to "File Associations".
I made a small harmless change. (In text/plain I moved Kate down.)
I ran:
Code:
stat  -c "%Y %y %n"   `find ~/.kde -type f`      \
 | awk '{printf "%s  %8.8s  %s\n", $1, $3, $5}'  \
 | sort -r  | head
From this I made the list (FILES) of the files whose time stamps indicated they had been changed by Konqueror's configuration.

(In an xterm, I used Alt-Ctrl-drag to select the column of filenames. I pasted them into a text file & built the FILES="..." command there. Then I pasted it back into the xterm, where it executed beautifully, thanks to the escaped newlines.)

I then executed the following series of commands (not as a script):
Code:
# make a file list 
FILES="\
.kde/share/config/konquerorrc 	\
.kde/share/config/kmenueditrc 	\
.kde/share/config/keditrc 	\
.kde/share/config/kdeglobals 	\
.kde/share/config/katerc 	\
.kde/share/config/smb4krc 	\
.kde/share/config/kwinrc 	\
.kde/share/config/kmailrc 	\
.kde/share/config/profilerc 	\
"

# make baseline files
for F in $FILES; do cp  $F $F.01; done

# Reverse the change in Konqueror's configuration

# check for differences
for F in $FILES; do echo $F; diff  $F.01 $F; done 

# display the interesting differences in a nice format
diff -u10                        \
 .kde/share/config/profilerc.01  \
 .kde/share/config/profilerc

# go change the configuration back
# remove the filelist & the baseline files
for F in $FILES; do rm $F.01; done
unset FILES
Useful aside for new folk
  1. ~/
  2. $HOME/
  3. /home/<user>/
all mean the same thing -- 1 & 2 expand to 3.

Last edited by archtoad6; 06-25-2006 at 09:25 AM. Reason: fix bad list tag
 
Old 09-27-2005, 05:57 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
If you go into the KDE Control Centre->KDE Components->File Associations and select inode->directory you should only have Konqueror in the 'Application Preference Order'
 
Old 10-02-2005, 12:30 AM   #7
wombat53
Member
 
Registered: Jun 2005
Location: Australia
Distribution: Linux linux01 3.9.5-301.fc19.x86_64
Posts: 179

Original Poster
Rep: Reputation: 30
arch and tk - let me look at both your proposals....
Thanks
George
P.S And I will not cross-post...it just seemed to me after a while that this question was not Slackware specific (indeed, had nothing to do with SW, but KDE, and an optional front-end at that), so I put it over in the newbie forum, bit now I am back here.
 
Old 10-02-2005, 12:38 AM   #8
wombat53
Member
 
Registered: Jun 2005
Location: Australia
Distribution: Linux linux01 3.9.5-301.fc19.x86_64
Posts: 179

Original Poster
Rep: Reputation: 30
tkedwards - I have done what U suggested... KDE Control Centre->KDE Components->File Associations and select inode->directory
and have found the following:
Konqueror, then followed by Cervisia.
Clearly you are saying the latter should not be there. Do you think this is responsible for the problem I have described. Obviously it is easy enough to remove the entry, if it is erroneous....
George
 
Old 10-02-2005, 01:13 AM   #9
wombat53
Member
 
Registered: Jun 2005
Location: Australia
Distribution: Linux linux01 3.9.5-301.fc19.x86_64
Posts: 179

Original Poster
Rep: Reputation: 30
tkedwards
Let me be more precise in my reply. As user "root" - a user that did not have the described problem - the Associations for inode-->Directory were Konqueror and Cervisia in that sequence.
As a user for which I had this problem, KWRITE was at the head of the list (followed by the same two entries as above)!!!!! So it is hardly surprising that KWRITE constantly got invoked on mouse click. How it got there, I can't say, and perhaps it doesn't bear further analysis. In any case, I promptly removed it, and the system seemed to behave more "normally".
So many thanks for that.
I guess I have to ask the (not so obvious) question, what is the significance of the inode-->directory File association (which may or may not get into a discussion of inodes in Unix-based file system management ........)
Thanks
George
 
Old 10-02-2005, 10:18 PM   #10
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Quote:
the Associations for inode-->Directory were Konqueror and Cervisia in that sequence.
Cervisia is a CVS client so it would make sense that its in the list, as long as its not first. You may find it useful one day so I'd leave it there.

Quote:
hat is the significance of the inode-->directory File association
Its just what it appears to be - the setting for which program opens a directory by default in the KDE desktop environment, nothing more than that AFAIK. As for why its called 'inode->directory' I'd guess that that's just the convention that has been chosen. An inode exists for every file and directory on a Linux file system so it makes sense to call it 'inode'.
 
  


Reply

Tags
config, files, finding, gui


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
KDE file associations satinet Linux - Software 7 09-27-2005 11:50 AM
KDE File Associations Not Saving barkers Linux - Software 0 08-26-2005 07:55 AM
kde file associations gone crazy fibbi Linux - Software 1 06-20-2004 05:29 PM
KDE looses file associations Doergn Linux - Software 2 06-12-2004 02:25 AM
KDE never remembers my file associations agustin Mandriva 5 11-07-2003 01:19 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration