xenopeek wrote:Ah I tried this on Xfce but should work on LXDE also I think. Install the package gnome-network-admin. That installs network-admin, probably called "Network" in your menu. The tool has three tabs;
- General tab where you can edit the host and domain name (change to host name updates both /etc/hostname and /etc/hosts)
- DNS tab where you can edit DNS
- Hosts tab where you can basically edit /etc/hosts file contents
Hosts file is ignored on Linux Mint from release 13 IIRC, as NetworkManager starts dnsmasq as local DNS forwarder and starts it with option to not load hosts file.
eanfrid wrote:On the other hand, you want to use LXDE - a lightweight and minimalist DE - which primarily targets CLI adepts. Your fellow admin users seem to want a GUI for everything. LXDE is not the right choice for them.
#assign existing hostname to $hostn
#display existing hostname
echo "Existing hostname is $hostn"
#ask for new hostname $newhost
echo "Enter new hostname: "
#change hostname in /etc/hosts & /etc/hostname
sudo sed -i "s/$hostn/$newhost/g" /etc/hosts
sudo sed -i "s/$hostn/$newhost/g" /etc/hostname
#display new hostname
echo "Your new hostname is $newhost"
#press a key to reboot
echo "Press any key to reboot..."
read 1 -p 'Press any key to reboot...';echo
Exec=lxterminal --working-directory=/usr/bin -e sh /usr/bin/hostname.sh
Users browsing this forum: No registered users and 1 guest