Results 1 to 8 of 8

Thread: Change Application Specific User-Data Files Default Location of /home/user/.appname

  1. #1
    Join Date
    Jul 2009
    Beans
    111

    Change Application Specific User-Data Files Default Location of /home/user/.appname

    Hi All,

    Is there a way to change the default location of where application specific user-data files are stored for a particular user? I created a user that manages game servers, and the log files for these game servers end up in the /home/user/.gamename directory rather than staying in the current directory of /servers/gamename/user1. Is there a way to prevent application specific files from ending up in hidden directories in the user's home? I want them to stay in the current directory.

    Where are these settings stored, and where can I edit them?

    Please let me know. All help is appreciated.

  2. #2
    rai4shu2 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Jun 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    Actually, I think that's just a convention. Most applications will use a folder in your $HOME folder, though it's really up to the upstream devs. Some applications use $HOME/.$appname folders, some use $HOME/.$appname file as their configuration storage, and some apps use $HOME/.config/$appname folder for configuration (this is a relatively new convention).

  3. #3
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    you can try cheating the game by symlinking its default /home/user/.gamename to another location.
    Move the files, delete /home/user/.gamename and create a symlink with ln -s command in its place
    Code:
    ln -s /some/dir/with/game/config /home/user/.gamename
    from now on .gamename is a fake directory linking to another place, but for the game nothing will change
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  4. #4
    Join Date
    Jul 2009
    Beans
    111

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    Quote Originally Posted by Vaphell View Post
    you can try cheating the game by symlinking its default /home/user/.gamename to another location.
    Move the files, delete /home/user/.gamename and create a symlink with ln -s command in its place
    Code:
    ln -s /some/dir/with/game/config /home/user/.gamename
    from now on .gamename is a fake directory linking to another place, but for the game nothing will change
    Cool, I'll give that a shot. Thanks!

    Quote Originally Posted by rai4shu2
    Actually, I think that's just a convention. Most applications will use a folder in your $HOME folder, though it's really up to the upstream devs. Some applications use $HOME/.$appname folders, some use $HOME/.$appname file as their configuration storage, and some apps use $HOME/.config/$appname folder for configuration (this is a relatively new convention).
    So is this a setting in the game server's code itself? There's no hard coded way to change it for all apps?

  5. #5
    rai4shu2 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Jun 2006
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    You could change the $HOME variable itself, but I can't promise that'll work. Symlinking will probably prove to be more effective.

  6. #6
    Join Date
    Jul 2009
    Beans
    111

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    Quote Originally Posted by rai4shu2 View Post
    You could change the $HOME variable itself, but I can't promise that'll work. Symlinking will probably prove to be more effective.
    Unfortunately, I have 4 of the same game servers running on my box with different IP addresses. They each want to write their log file in /home/user/.mohaa rather than using their current directory and writing to qconsole.log. This creates a problem, as I only have 1 log file for as many MOHAA servers as I run.

    Is there no way that you know of to force applications to write in their currently running directory rather than using a specific /home/user/.app path?

  7. #7
    Join Date
    Jul 2009
    Beans
    111

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    I'm guessing this is the application's behavior, or is this some king of deep setting in Ubuntu. Wish someone knew. Symlinks won't cut it.

  8. #8
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Change Application Specific User-Data Files Default Location of /home/user/.appna

    i think it's the program's behavior. Some programs i have write to ~/.program, some write to ~/.config/program so i don't think it's the system that sets the rules.

    Can't you have 4 different accounts each running single server?
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •