WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Backup Hosts and tce.icons  (Read 2732 times)

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Backup Hosts and tce.icons
« on: December 22, 2011, 02:44:44 PM »
Now I am pretty sure these are pretty amateur questions, but I am a little stuck, and not sure what to do.
I have created a custom hosts file to block a bunch of stuff that I don't want to see, mainly advertisements.  I have also added etc/hosts to the /opt/.filetool.lst but every time I reboot I have a new hosts file.  I am assuming this is caused because the hosts file is recreated every time I boot up.
I could write a shell script that will just echo all of my entries into the hosts file every time I boot up, but I wanted to see if there was a better way to do this.  I would rather do it right the first time.

Along those same lines I tried adding my usr/local/tce.icons to the /opt/.filetool.lst.  I did this because I wanted to create some custom buttons on my WBar and this was the only way I could figure out how to do it.  So far it works great, but once again every time I reboot it overwrites the /usr/local/tce.icons.  I did find a post on the forums on how to add custom icons to the WBar but I think that only worked on older versions.  I am running TC 4.0.2.  Once again I could write a script that just echo's all of my changes into the file, but I think there is probably a better way to do this.

Any suggestions on where to go, or how to do either of these.  I apolgize if I should have broken these into 2 seperate questions.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: Backup Hosts and tce.icons
« Reply #1 on: December 22, 2011, 02:56:18 PM »
The hostname is indeed set after backup right now, in /opt/bootsync.sh.

For custom icons, creating an extension would be the "system" way, but scripting is ok too.
The only barriers that can stop you are the ones you create yourself.

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Backup Hosts and tce.icons
« Reply #2 on: December 22, 2011, 04:14:20 PM »
Okay for the hosts file I see in the /usr/bin/sethostname there is a part that does rm-f /etc/hosts then it cat's in the rest.  So if I remove the rm -f /etc/hosts then it should retain my current hosts file.  Hmmm, I think I will have to right a bit of a script that will check to see if the first line of the /etc/hosts is 127.0.0.1 $HOSTNAME localhost, and if not update that line.  Or I may just update that line every time.  I will have to think about that one.  I'll see what I can come up with tonight at home.

For the custom icons the icons that I want to create are already extensions.  I wanted to add icons for Xine and GParted since they are not created by default, or at least not on any of the TC installations that I have currently.  So my question is, how do I add those on since they are already installed extensions?  Eventually I do want to create my own extensions though, I want to add a GUI for the OSSMix so that it is a little easier to adjust the volume.  Typing in ossmix vmix0-outvol 23 over and over is kind of a pain.

Thanks for the response curaga.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Backup Hosts and tce.icons
« Reply #3 on: December 22, 2011, 04:26:34 PM »
There is already a GUI for oss ossxmix.

However it is easy to add your manual OSS adjustments to bootlocal.sh
Same goes for your hostname!

It is easy to unpack an extension and repack with your additions/adjustments. See Wiki.
10+ Years Contributing to Linux Open Source Projects.

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Backup Hosts and tce.icons
« Reply #4 on: December 22, 2011, 04:44:43 PM »
There is already a GUI for oss ossxmix.

Gah!  I new I had seen a GUI before, but I couldn't for the life of me remember how I had found it.  I thought maybe it was only in 3.8 as I couldn't figure it out when I moved to 4.0.  LOL, thank you for that, that will save me a ton of time.

I'll dig around in the Wiki when I get home and see if I can find the article and I will try to rebuild the extensions to have the icons.