Linux Lite Forums

Hardware - Support => Network => Topic started by: benjyz on July 03, 2014, 06:30:25 PM

Title: [SOLVED] Change Hostname
Post by: benjyz on July 03, 2014, 06:30:25 PM
Hi Guys,

I'm looking for help on how to change my laptops hostname.

For some reason it's got the same hostname as my netbook which also has linux lite; I installed it on both of them at the same time.

Thank's in advance for your help.
Title: Re: Change Hostname
Post by: N4RPS on July 03, 2014, 08:31:49 PM
Hello!

Changing the hostname involves editing the /etc/hostname file. In a terminal window [CTRL-ALT-T], type the following:

Code: [Select]
sudo leafpad /etc/hostname
When prompted, enter the root password. This will open the file you need to edit in the text editor, Leafpad.

Change the hostname to what you want it to be, save the new file, and reboot. When you open the terminal window again, you should see the new hostname displayed...

73 DE N4RPS
Rob
 
Title: Re: Change Hostname
Post by: benjyz on July 04, 2014, 03:13:19 PM
Thanks Rob!!!

However, now that I've changed my hostname google chrome has stopped working.

Tried un-installing/re-installing it but it still won't start.

Also, I've noticed when I run
Code: [Select]
sudo apt-get autoclean I get 
Code: [Select]
sudo: unable to resolve host
Thanks,
Title: Re: Change Hostname
Post by: Jerry on July 04, 2014, 08:08:05 PM
Hostname needs to be changed in 2 places, /etc/hostname and in /etc/hosts - change the line:

Code: [Select]
127.0.1.1 oldhostname
to

Code: [Select]
127.0.1.1 newhostname
Title: Re: Change Hostname
Post by: benjyz on July 06, 2014, 06:50:04 AM
Thanks, that worked!!! But unfortunately google chrome still won't start up
Title: Re: Change Hostname
Post by: Jerry on July 06, 2014, 06:54:44 AM
Open a terminal and do: google-chrome-stable
and press Enter, then paste the entire output here.
Title: Re: Change Hostname
Post by: benjyz on July 07, 2014, 11:57:32 AM
Thanks Valtam, managed to google the error message from the output and resolve it.

Sent from my HTC One X using Tapatalk

Title: Re: Change Hostname
Post by: Jerry on July 07, 2014, 06:23:14 PM
Would you mind sharing with us how you fixed it? Thank you.
Title: Re: Change Hostname
Post by: benjyz on July 08, 2014, 03:08:24 PM
Sure thing, after running google-chrome-stable in the terminal. I received an error message stating that 

The profile appears to be in use by another Google Chrome process on another computer.

After googling it I found out that it was a known bug https://code.google.com/p/chromium/issues/detail?id=367048 (https://code.google.com/p/chromium/issues/detail?id=367048)

and to resolve you need to type in the following code:

Code: [Select]
rm -rf ~/.config/google-chrome/Singleton*
Title: Re: Change Hostname
Post by: Jerry on July 08, 2014, 05:31:44 PM
Thank you.
Title: Re: Change Hostname
Post by: frogmaster on December 27, 2014, 09:46:36 PM
You may need to change the netbios tag within smb.conf as well, possibly if system-config-samba is installed. I'm not sure, however, if the Samba Server GUI has anything to do with this but changes in smb.conf was necessary in my case.

sudo leafpad /etc/samba/smb.conf

netbios name = newhostname

Something completly different for Your info. You may be interested to know that Chrome's Avira Browser Plugin extension, from the Chrome Webshop link below, will block Linux-Lite pages in Google Search Engine with the following message:

https://chrome.google.com/webstore/detail/avira-browser-safety/flliilndjeohchalpbbcdekjklbdgfkk?utm_source=chrome-ntp-icon

Avira prevents you from opening a potentially harmful website.
Warning! This site might harm your system. It was blocked for your protection.
This website has been identified as a malware site. Malware infects your computer and can include viruses, worms, spyware and trojan horses.


You may want to inform Avira to avoid that?

Thank You