Results 1 to 2 of 2

Thread: Making default current language

  1. #1
    Join Date
    Dec 2012
    Beans
    2

    Question Making default current language

    Hey guys,

    The story is the following: I'm editing a LiveCD based on Ubuntu 12.04 (Pinguy) following LiveCDCustomization tutorial and I am setting the locale to ro_RO, the problem is that this being a LiveCD upon automatic login a dialog always asks to Update the names or not (screenshot -> here).

    How can I setup as default the language in order for the names to be automatically updated?

    I've used from the tutorial, the following:

    # cat /usr/share/i18n/SUPPORTED | grep ro_
    Code:
    ro_RO.UTF-8 UTF-8
    ro_RO ISO-8859-2
    Code:
    locale-gen ro_RO 
    update-locale LANG=ro_RO LANGUAGE=ro_RO LC_ALL=ro_RO
    Code:
    make DEFAULT_LANG=ro sudo cp -af boot/* ../extract-cd/isolinux/
    # cat /etc/default/locale
    Code:
    LANG=ro_RO.UTF-8
    LANGUAGE=ro_RO.UTF-8
    LC_ALL=ro_RO.UTF-8
    Sorry if this is not the appropiate section since I am talking about a "modified" version of Ubuntu.

    Thanks!

    Later edit:

    I've tried this, but so far no luck (everything seems right). Output:
    Code:
    /etc/skel# ls -a | grep . | awk -F: "{print $1}" | xargs stat --format="%a %n"
    755 .
    755 ..
    644 .bash_logout
    600 .bashrc
    600 .bashrc.dpkg-old
    775 .compiz
    777 .config
    600 .conkyForecast.config
    600 .conky_grey.lua
    600 .conkyrc
    600 .conkyrc.default
    600 .conkyrc.gray
    600 .draw_bg.lua
    777 .gconf
    777 .gnome2
    775 .imdb-thumbnailer
    777 .local
    775 .mozilla
    644 .profile
    775 .themes
    775 .thunderbird
    775 .wine
    775 Desktop
    777 Documents
    777 Downloads
    777 Music
    777 Pictures
    777 Public
    775 Templates
    777 Videos
    644 examples.desktop
    By the way, the user is automatically created when booting the LiveCD, it is not present in /etc/passwd when I'm in chroot and editing the filesystem. Any ideas?
    Last edited by ifiaanri; December 2nd, 2012 at 08:31 PM. Reason: corrections and other info

  2. #2
    Join Date
    Dec 2012
    Beans
    2

    Re: Making default current language

    Ok. So I've found a workaround, but the problem is that the file gets rewritten when user logs in and some folder are not displayed in "Places", though this is quite fine with me.

    What I did is boot into the LiveCD and see the file user-dirs.dirs from .config/ folder. See here for more details.

    I've copied the files "user-dirs.dirs" and "user-dirs.locale" from the LiveCD into the chrooted /etc/skel/.config (from external terminal not in chroot).

    Code:
    root@machine:/etc/skel/.config# ls -l user*
    -rwxr-xr-x 1 root root 632 Dec  2 22:05 user-dirs.dirs
    -rwxr-xr-x 1 root root 632 Dec  2 21:47 user-dirs.dirs_bak
    -rwxr-xr-x 1 root root   5 Dec  2 22:05 user-dirs.locale
    -rwxr-xr-x 1 root root   5 Dec  2 21:47 user-dirs.locale_bak
    
    root@machine:/etc/skel/.config# cat user-dirs.dirs
    # This file is written by xdg-user-dirs-update
    # If you want to change or add directories, just edit the line you're
    # interested in. All local changes will be retained on the next run
    # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
    # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
    # absolute path. No other format is supported.
    # 
    XDG_DESKTOP_DIR="$HOME/Desktop"
    XDG_DOWNLOAD_DIR="$HOME/Descărcări"
    XDG_TEMPLATES_DIR="$HOME/Șabloane"
    XDG_PUBLICSHARE_DIR="$HOME/Public"
    XDG_DOCUMENTS_DIR="$HOME/Documente"
    XDG_MUSIC_DIR="$HOME/Muzică"
    XDG_PICTURES_DIR="$HOME/Poze"
    XDG_VIDEOS_DIR="$HOME/Video"
    
    root@machine:/etc/skel/.config# cat user-dirs.locale
    ro_RO
    See the result here.

    Any idea how to setup them accordingly?
    Last edited by ifiaanri; December 2nd, 2012 at 09:39 PM.

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
  •