![]() I would have stopped one step earlier and chosen either "always substitute" or "always remove". But there is a point at which one has to stop such considerations, as the next logical step would be to think about substituting "ç" with "c", "Ç"->"C", ->"o", and so on. space " " and underscore "_" with a hyphen "-"), while simply removing others (all other special characters and all hyphens "-" at the start of the hostname string) is even nicer. Yes, you are absolutely right, that substituting some forbidden characters (e.g. Still I am glad you added the hostnamectl method, and plan to completely switch to it, when SFOS 2.1.1-final is released. As my own hostnames only contain, your Patch was doing what I wanted starting with its first version. Sorry, that was a misunderstanding: I merely meant to *suggest* either discarding or substituting forbidden characters. Or (discarding) "myhostname6661-3mehere".Ģ. ![]() The same two issues as described under 2a. Or (discarding forbidden characters) "MyHostname6661-3mehere". (substituting forbidden characters with "-") "My-Hostname-666-1-3-me-here-" are *not* in, so they should be discarded or substituted. Tested the actual filtering in v0.0.1-4 with the hostname example string from above. The easiest solution may be to write the filtered string back to the input field, when applying the hostname string.Īnother (supposedly more complicated, but nicer) solution would be to disallow typing forbidden characters into the hostname field.Ģ. So the user expect the string in the input field to be the actual hostname after hitting "Apply" button. There is no user feedback after filtering. Thank you for releasing a new version of this Patch quickly, but unfortunately there are two significant issues:ġ. P.S.: On Linux distributions with systemd (as SFOS), I still believe using its own tools (here: hostnamectl) is the proper way to alter system settings, not by "classic UNIX style" editing of files in /etc and using classic system configuration commands (in this case: the hostname command). Becoming root is only occasionally necessary for me.Īnd yes, it is a visually nice side effect of changing the hostname alters the shell prompt in every user's shell on a device (though there are only two interactive ones under SFOS, currently: nemo and root). I always had fingerterm installed, but devel-su disabled for a while, because I primarily use the shell as a regular user for file operations, downloading with curl, editing files with vi, etc. One does not need to have the Developer Mode activated to utilise a shell. *Edit:* Done, works, may take a restart of the network services per sailfish-utilities or a reboot to become effective on the network side.).ī. IMHO, setting the hostname is primarily about setting the network host name (I still have to check though, if that works properly. (For bash, user specific changes to the shell environment should be set in ~/.bash_profile.) Changing the usual shell prompt is rather a side effect of setting a different hostname, as the shell prompt can be set to contain arbitrary strings much more easily by setting the shell environment variable PS1. WRT dependencies: Sorry, I did not capture the two or three RPMs, which were pulled in as dependencies, when I originally installed "Custom hostname", but all the RPMs you mention above would not have surprised me (actually sailfish-utilities, python and dbus-python were definitely installed before, fingerterm as well, but developer mode inactive).īut never mind, I just wanted make sure this was correct: You double checked, so the dependencies should be O.K.Ī. Initial release (Requires: Developer mode). Removed dependencies of active dev mode. ![]() Added option to use hostnamectl command instead simple edit. ![]() Added auto-filter to allow only a-z, A-Z, 0-9 and space will be replaced by "-". Added switcher when you can choose to remove all symbols or just replace them by "-". Fixed empty hostname, user will get notification. Now it use only hostnamectl option (uppercase letters allowed). If you wrote the name with spaces, my script will replace them to this symbol "-". Uninstallation will restore default hostname "Sailfish". Simple changer of default hostname "Sailfish" to your own one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |