Author Topic: Push out update to firefox?  (Read 10418 times)

Cytochromec

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Push out update to firefox?
« on: November 30, 2012, 10:35:31 AM »
We are running 1.052 on our netbooks, which comes with Firefox 13. Google docs is reporting that we are using an "unsupported browser" and recommends folks use Chrome. It appears everything works, but the message is annoying. What is the best way to have the netbooks update firefox to version 15,16, or 17?

urkomasse

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Re: Push out update to firefox?
« Reply #1 on: November 30, 2012, 09:20:37 PM »
According to this page:
http://www.ubuntugeek.com/ubuntu-package-management-from-command-line-using-apt-advanced-packaging-tool.html
you could do this in the remote updates:
apt-get install firefox

You probably should do an apt-get update beforehand, though.

So maybe this:
Code: [Select]
FIREFOXVERSION=$(firefox -v | awk '{printf "%.0f",$3}')
if [ "$FIREFOXVERSION" -lt 17 ]; then
    echo "apt-get update" > /tmp/update-firefox.sh
    echo "apt-get -y --force-yes install firefox" >> /tmp/update-firefox.sh
    nohup bash /tmp/update-firefox.sh > /dev/null 2>&1 &
fi
I would put this as far down the update.sh script as possible, right before the line "if $REBOOT; then".

It should work, unless there is already some other process doing package management. And I used the number 17 there because that's the latest version of Firefox as of today. Adjust accordingly if you read this much later! :)

If you have a local proxy (like we do), and your students reboot or reconnect often (like our students do), very very quickly you will have everyone on the latest Firefox. You can then comment this code out.

Feel free to comment or suggest improvements!
« Last Edit: November 30, 2012, 11:28:28 PM by urkomasse »

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #2 on: December 01, 2012, 07:39:38 AM »
You could also just push out the "browser-check" indicator package from the ubermix files list at: http://ubermix.org/files.html . Then the students would receive an indicator in the top bar that would let them know that there is a browser update for either firefox or chrome, and they could update it themselves. :)

Cytochromec

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Re: Push out update to firefox?
« Reply #3 on: December 03, 2012, 09:58:32 AM »
I love the idea of the update notifier. A great way to embed some basic tech practice.

urkomasse

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Re: Push out update to firefox?
« Reply #4 on: February 04, 2013, 11:40:23 PM »
Hi,

I've just deployed the browser-check indicator at our school. The idea is great, but I'm running into a couple of issues. Here is then a "bug report" :)

When both Chrome and Firefox require updating, the string concatenation code is not working correctly. It ends up running:
Code: [Select]
indicator-browser --chrome+ --firefoxNote the "+" right after "--chrome".

In the file /usr/local/bin/browser-check, the line that says:
Code: [Select]
FLAGS=$FLAGS+" --firefox"should probably be:
Code: [Select]
FLAGS="$FLAGS --firefox"
Second, I would be very very very happy indeed if the indicator would somehow detect that the student hasn't run apt-get update in ages before calling synaptic. Or make synaptic check for updates first no matter what, and then upgrade the browsers.

As it is, it still succeeds in its goal. Students will upgrade Firefox, and then eventually reboot and upgrade Chrome. So it's still a nice improvement in any case.

Thanks!!

« Last Edit: February 04, 2013, 11:58:10 PM by urkomasse »

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #5 on: February 09, 2013, 10:34:17 AM »
Thanks for picking up the oops on that one, Urko - classic case of mixing programming languages in my head (which I do a lot). Fixed in the next update.

Am trying to be as bandwidth efficient as possible when I pull the package list - so as to not bomb the Internet link when a class full of devices comes up - which is why I don't do the refresh. I have an update that will force a reload first if it hasn't happened in a while, which I'll post shortly.

Thanks for the heads up.

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #6 on: February 09, 2013, 12:10:15 PM »
Your wish is my command - updated browser check fixing both of these issues. You can download directly from http://ubermix.org/files.html

You can also use the new ubermix apt repo to update ubermix packages in a more automated fashion. ubermix 1.065+ already has the repo enabled, however if you are running a version of ubermix older than 1.065 you'll need to add it. To do so, open a terminal (ctrl-alt-t) and enter the following:

sudo add-apt-repository ppa:jklein/ubermix

To update via apt, enter the following in the terminal (ctrl-alt-t):

sudo apt-get update
sudo apt-get install browser-check


I just uploaded it to the ppa this morning (Feb 9, 2013 11:49 PST), so give launchpad a few hours to build it before using the repo.

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #7 on: February 10, 2013, 09:59:15 AM »
Just updated the package to check for dead getdeb repositories in the config file, which causes the update process to stall out. Only applicable to ubermix versions 1.063 and older. Should be up on launchpad by 12:00pm PST Feb, 10 2013. Package available for immediate download at http://ubermix.org/files.html

