PDA

View Full Version : Hostsman in Linux :D


alpha645
2007-02-14, 12:50 PM CST
This procedure will install hostsman. If you don't know what it it, google it. In short: Hostsman blocks unwanted sites. Do all this under a normal user unless told otherwise.

You need wine:

yum -y install wine

Then grab the installer:

wget http://pwp.netcabo.pt/0413933601/abelhadigital/software/hostsman/hostsman30beta1.exe
wine hostsman30beta1.exe

Go through the installation, leave everything as it is.
Now, we prepare the .wine installation for use with hostsman. The installation only misses one critical file hostsman needs: the hosts file :D . We are going to create one :) .

cd ~/.wine/drive_c/windows/system32/drivers/
mkdir etc
cd etc
su -
cp /etc/hosts ~/.wine/drive_c/windows/system32/drivers/etc/
exit
exit

Now you can start hostsman :) . Open a new terminal and type:

wine ~/.wine/drive_c/"Program Files"/abelhadigital.com/Hostsman/hm.exe

Keep the terminal open and hostsman should appear. Everything works :D . From the server till the updates. However, I suggest you only use the program when you edit the hostsfile. So, now, edit the hostsfile and once you are done. Copy the hostsfile you made back to the Linux hostsfile. Exit the program and kill the terminal (hostsman is now closed). Now open a new terminal:

su -
cp /home/<username>/.wine/drive_c/windows/system32/drivers/etc/hosts /etc/hosts
(replace <username> with the username you are logged in)

Done :)

You could also lay a symlink directly from the wine hostsfile to the systems hostsfile.