LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-18-2010, 11:52 AM   #1
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 110

Rep: Reputation: 5
gedit user dictionary location


I use gedit a lot.
However, when I upgrade or change my system, the dictionary containing words I have added disappears.
I would like to locate the user-created dictionary on Ubuntu and put it in a folder where it would get backed up with the rest. Then I would replace it in its location with a symbolic link to its new location.
The problem is that after much searching on gedit-list archives and posting to the list and googling and checking the man page and doing an aspell dump, I can't get an answer to my question:
Where can I find the gedit spell checker dictionary on Ubuntu.
 
Old 02-18-2010, 02:15 PM   #2
arizonagroovejet
Member
 
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 998

Rep: Reputation: 170Reputation: 170
Assuming you're adding stuff to the dictionary as a non-root user then logically the relevant file(s) should be in your home directory somewhere. Try this:

Code:
$ touch /tmp/now
Add a new word to the dictionary.

Code:
$ find $HOME -newer /tmp/now
This will give you a list of all files created or modified since your ran the touch command. Hopefully one of them is the dictionary.
 
Old 02-21-2010, 02:14 PM   #3
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 110

Original Poster
Rep: Reputation: 5
Sorry it took me so long to reply.
I applied your code examples, but all I got is some firefox and network related stuff:

.mozilla/firefox/mx77xf74.default/places.sqlite-journal
.mozilla/firefox/mx77xf74.default/cookies.sqlite-journal
.mozilla/firefox/mx77xf74.default/places.sqlite
.mozilla/firefox/mx77xf74.default/cookies.sqlite
.gconf/apps/nm-applet
.gconf/system/networking/connections/1/802-11-wireless
.gconf/system/networking/connections/1/802-11-wireless/%gconf.xml
.gconf/system/networking/connections/1/connection
.gconf/system/networking/connections/1/connection/%gconf.xml
.gconf/system/networking/connections/1/802-11-wireless-security
.gconf/system/networking/connections/1/802-11-wireless-security/%gconf.xml

Also, since I installed Ubuntu, gedit doesn't seem to really add the words to a user dic, since when I reopen the document and do an autocheck spelling, the same words are still underlined.
Could it be some kind of permission problem?
 
Old 03-03-2010, 12:38 PM   #4
lrfocke
LQ Newbie
 
Registered: Jul 2009
Location: Claremont, CA
Distribution: Mint 11
Posts: 23

Rep: Reputation: 0
Same problem

I am having the same problem. When I add a word to the dictionary, in straight text mode, the underline disappears. When I am finished editing I save the file and close gedit. The next time I open the file all my added words aren't there. It doesn't seem to be adding the words permanently to the dictionary. Is there a way to make changes permanent? I am using Linux Mint, based on Ubuntu 9.10. It would be so much quicker if I can make this happen.
Thanks
lrfocke
 
Old 03-03-2010, 09:54 PM   #5
lrfocke
LQ Newbie
 
Registered: Jul 2009
Location: Claremont, CA
Distribution: Mint 11
Posts: 23

Rep: Reputation: 0
I have solved the problem of saving added words. Instead of having my language English (basic) I switched it to English (United States), being that is where I live. But now my question is how do I make that my default language? Every time I start gedit I have to re-set my language, it defaults to English (basic). It's better than having to add words to the dictionary every time, but still is a bit of a hassle. Any ideas?
The gedit that I have is version 2.28.0 running on Linux Mint 8, if that helps.
Thanks
lrfocke

Last edited by lrfocke; 03-03-2010 at 10:00 PM.
 
Old 03-03-2010, 10:15 PM   #6
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
Did you check ~/.aspell* ?

Evo2.
 
Old 03-04-2010, 04:28 AM   #7
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 110

Original Poster
Rep: Reputation: 5
For me, ~/.aspell* doesn't exist. It doesn't seem to have been created. By the way, if I haven't mentioned it already, I work in two languages, English and French, and switch regularly from one to the other.
 
Old 03-04-2010, 09:19 PM   #8
lrfocke
LQ Newbie
 
Registered: Jul 2009
Location: Claremont, CA
Distribution: Mint 11
Posts: 23

Rep: Reputation: 0
Evo2,

Thanks, but like S. Chapelin I don't seem to have a hidden file or directory called .aspell* anywhere in my home directory. I found aspell and a perl script at /usr/bin. File names aspell and aspell-import (the perl)
Here is the first part of the script:

#!/usr/bin/perl

#
# aspell-import -- Perl script to import old dictionaries
#
# This file is part of The New Aspell
# Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
# license version 2.0 or 2.1. You should have received a copy of the
# LGPL license along with this library if you did not you can find it
# at http://www.gnu.org/.



%abrv = qw( american en

______________

It looks like american en is set default but I don't know perl all that well. Is there supposed to be a local version somewhere?

Thanks
lrfocke

Last edited by lrfocke; 03-04-2010 at 09:21 PM.
 
Old 03-04-2010, 11:52 PM   #9
lrfocke
LQ Newbie
 
Registered: Jul 2009
Location: Claremont, CA
Distribution: Mint 11
Posts: 23

Rep: Reputation: 0
I have also found the text file /tmp/gedit.rossf.703406717 but it has 0 bytes and won't open because there is nothing there. It was created twenty minutes ago and accessed 10 minutes ago.

Don't know if this helps
lrfocke
 
Old 03-04-2010, 11:56 PM   #10
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
One thing you can do to find where gedit is getting the dictionary from is to run it under strace, then you should be able to see all the files that it reads from.

Code:
strace gedit
Cheers,

Evo2.
 
Old 03-06-2010, 08:32 PM   #11
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 110

Original Poster
Rep: Reputation: 5
Thumbs up

Thank you evo2 for teaching me:

Code:

strace gedit

I used it, and on line #3gadzillion I found:

open("/home/gillesg/.enchant/fr_CA.dic", O_RDONLY) = -1 ENOENT (No such file or directory)

so I created the directory and the file and it worked. Now I can add new words to my personnal dictionary and they stick.
Thanks again. You are a great teacher.


Thanks also to arizonagroovejet for the following:


Code:

$ touch /tmp/now

Add a new word to the dictionary.

Code:

$ find $HOME -newer /tmp/now

I have written both tips in a special directory I keep called 'info', where I put all the new things I learn.
 
Old 12-14-2011, 01:26 AM   #12
Andrew4096
LQ Newbie
 
Registered: Jun 2009
Location: near San Jose, California
Distribution: Ubuntu 10.04.1 LTS "Lucid Lynx"
Posts: 11

Rep: Reputation: 0
Try Tomboy Notes

Quote:
Originally Posted by S. Chapelin View Post
I have written both tips in a special directory I keep called 'info', where I put all the new things I learn.
I use Tomboy Notes for that purpose. It makes it easier to organize the information into "notebooks", hyperlinks are live, and one can use basic HTML/XML formatting on text. My joy will be complete when they figure out a way to embed images in the notes.

Incidentally, on my Ubuntu 10.04 system with Gedit 2.30.3, the personal dictionary files are located in ~/.config/enchant.

Last edited by Andrew4096; 12-14-2011 at 01:35 AM. Reason: location of files on my machine
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggest a good offline dictionary-database for gnome-dictionary. abhijeetnayak Linux - Software 1 07-05-2009 05:17 PM
user permissions changing after using gedit linuxmandrake Linux - Newbie 5 03-08-2008 08:04 AM
Upgrade 6->8: Could not open location 'file:///home/user' brianmcgee Fedora 4 11-20-2007 02:08 PM
Creating Multiple Directories in the same location in user space leebrent Linux - General 3 10-29-2007 12:14 PM
proftpd User Upload Location Chryzmo Slackware 1 05-05-2004 09:34 PM


All times are GMT -5. The time now is 01:28 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