install startup scripts - SOLVED

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: install startup scripts - SOLVED

Post by JRD »

The script could also have been put in ~/.xprofile ? I am wrong ?
So the script will be executing directly in gdm/kdm ?
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: install startup scripts - SOLVED

Post by mimosa »

JRD, that also worked - I have just tried it when I had to reinstall.

Thanks to all for your help!
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: install startup scripts - SOLVED

Post by mimosa »

I'm returning to the problem of the Brazilian keyboard (not necessarily startup scripts, though that'd be one way) for the very practical reason that I've put Salix Live 13.latest xfce on a USB key, and I want to produce a slightly remastered CD I can give my Brazilian friends who are new to Linux; it doesn't exactly make a good impression if the first thing they have to do after switching off Windows is a fiddly workaround for the keyboard. Also, the solution above in this thread only works after X has started so it would be no good for someone who eventually wanted to use runlevels or indeed tinker with the boot options. So I have directly edited the files on the USB as follows:

/boot/grub/lang.cfg now has an entry like this:

Code: Select all

menuentry "Português de Portugal" {
  set locale="pt_PT.utf8"
  set kb="pt-latin1"
  set kbnum="12"
  nextconfig()
}

menuentry "Português do Brasil" {
  set locale="pt_PT.utf8"
  set kb="br-abnt"
  set kbnum="19"
  nextconfig()
}
(I also changed the European Portuguese one above it a bit.)

For good measure, I added the following to the end of keyboard.cfg:

Code: Select all

menuentry "br" {
  set kb="br"
  set kbnum="19"
  nextconfig()
}
I don't know if that's necessary and I haven't tested it (maybe I need

Code: Select all

set kb="br-abnt"
), but the main one works. (Though it should be noted that computing terminology in Brazilian Portuguese is rather different from European Portuguese, e.g. File = Ficheiro/Arquivo; they are regarded as separate languages for translating books, subtitling films, etc.)

My question is, is this the "proper" way to do it,i.e. will it survive updates to grub or whatever? In general, I know grub2 config files are not as straightforwardly editable as grub legacy, though I have little experience of grub 2 (I have heard it called Grub Beta ;))

And secondly, even if the answer to that is yes - will LiveClone preserve these changes?
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: install startup scripts - SOLVED

Post by Shador »

mimosa wrote:And secondly, even if the answer to that is yes - will LiveClone preserve these changes?
I'm not completely sure, but I guess yes, it will.
mimosa wrote:My question is, is this the "proper" way to do it,i.e. will it survive updates to grub or whatever? In general, I know grub2 config files are not as straightforwardly editable as grub legacy, though I have little experience of grub 2 (I have heard it called Grub Beta ;))
First of all, although you edited config files for grub 2, these are completely Salix Live specific. I'm not sure what you mean by updates to grub, but those files never get touched unless you recreate the live usb.
Those config files are autogenerated from some definitions for every Live release. The translations used for the menu can be changed here: http://www.transifex.net/projects/p/sal ... ale-pot_0/
To my research the locale for Brazilian Portuguese is pt_BR(.utf8). If you add a translation for Brazilian Portuguese on that page and share the other necessary information with me, I can add the language to the menu for future releases.
The other information apart from the translation consists of:
- translation of the language's name: Portuguese (Brazilian)
- the (most) commonly used keyboard layout: br or br-abnt (the way you used both can lead to inconsistencies)
- optionally other alternative (i.e. non-default) keyboard layouts
Image
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: install startup scripts - SOLVED

Post by Akuna »

mimosa wrote:will LiveClone preserve these changes?
Liveclone will copy your entire /boot directory & use it 'as is' so normally it should work if your original customization worked & if you didn't remove from your USB key /boot directory certain files that the CD-Rom will need in order to boot (such as boot/grub/i386-pc/eltorito.img for example).
Image
What really matters is where you are going, not where you come from.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: install startup scripts - SOLVED

Post by mimosa »

Thank you both. I'll try the Brazilian locale next time I boot the USB - I didn't use it because I thought it might not be available in Salix.

As for br vs. br-abnt - I don't really understand how these names work. When you do it manually like this there only seems to be one option:

Code: Select all

one[~]$ setxkbmap -layout "br-abnt"
Error loading new keyboard description
one[~]$ setxkbmap -layout "br"
one[~]$
(note that until you've done that, unless you have a very good memory in your fingers, you can't type the commands, so there is a bit of a bootstrap problem! Knoppix prepared me for this one ;))

However, the Salix ncurses installer lets you choose from a huge list and then test the keyboard map. That list has two or three options for Brazil; I'm not sure how much variation there is in practice, but even so, it's good to cover everyone (people with old hardware for instance?), and I wonder whether Salix live couldn't do it more like this too? The two commonest scenarios must be:

1) You want to use a locale that is not the same as the country you happen to be in, but you have the same keyboard as everyone else there

2) You just have a funny keyboard

I'll get onto the translation info ASAP - seem to remember there is info about this in the FAQ or something. I'll have a look. Certainly it would be good to include Brazil as standard - it has more speakers than Portugal.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: install startup scripts - SOLVED

Post by mimosa »

@ Shador

I've been having a look at the translation page and can see it's going to take me a while to work it out. But basically, you could use the existing European Portuguese translation of the boot menu for Brazil too. It's possible a native speaker would make some small changes, but it's certainly correct and comprehensible as it stands. Except for the following:

The last item Return to boot menu I would put Voltar instead of Regrassar - which looks like a typo for Regressar and is specific to Portugal, whereas Voltar works on both sides of the Atlantic. I don't know who did this but it's the only thing that's been translated for European Portuguese whereas Brazilian has made fair progress already, just not the boot menu.

Much more importantly, the translation for Change language is completely wrong - it means Return to main menu (notice the use of "Voltar" not "regressar"). I would put "Mudar o idioma" (checked with my daughter who is a native speaker!).

If I can work out how to sign up as a translator, I'll try and fix this myself. But note that I am not a native speaker.

The names of the languages I would do as quoted above. You could call it Português (brasileiro), but then what do you do with European Portuguese, which would be Português (português)? At least on this side of the Atlantic, everyone refers to them as I have; brackets would not be appropriate. But if you're going to do it like that for Brazil, you have to change Portugal too. Note that the difference de/do is correct and not a typo - it's because Brazil has a definite article and Portugal hasn't.

As for the keyboard, I'm really not sure. I think when doing non-live Salix installs in the past, I have chosen "br-abnt" and in that installer, there is as far as I remember no option "br" alone. So br-abnt is probably a good default, but at least for command line purposes, that is what plain "br" seems to mean.

However please note my comments above about the value of having comprehensive options, and the usefulness of the option to test a layout before committing to it.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: install startup scripts - SOLVED

Post by mimosa »

Right, I think the translation is there - I also made changes to the European Portuguese one along the lines I suggested above, with a view to using the Clone to other language button, but that didn't work ;) The other questions I think I already answered.
Post Reply