Best way to set local hostname for all DEs?

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Best way to set local hostname for all DEs?

Post#1 by Rava » 31 Aug 2023, 08:41

What is the best way to set the local hostname for all DEs, so that it is used and displayed correctly, be it a terminal program or a GUI program, regardless of what DE I use.

I load my settings.xzm as last (named e.g. 095-settings-YYYY-MM-DD.xzm) but it would be appreciated when you also give the info where the file is located in base modules so that any user knows how to put the needed tweak(s) into her/his system so that the default never overrides the adjusted settings.
Cheers!
Yours Rava

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Best way to set local hostname for all DEs?

Post#2 by fulalas » 31 Aug 2023, 09:25

/etc/HOSTNAME

Is this what you want?

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Best way to set local hostname for all DEs?

Post#3 by Rava » 31 Aug 2023, 09:29

^
Seems like that's it.

Could it be that some packages for net based programs have their own /etc/HOSTNAME - thus overwriting the system's settings?
Or is that file never part of any program package and left alone for the system itself (as it should be)
Cheers!
Yours Rava

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Best way to set local hostname for all DEs?

Post#4 by Blaze » 31 Aug 2023, 10:30

Code: Select all

su
toor
netconfig
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Best way to set local hostname for all DEs?

Post#5 by Rava » 31 Aug 2023, 10:37

Blaze wrote:
31 Aug 2023, 10:30

Code: Select all

su
toor
netconfig
At least for uname -a I did not have to do anything, or maybe uname is one of the few programs that look into /etc/HOSTNAME themselves?

And I prefer a simple setup file (especially when it's just a one-line file like /etc/HOSTNAME) to a menu based journey that is netconfig. Still I appreciate the tip, maybe others will prefer it doing with netconfig.

Added in 47 minutes 26 seconds:
Another program that works out of the box is ffplay.

Now it says "video file.mp4 (on rava.myporteus.net)" in it window title. Image

(I made sure beforehand myporteus.net is not a valid URL in the interweb)
Cheers!
Yours Rava

Post Reply