.wesnoth

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Jean
Posts: 44
Joined: March 26th, 2009, 2:45 am

.wesnoth

Post by Jean »

While using Ubuntu Jaunty, I uninstalled Wesnoth 1.6.x and saw that the .wesnoth hidden file was still there, so I deleted it manually.
I thought that after upgrading to Karmic and Wesnoth 1.8 it would be remade or something. Looks like it didn't.
Is this not embarrassing?
Now I cannot save games or put add-ons.
Any idea of how to fix it?
Remaking the file manually perhaps? Anyone could gently post a copy of it? :P
User avatar
norbert
Posts: 368
Joined: June 14th, 2009, 6:57 pm
Location: The Netherlands

Re: .wesnoth

Post by norbert »

Jean wrote:I thought that after upgrading to Karmic and Wesnoth 1.8 it would be remade or something. Looks like it didn't.
If you use 1.8 and the directory ~/.wesnoth1.8 is absent, the game will detect that ~/.wesnoth1.8/preferences cannot be opened for reading ("error filesystem"), and it will recreate the ~/.wesnoth1.8 user configuration directory.

Note that the version number - in this case "1.8" - is used after the word "wesnoth" since the last couple of Wesnoth releases.
Jean
Posts: 44
Joined: March 26th, 2009, 2:45 am

Re: .wesnoth

Post by Jean »

Thank you norbert, but it seems I was wrong.
Using Scons to install Wesnoth 1.8, the system installed it in /root/.wesnoth instead of the good old /home/jean/.wesnoth
I have to get into root terminal to play with the power to modify stuff in the root, and thus to be able to get add-ons and save games.
One thing, though, I noticed. It is not .wesnoth1.8, but just .wesnoth
Thanks a lot!
User avatar
doofus-01
Art Director
Posts: 4128
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: .wesnoth

Post by doofus-01 »

As I understand it, you should avoid running things as root unless it is intended that way. If you use something like chown or chmod on that directory, maybe you could run Wesnoth as a regular user. Better would be to find out why your userdata folder got installed where it did, but I'm not qualified to speculate on that.

As far as .wesnoth vs .wesnoth1.8, norbert may have been referring to a packaged version, rather than source. There are options to add suffixes to the folders and binaries, maybe the packager did something like that?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
adm
Posts: 44
Joined: April 8th, 2010, 7:08 am

Re: .wesnoth

Post by adm »

Does it have to be karmic ? If not then you could just wait a few more days and install Ubuntu 10.04.
User avatar
ivanovic
Lord of Translations
Posts: 1149
Joined: September 28th, 2004, 10:10 pm
Location: Germany

Re: .wesnoth

Post by ivanovic »

$HOME for root is /root. So when you started as root, you generated userdata in /root/.wesnoth. Though when starting the game as normal user you should have userdata in $HOME/.wesnoth for the normal user. The only way this can change is if you provided some specific parameters regarding where the binary should expect the preferences folder.

So to get some reasonable help you should provide us with the exact commands that you used to build and install as well as mentioning how you run the game later on. What is the *real* error you get when trying to start the game as normal user? Is it maybe just that your normal user is not allowed to execute the created binary that you built as root?
lmelior
Posts: 116
Joined: June 16th, 2009, 3:30 am

Re: .wesnoth

Post by lmelior »

Chances are very high that OP ran "sudo su" to get a root shell to do everything. This is the reason why "sudo -s" is highly preferred as the method to get root privileges on Ubuntu, because the user's environment variables remain intact.
Jean
Posts: 44
Joined: March 26th, 2009, 2:45 am

Re: .wesnoth

Post by Jean »

Well, I downloaded the source, opened the Terminal and then typed "scons" in the folder in where I had uncompressed the tar.
Following the wiki, I hit "su", typed the password and then "scons install".
Aaaand... that was it.
The error that happens when I open the game normally is that, as .wesnoth file is in "/root", the game has no permissions to install add-ons or save games. Other than that, it works perfectly.

If you have a way of opening the game without having to use the root terminal each time, I'd appreciate a lot, but that is not properly a bug or anything.
Thanks a lot for the support!
lmelior
Posts: 116
Joined: June 16th, 2009, 3:30 am

Re: .wesnoth

Post by lmelior »

Jean wrote:Well, I downloaded the source, opened the Terminal and then typed "scons" in the folder in where I had uncompressed the tar.
Following the wiki, I hit "su", typed the password and then "scons install".
Aaaand... that was it.
The error that happens when I open the game normally is that, as .wesnoth file is in "/root", the game has no permissions to install add-ons or save games. Other than that, it works perfectly.

If you have a way of opening the game without having to use the root terminal each time, I'd appreciate a lot, but that is not properly a bug or anything.
Thanks a lot for the support!
If you haven't reinstalled already, you can move /root/.wesnoth to ~/.wesnoth and change ownership like so:

Code: Select all

[ -d ~/.wesnoth ] && mv ~/.wesnoth ~/.wesnoth_bck
sudo mv /root/.wesnoth ~
sudo chown jean:jean ~/.wesnoth
The first line checks if you have a .wesnoth folder in your home directory and backs it up if found. The third line changes the user and group who owns the file. The default in Ubuntu is to use the user name as the group name, so that's almost certainly right for you. You can run ls -l in your home directory to make sure though.

For future reference, you should almost certainly just use sudo whenever you need root privileges, or like I said above, use sudo -s if you want a root shell (which should be relatively rare).
Jean
Posts: 44
Joined: March 26th, 2009, 2:45 am

Re: .wesnoth

Post by Jean »

Worked like a charm. Thank you. :)

Edit: If anyone else is doing it, remember that you'll have to change permissions of all files in .wesnoth after moving the folder and reinstall the add-ons.
Post Reply