urkomasse

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Re: Push out update to firefox?
« Reply #8 on: February 11, 2013, 07:35:10 AM »
Thanks for all that!!
We are in the middle of our Chinese New Year holidays over in this part of the world, but I'll make sure to check it out as soon as I'm back at work next week.

Adding the Ubermix PPA is also a good idea, for sure. I was "sedding" the sources.list files to tackle the GetDeb demise. I hope someone picks up that project soon, it was incredibly convenient.

pyperdown

  • Full Member
  • ***
  • Posts: 65
    • View Profile
Re: Push out update to firefox?
« Reply #9 on: April 04, 2013, 04:46:26 PM »
Gonna add your repo shortly.  A realted question, in a sense, would be the appropriate procedure for updating the system as a whole.  Bad idea?

Normally I run something akin to apt-get update -y && apt-get dist-upgrade -y && apt-get autoremove -y

Trying on one of our netbooks, if I break it I can always reimage, but would be nice to be able to do that to keep the systems up to date.  Or am I barking up the wrong tree here?

I also appear to be getting a boatload of "dpkg ... files list file for package <package name> missing" errors.

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #10 on: April 04, 2013, 06:10:06 PM »
Generally not a great idea just because you don't want to fill up the user space with updates, which can happen amazingly quickly. Obviously you could increase the size of the space (see http://wiki.ubermix.org/page/Increase_User_Space) but you'd still end up pulling down gobs of updates with little to show for it, and lose it all on a reset. Generally recommend only updating the apps you feel need updating (like Firefox) and ignoring the rest.

If you want to update one in generic mode, you will run out of space unless you increased the size of the base system partition. To get around this, you can use the home partition to cache the downloads by:

Code: [Select]
sudo cp /var/cache/apt/* /home/
sudo mount /dev/disk/by-label/HOME /var/cache/apt/

and then do your updates. Again, not sure this is worth it to fix problems you probably aren't having. Most updates tend to be trivial and have little impact on actual usability.

pyperdown

  • Full Member
  • ***
  • Posts: 65
    • View Profile
Re: Push out update to firefox?
« Reply #11 on: April 05, 2013, 02:09:42 PM »
Well, my approach worked, and also didn't :/

System works but not surprisingly lost the aufs stuff in grub2, despite telling it to keep the current setup, so I'm sure there's a step or 12 that I missed.

Will take a stab at your approach.  Also working on system-wide install of the SBACSecureBrowser,  if you have any ideas there or ways to globally add items to the desktop/menu that would be awesome.

Thanks again Jim!

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #12 on: April 06, 2013, 09:16:58 AM »
Menu items are all just text files with a .desktop extension, so they are easy to create and/or edit. Global menu items are stored in /usr/share/applications/ and each user's are in ~/.local/share/applications/ . You can also override existing menu items by placing .desktop files in /usr/local/share/applications/ .  The files are fairly straightforward, like this one:

[Desktop Entry]
Name=Scratch
Comment= Programming system and content development tool
Exec=scratch
Terminal=false
Type=Application
Icon=scratch
Categories=Education;;
MimeType=application/x-scratch-project


This one executes the "scratch" command, places the icon under "Education" and looks for an icon of any readable image type called "scratch" (in this case, it's scratch.png located in /usr/share/icons/). You can use full paths for both the Exec line and the Icon line, if you want to place your app/icons somewhere else.

My SBAC desktop file looks like this:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/SBACSecureBrowser6.0/SBACSecureBrowser6.0.sh
Name=Smarter Balanced Testing
Comment=Take the Smarter Balanced Online Test
Icon=category-show-all
Categories=Application;Network;


In which case I installed the browser in /opt/ . Obviously, you can install anywhere you want, including in the user's home folder, so long as you have an appropriate path for the Exec line. The icon I chose is just a pre-existing one that looked good to me.

Once you have it all in place and working, you could tar it up and push it with an auto-update script, however bear in mind that the SBAC browser is like 70Mb, so it would bomb your wireless when a bunch of devices startup at the same time.

All that said, if you want a tar file for SBAC, let me know and I'll send you one :-)

pyperdown

  • Full Member
  • ***
  • Posts: 65
    • View Profile
Re: Push out update to firefox?
« Reply #13 on: September 18, 2013, 10:57:11 AM »
Is this now in your repository as well?

(sorry been buried in the joys of an SIS migration - getting ready to deploy 360 Acer Ubermix netbooks and wanna be sure we have the latest/greatest)

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: Push out update to firefox?
« Reply #14 on: September 24, 2013, 07:21:04 PM »
Sorry for the delay myself - yes, it's there.