Firefox always up to date (autd) - i686 & x86_64

This section is designed for your 'porteus build scripts' which create Porteus modules for your favorite applications. Scripts should work like the well-known 'SlackBuilds' with minimum user interaction.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#16 by Ed_P » 28 Oct 2015, 15:45

tome wrote:replace "wget" with "wget --no-check-certificate'"
Thanks tome, that worked.

Code: Select all

guest@porteus:~$ firefox-autd2.sh

Settings:
  mirror porteus3.0/data-mirror
  myarch x86_64
  lang   en-US
  me     guest
  where  /mnt/sda5/porteus3.0/optional

--2015-10-28 11:37:31--  http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
Resolving releases.mozilla.org (releases.mozilla.org)... 54.230.36.169
Connecting to releases.mozilla.org (releases.mozilla.org)|54.230.36.169|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/ [following]
--2015-10-28 11:37:31--  http://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/
Reusing existing connection to releases.mozilla.org:80.
HTTP request sent, awaiting response... 200 OK

    The file is already fully retrieved; nothing to do.

Downloading latest version of Mozilla Firefox
--2015-10-28 11:37:32--  https://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/firefox-41.0.2.tar.bz2
Resolving releases.mozilla.org (releases.mozilla.org)... 54.230.36.169
Connecting to releases.mozilla.org (releases.mozilla.org)|54.230.36.169|:443... connected.
WARNING: cannot verify releases.mozilla.org's certificate, issued by ‘/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 49327616 (47M) [application/x-tar]
Saving to: ‘firefox-41.0.2.tar.bz2’

100%[======================================>] 49,327,616   854KB/s   in 57s    

2015-10-28 11:38:30 (839 KB/s) - ‘firefox-41.0.2.tar.bz2’ saved [49327616/49327616]

Extracting firefox-41.0.2.tar.bz2
firefox/
firefox/libnss3.so
firefox/platform.ini
firefox/libnspr4.so
firefox/libplc4.so
firefox/run-mozilla.sh
firefox/defaults/
firefox/defaults/pref/
firefox/defaults/pref/channel-prefs.js
firefox/dictionaries/
firefox/dictionaries/en-US.dic
firefox/dictionaries/en-US.aff
firefox/updater
firefox/libfreebl3.chk
firefox/libsmime3.so
firefox/plugin-container
firefox/libnssdbm3.chk
firefox/icons/
firefox/icons/updater.png
firefox/libnssckbi.so
firefox/libnssdbm3.so
firefox/gmp-clearkey/
firefox/gmp-clearkey/0.1/
firefox/gmp-clearkey/0.1/clearkey.info
firefox/gmp-clearkey/0.1/libclearkey.so
firefox/Throbber-small.gif
firefox/browser/
firefox/browser/icons/
firefox/browser/icons/mozicon128.png
firefox/browser/crashreporter-override.ini
firefox/browser/blocklist.xml
firefox/browser/omni.ja
firefox/browser/extensions/
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
firefox/browser/chrome.manifest
firefox/browser/chrome/
firefox/browser/chrome/icons/
firefox/browser/chrome/icons/default/
firefox/browser/chrome/icons/default/default48.png
firefox/browser/chrome/icons/default/default32.png
firefox/browser/chrome/icons/default/default16.png
firefox/browser/components/
firefox/browser/components/libbrowsercomps.so
firefox/browser/components/components.manifest
firefox/dependentlibs.list
firefox/update-settings.ini
firefox/libmozsqlite3.so
firefox/updater.ini
firefox/application.ini
firefox/omni.ja
firefox/libsoftokn3.so
firefox/firefox-bin
firefox/libsoftokn3.chk
firefox/crashreporter.ini
firefox/firefox
firefox/libssl3.so
firefox/removed-files
firefox/libnssutil3.so
firefox/precomplete
firefox/webapprt/
firefox/webapprt/webapprt.ini
firefox/webapprt/omni.ja
firefox/chrome.manifest
firefox/libxul.so
firefox/libplds4.so
firefox/libfreebl3.so
firefox/crashreporter
firefox/webapprt-stub
firefox/components/
firefox/components/libmozgnome.so
firefox/components/components.manifest
firefox/components/libdbusservice.so
umount: /mnt/sda5/porteus3.0/optional/firefox-links.xzm: not found
Generating Desktop Files...
Building the module.
Could not create destination file: No such file or directory




DONE
Activating of /mnt/sda5/porteus3.0/optional/firefox-links.xzm

basename: missing operand
Try 'basename --help' for more information.
umount: /mnt/live/memory/images/: not mounted
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

guest@porteus:~$ 
Gotta check some things. Back later.
Ed

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Firefox always up to date (autd) - i686 & x86_64

Post#17 by tome » 28 Oct 2015, 20:11

Updated first post, thanks tb01 for your stuff, nice to read you. Maybe you want to see flashplayer script and update it http://forum.porteus.org/viewtopic.php? ... 538#p35528 :beer:
You have mind and feelings. Be wise and clever.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#18 by Ed_P » 29 Oct 2015, 05:27

This version worked for me. :good:

firefox-autd2.sh

Code: Select all

    #!/bin/bash
        # /home/guest/firefox-autd2.sh  ; changed filename to not overwrite original author's work
        # http://forum.porteus.org/viewtopic.php?f=76&t=4473
        # Firefox always up to date
        # Script by tome
        # Run as root
        # 1. User preferences 2. Paths 3. Download/extract 4. Launcher+icon module

        if [ `whoami` != "root" ]; then
          ktsuss "$0 $1"
          exit
        fi

        BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
        VERSION=$(cat /etc/porteus-version)

        FOLDER=porteus${VERSION:9:3}
        if [ -d porteus/Modules ]; then
           FOLDER=porteus
        fi

        # Directory where you want to store data on your booting device
        mirror=$FOLDER/data-mirror

        # Choose your architecture i686 or x86_64 (eventually `uname -m`, if you have new hardware)
        myarch=`uname -m`

        # Localized version (language) choose one from: ach af an ar as ast az be bg bn-BD bn-IN br bs ca cs cy da de dsb el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hsb hu hy-AM id is it ja kk km kn ko lij lt lv mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te th tr uk vi xh xpi zh-CN zh-TW
        lang=en-US

        # Who can update, choose root, guest or your user name, it doesn't matter for ntfs/fat filesystems
        me=guest

        # Where you want to place created firefox-links.xzm module
        where=$BOOTDEV/$FOLDER/optional
        if [ -d $BOOTDEV/$FOLDER/Optional ]; then
           where=$BOOTDEV/$FOLDER/Optional
        fi


        # End of settings you should set

        echo
        echo Settings:
        echo "  mirror "$mirror
        echo "  myarch "$myarch
        echo "  lang   "$lang
        echo "  me     "$me
        echo "  where  "$where
        echo
        echo "If Settings are OK press Enter else press Ctrl+C and reset them. "
        read


        # 2. Get booting device
        bdev=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
        realpath=${bdev}/$mirror

        mkdir -p $realpath/apps

        # 3. Download/extract
        cd /tmp
        wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-$myarch/$lang/
        if [ ! -e "/tmp/index.html" ]; then echo ""
          echo "[31mCheck your internet connection! Exiting.[0m"
          exit 0
          fi

        ##latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1`
        latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1 | cut -d '/' -f3`

        echo "Downloading latest version of Mozilla Firefox"

        ##wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-$myarch/$lang/firefox-$latest_version
        wget --no-check-certificate -c https://releases.mozilla.org/pub/firefox/releases/latest/linux-$myarch/$lang/$latest_version

        ##if [ -e "/tmp/firefox-$latest_version" ]; then echo "Extracting firefox-$latest_version"
        if [ -e "/tmp/$latest_version" ]; then echo "Extracting $latest_version"

          ##tar xjvf firefox-$latest_version -C $realpath/apps
          tar xjvf $latest_version -C $realpath/apps

          else
          clear
          echo ""
          echo "[36mCheck your internet connection! Exiting.[0m"
          exit 0
        fi

        # 4. Preparing module
        rm -rf /tmp/firefox-autd
        if [ -e /mnt/live/memory/images/firefox-links.xzm ]; then deactivate /mnt/live/memory/images/firefox-links.xzm
          echo Deactivating old firefox-links.xzm module
          fi
        umount $where/firefox-links.xzm
        rm -rf $where/firefox-links.xzm
        mkdir -p /tmp/firefox-autd/usr/bin
        mkdir -p /tmp/firefox-autd/usr/share/applications
        mkdir -p /tmp/firefox-autd/usr/share/icons/hicolor/48x48/apps
        cp $realpath/apps/firefox/browser/chrome/icons/default/default48.png /tmp/firefox-autd/usr/share/icons/hicolor/48x48/apps/firefox.png
         
        echo '#!/bin/sh' >> /tmp/firefox-autd/usr/bin/firefox-autd
        echo 'bdev=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`' >> /tmp/firefox-autd/usr/bin/firefox-autd
        echo 'exec ${bdev}/'$mirror'/apps/firefox/firefox "$@"' >> /tmp/firefox-autd/usr/bin/firefox-autd

        chmod 755 /tmp/firefox-autd/usr/bin/firefox-autd
        chown $me:$me $realpath/apps/firefox


        echo "Generating Desktop Files..."

        #Creating mozilla-firefox-autd-p.desktop
        echo '[Desktop Entry]' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Exec=firefox-autd -no-remote -p %u' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Icon=firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Type=Application' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Categories=Network;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Name=Firefox Profile Manager' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'X-KDE-StartupNotify=true' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop

        #Creating mozilla-firefox-autd.desktop
        echo '[Desktop Entry]' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Exec=firefox-autd %u' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Icon=firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Type=Application' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Categories=Network;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Name=Firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'X-KDE-StartupNotify=true' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop

        echo "Building the module."
        mksquashfs /tmp/firefox-autd $where/firefox-links.xzm -b 256K

        ##clear
        echo -e "\n\n\n"
        echo "DONE"
        echo "Activating of $where/firefox-links.xzm"
        echo ""
        activate $where/firefox-links.xzm

        exit 0

Code: Select all

guest@porteus:~$ firefox-autd2.sh

Settings:
  mirror porteus/data-mirror
  myarch x86_64
  lang   en-US
  me     guest
  where  /mnt/sda5/porteus/optional

If Settings are OK press Enter else press Ctrl+C and reset them. 
^Cguest@porteus:~$ 


guest@porteus:~$ firefox-autd2.sh

Settings:
  mirror porteus3.0/data-mirror
  myarch x86_64
  lang   en-US
  me     guest
  where  /mnt/sda5/porteus3.0/Optional

If Settings are OK press Enter else press Ctrl+C and reset them. 

--2015-10-29 00:52:06--  http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
Resolving releases.mozilla.org (releases.mozilla.org)... 54.192.51.105
Connecting to releases.mozilla.org (releases.mozilla.org)|54.192.51.105|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/ [following]
--2015-10-29 00:52:06--  http://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/
Reusing existing connection to releases.mozilla.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 946 [text/html]
Saving to: ‘index.html’

100%[======================================>] 946         --.-K/s   in 0s      

2015-10-29 00:52:07 (32.6 MB/s) - ‘index.html’ saved [946/946]

Downloading latest version of Mozilla Firefox
--2015-10-29 00:52:07--  https://releases.mozilla.org/pub/firefox/releases/latest/linux-x86_64/en-US/firefox-41.0.2.tar.bz2
Resolving releases.mozilla.org (releases.mozilla.org)... 54.192.51.105
Connecting to releases.mozilla.org (releases.mozilla.org)|54.192.51.105|:443... connected.
WARNING: cannot verify releases.mozilla.org's certificate, issued by ‘/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 49327616 (47M) [application/x-tar]
Saving to: ‘firefox-41.0.2.tar.bz2’

100%[======================================>] 49,327,616   860KB/s   in 56s    

2015-10-29 00:53:04 (854 KB/s) - ‘firefox-41.0.2.tar.bz2’ saved [49327616/49327616]

Extracting firefox-41.0.2.tar.bz2
firefox/
firefox/libnss3.so
firefox/platform.ini
firefox/libnspr4.so
firefox/libplc4.so
firefox/run-mozilla.sh
firefox/defaults/
firefox/defaults/pref/
firefox/defaults/pref/channel-prefs.js
firefox/dictionaries/
firefox/dictionaries/en-US.dic
firefox/dictionaries/en-US.aff
firefox/updater
firefox/libfreebl3.chk
firefox/libsmime3.so
firefox/plugin-container
firefox/libnssdbm3.chk
firefox/icons/
firefox/icons/updater.png
firefox/libnssckbi.so
firefox/libnssdbm3.so
firefox/gmp-clearkey/
firefox/gmp-clearkey/0.1/
firefox/gmp-clearkey/0.1/clearkey.info
firefox/gmp-clearkey/0.1/libclearkey.so
firefox/Throbber-small.gif
firefox/browser/
firefox/browser/icons/
firefox/browser/icons/mozicon128.png
firefox/browser/crashreporter-override.ini
firefox/browser/blocklist.xml
firefox/browser/omni.ja
firefox/browser/extensions/
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
firefox/browser/chrome.manifest
firefox/browser/chrome/
firefox/browser/chrome/icons/
firefox/browser/chrome/icons/default/
firefox/browser/chrome/icons/default/default48.png
firefox/browser/chrome/icons/default/default32.png
firefox/browser/chrome/icons/default/default16.png
firefox/browser/components/
firefox/browser/components/libbrowsercomps.so
firefox/browser/components/components.manifest
firefox/dependentlibs.list
firefox/update-settings.ini
firefox/libmozsqlite3.so
firefox/updater.ini
firefox/application.ini
firefox/omni.ja
firefox/libsoftokn3.so
firefox/firefox-bin
firefox/libsoftokn3.chk
firefox/crashreporter.ini
firefox/firefox
firefox/libssl3.so
firefox/removed-files
firefox/libnssutil3.so
firefox/precomplete
firefox/webapprt/
firefox/webapprt/webapprt.ini
firefox/webapprt/omni.ja
firefox/chrome.manifest
firefox/libxul.so
firefox/libplds4.so
firefox/libfreebl3.so
firefox/crashreporter
firefox/webapprt-stub
firefox/components/
firefox/components/libmozgnome.so
firefox/components/components.manifest
firefox/components/libdbusservice.so
umount: /mnt/sda5/porteus3.0/Optional/firefox-links.xzm: not mounted
Generating Desktop Files...
Building the module.
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /mnt/sda5/porteus3.0/Optional/firefox-links.xzm, block size 262144.
[=================================================================================|] 4/4 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments, compressed xattrs
	duplicates are removed
Filesystem size 5.06 Kbytes (0.00 Mbytes)
	89.46% of uncompressed filesystem size (5.65 Kbytes)
Inode table size 190 bytes (0.19 Kbytes)
	45.45% of uncompressed inode table size (418 bytes)
Directory table size 234 bytes (0.23 Kbytes)
	70.69% of uncompressed directory table size (331 bytes)
Number of duplicate files found 0
Number of inodes 13
Number of files 4
Number of fragments 1
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 9
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)




DONE
Activating of /mnt/sda5/porteus3.0/Optional/firefox-links.xzm

Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

Updating Razor menu: update-desktop-database
guest@porteus:~$ 
The items added to the Porteus Internet menu are Firefox and Firefox Profile Manager. I clicked on the Firefox one and I am posting this with Firefox 41.0.2. :good: :)

It might be wise to indicate that Firefox should be shutdown before running this.

-update-

The new version lacks the flash player plugin and probably the Jave one too. Yet the two .xzm modules are still active. :(
Ed

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Firefox always up to date (autd) - i686 & x86_64

Post#19 by tome » 29 Oct 2015, 16:31

Open about:plugins site in Firefox. Probably your plugins are in /usr/lib64/mozilla/plugins and they should be in /usr/lib/mozilla/plugins. You should make symlink like for java oracle (do you remember this trick?).
You have mind and feelings. Be wise and clever.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#20 by Ed_P » 29 Oct 2015, 18:20

tome wrote:You should make symlink like for java oracle (do you remember this trick?).
I assume you are referring to this posting: httphas://forum.porteus.org/viewtopic.php?f=75&t=3332&start=15#p31426 :wink:

The two plugins that I use, Flash Player and Jave, work with the 38.1.1 version of FireFox so I have to assume the symlinks are in place. The Flash Player module is from Alien via USM, the Java module is from the Java Builder module.
Ed

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Firefox always up to date (autd) - i686 & x86_64

Post#21 by tome » 29 Oct 2015, 19:29

Type about:plugins in address bar and see available plugins, close all Firefox windows and launch firefox profile mode, create and try new profile.
You have mind and feelings. Be wise and clever.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#22 by Ed_P » 30 Oct 2015, 00:30

^ FireFox 38.1.1 has many plugins including the Flash and Java ones. FireFox 41.0.2 has just one. Creating a new profile and rebuilding a new FireFox profile is overkill and not required when activating a USM version of FireFox. :no:

Code: Select all

FireFox 38.1.1

Java(TM) Plug-in 11.65.2

    File: libnpjp2.so
    Path: /usr/lib64/java/lib/amd64/libnpjp2.so
    Version: 11.65.2
    State: Enabled
    Next Generation Java Plug-in 11.65.2 for Mozilla browsers

Shockwave Flash

    File: libflashplayer.so
    Path: /usr/lib64/mozilla/plugins/libflashplayer.so
    Version: 11.2.202.540
    State: Enabled
    Shockwave Flash 11.2 r202


guest@porteus:~$ sudo deactivate /mnt/sda5/porteus3.0/Modules/mozilla-*.xzm
Password:
Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

Updating Razor menu: update-desktop-database
guest@porteus:~$ sudo activate /mnt/sda5/porteus3.0/Optional/firefox-links.xzm
Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

Updating Razor menu: update-desktop-database
guest@porteus:~$ 


FireFox 41.0.2

    File: 1.4
    Path: /home/guest/.mozilla/firefox/zmibdiaj.default/gmp-gmpopenh264/1.4
    Version: 1.4
    State: Enabled
    This plugin is automatically installed by Mozilla to comply with the WebRTC 
specification and to enable WebRTC calls with devices that require the 
H.264 video codec. Visit http://www.openh264.org/ to view the codec source 
code and learn more about the implementation.
Ed

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Firefox always up to date (autd) - i686 & x86_64

Post#23 by tome » 30 Oct 2015, 16:10

You should run as root:

Code: Select all

ln -s /usr/lib64/mozilla/plugins/*.so /usr/lib/mozilla/plugins
You have mind and feelings. Be wise and clever.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#24 by Ed_P » 30 Oct 2015, 23:42

tome wrote:You should run as root:

Code: Select all

ln -s /usr/lib64/mozilla/plugins/*.so /usr/lib/mozilla/plugins
Actually that appears to have worked!! :shock: 41.0.2 now has the Flash Player & Java plugins plus a VLC one.

Thank you. :beer:

You should tweak the autd script to include it.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# deactivate /mnt/sda5/porteus3.0/Modules/mozilla-*.xzm
Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

Updating Razor menu: update-desktop-database
root@porteus:/home/guest# activate /mnt/sda5/porteus3.0/Optional/firefox-links.xzm
Updating shared library links:  /sbin/ldconfig
/sbin/ldconfig: /usr/lib/libv4lconvert.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l2.so.0 is not a symbolic link

/sbin/ldconfig: /usr/lib/libv4l1.so.0 is not a symbolic link

Updating Razor menu: update-desktop-database
root@porteus:/home/guest# ln -s /usr/lib64/mozilla/plugins/*.so /usr/lib/mozilla/plugins
root@porteus:/home/guest# 
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#25 by Ed_P » 31 Oct 2015, 04:54

Some of these changes may appeal to you tb01, tome.

Code: Select all

guest@porteus:~$ firefox-autd2.sh

Settings:
  mirror porteus3.0/data-mirror
  myarch x86_64
  lang   en-US
  me     guest
  where  /mnt/sda5/porteus3.0/Optional

  Firefox version to be installed: 41.0.2. 
  Firefox version currently installed: 41.0.2
 
If Settings are OK press Enter else press Ctrl+C and reset them. 

Code: Select all

    #!/bin/bash
        # /home/guest/firefox-autd2.sh  ; changed filename to not overwrite original author's work
        # http://forum.porteus.org/viewtopic.php?f=76&t=4473
        # Firefox always up to date
        # Script by tome
        # Run as root
        # 1. User preferences 2. Paths 3. Download/extract 4. Launcher+icon module

        if [ `whoami` != "root" ]; then
          ktsuss "$0 $1"
          exit
        fi

        BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
        VERSION=$(cat /etc/porteus-version)

        FOLDER=porteus${VERSION:9:3}
        if [ -d porteus/Modules ]; then
           FOLDER=porteus
        fi

        # Directory where you want to store data on your booting device
        mirror=$FOLDER/data-mirror

        # Choose your architecture i686 or x86_64 (eventually `uname -m`, if you have new hardware)
        myarch=`uname -m`

        # Localized version (language) choose one from: ach af an ar as ast az be bg bn-BD bn-IN br bs ca cs cy da de dsb el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hsb hu hy-AM id is it ja kk km kn ko lij lt lv mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te th tr uk vi xh xpi zh-CN zh-TW
        lang=en-US

        # Who can update, choose root, guest or your user name, it doesn't matter for ntfs/fat filesystems
        me=guest

        # Where you want to place created firefox-links.xzm module
        where=$BOOTDEV/$FOLDER/optional
        if [ -d $BOOTDEV/$FOLDER/Optional ]; then
           where=$BOOTDEV/$FOLDER/Optional
        fi

        # version installed
        installed_version=`cat $BOOTDEV/$mirror/apps/firefox/application.ini | grep Version=`

        # End of settings you should set

        cd /tmp
        wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-$myarch/$lang/ 2>/dev/null
        if [ ! -e "/tmp/index.html" ]; then echo ""
          echo "[31mCheck your internet connection! Exiting.[0m"
          exit 0
          fi

        ##latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1`
        latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1 | cut -d '/' -f3`

        echo
        echo Settings:
        echo "  mirror "$mirror
        echo "  myarch "$myarch
        echo "  lang   "$lang
        echo "  me     "$me
        echo "  where  "$where
        echo
        echo "  Firefox version to be installed: ${latest_version:8:7} "
        echo "  Firefox version currently installed: ${installed_version:8:7} "
        echo "If Settings are OK press Enter else press Ctrl+C and reset them. "
        read


        # 2. Get booting device
        bdev=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
        realpath=${bdev}/$mirror

        mkdir -p $realpath/apps

        # 3. Download/extract
 #      cd /tmp
 #      wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-$myarch/$lang/
 #      if [ ! -e "/tmp/index.html" ]; then echo ""
 #        echo "[31mCheck your internet connection! Exiting.[0m"
 #        exit 0
 #        fi

 #      ##latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1`
 #      latest_version=`grep tar.bz2 index.html | tail -n1 | cut -d- -f2- | cut -d '"' -f1 | cut -d '/' -f3`

        echo "Downloading latest version of Mozilla Firefox"

        ##wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-$myarch/$lang/firefox-$latest_version
        wget --no-check-certificate -c https://releases.mozilla.org/pub/firefox/releases/latest/linux-$myarch/$lang/$latest_version

        ##if [ -e "/tmp/firefox-$latest_version" ]; then echo "Extracting firefox-$latest_version"
        if [ -e "/tmp/$latest_version" ]; then echo "Extracting $latest_version"

          ##tar xjvf firefox-$latest_version -C $realpath/apps
          tar xjvf $latest_version -C $realpath/apps

          else
          clear
          echo ""
          echo "[36mCheck your internet connection! Exiting.[0m"
          exit 0
        fi

        # 4. Preparing module
        rm -rf /tmp/firefox-autd
        if [ -e /mnt/live/memory/images/firefox-links.xzm ]; then deactivate /mnt/live/memory/images/firefox-links.xzm
          echo Deactivating old firefox-links.xzm module
          fi
        umount $where/firefox-links.xzm
        rm -rf $where/firefox-links.xzm
        mkdir -p /tmp/firefox-autd/usr/bin
        mkdir -p /tmp/firefox-autd/usr/share/applications
        mkdir -p /tmp/firefox-autd/usr/share/icons/hicolor/48x48/apps
        cp $realpath/apps/firefox/browser/chrome/icons/default/default48.png /tmp/firefox-autd/usr/share/icons/hicolor/48x48/apps/firefox.png
         
        echo '#!/bin/sh' >> /tmp/firefox-autd/usr/bin/firefox-autd
        echo 'bdev=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`' >> /tmp/firefox-autd/usr/bin/firefox-autd
        echo 'exec ${bdev}/'$mirror'/apps/firefox/firefox "$@"' >> /tmp/firefox-autd/usr/bin/firefox-autd

        chmod 755 /tmp/firefox-autd/usr/bin/firefox-autd
        chown $me:$me $realpath/apps/firefox


        echo "Generating Desktop Files..."

        #Creating mozilla-firefox-autd-p.desktop
        echo '[Desktop Entry]' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Exec=firefox-autd -no-remote -p %u' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Icon=firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Type=Application' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Categories=Network;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'Name=Firefox Profile Manager' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop
        echo 'X-KDE-StartupNotify=true' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd-p.desktop

        #Creating mozilla-firefox-autd.desktop
        echo '[Desktop Entry]' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Exec=firefox-autd %u' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Icon=firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Type=Application' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Categories=Network;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'Name=Firefox' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop
        echo 'X-KDE-StartupNotify=true' >> /tmp/firefox-autd/usr/share/applications/mozilla-firefox-autd.desktop

        echo "Building the module."
        mksquashfs /tmp/firefox-autd $where/firefox-links.xzm -b 256K

        ##clear
        echo -e "\n\n\n"
        echo "DONE"
        echo "Activating of $where/firefox-links.xzm"
        echo ""
        activate $where/firefox-links.xzm

        if [ $myarch = x86_64]; then
          ln -s /usr/lib64/mozilla/plugins/*.so /usr/lib/mozilla/plugins
        fi

        exit 0
Ed

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Firefox always up to date (autd) - i686 & x86_64

Post#26 by tome » 31 Oct 2015, 17:41

@Ed_P
Firefox version to be installed: 41.0.2.
Firefox version currently installed: 41.0.2
is useless because version to be installed and current version should be always the same. In your case firefox should check for updates and download them in the background without any need of action from you, like Windows updates. Check your settings, type in address-bar: about:preferences#advanced and open Update tab. Probably for your old profile you must change something.
You have mind and feelings. Be wise and clever.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Firefox always up to date (autd) - i686 & x86_64

Post#27 by Ed_P » 31 Oct 2015, 18:18

tome wrote: is useless because version to be installed and current version should be always the same. In your case firefox should check for updates and download them in the background without any need of action from you,
:shock: LOL!! :D I totally misunderstood the function of your script. I thought it was a way to manually upgrade Firefox periodically not that the Firefox it created would do it automatically.

But, in my defense, the lines you noted are useful for people using your script the 1st time, like I was. And since it only needs to be run once, what with Firefox auto update function enabled, the information is useful. imo

Do with my changes what you will. :(
Ed

tb01
White ninja
White ninja
Posts: 12
Joined: 23 Aug 2012, 16:42
Distribution: P-MATE (all) x32/x64, debian
Location: -happydale-

Re: Firefox always up to date (autd) - i686 & x86_64

Post#28 by tb01 » 31 Oct 2015, 21:24

151029-025555 (and got distracted)
151031-161753

Hi Ed_P,

Thank you for your feedback. Had to change the 'where' value -- too many drives w/various distros; I'm a slave to gparted. (grin)

Did switching the wget command (from http to https) break the certificate check? I didn't have that issue and am curious why. I remembered to quit Firefox only -after- the script started. Could running Firefox have overcome/prevented the certificate check issue?

I edited menu entries and quick launch icon to execute 'firefox-autd2'.

Your post [ Re: Firefox always up to date (autd) - i686 & x86_64 (Post by Ed_P #32506) ] included the following:

Code: Select all

    -- snip! --
    Generating Desktop Files...
    Building the module.
    >>> Could not create destination file: Read-only file system <<<

    DONE
Could this have been a permissions setting issue? I didn't see that msg.

I did see the '/tmp: Scheme missing' msg, and I'm unclear what that means.

I really like your addition of:

Code: Select all

if [ `whoami` != "root" ]; then
  ktsuss "$0 $1"
  exit
fi
I need to read the ktsuss man page; that looks handy for another project. Thank you!

Now I realize running v2.1 is likely why 'FOLDER=porteus${VERSION:9:3}' (and maybe other parts) didn't work for me.

Funny thing -- I included the comment about renaming to not overwrite original work, but just noticed I had already edited the 'latest_version' setting to use tail instead of head (I kept getting 41.0.1 instead of 41.0.2). I wonder about me at times...

Is there a reason to manually activate firefox-links.xzm? It's activated in the next to last line of the script (line 132 here). I probably should get more sleep than I do. And work without a cat on top of me. (grin)

I was so very glad to find this. I hope it can be helpful for others. Now, if only sound could work. For some reason that has been an issue with every version of Porteus, regardless of hardware. I love Porteus, but for now I need to boot back into LinuxMint and get some other work done.

Maybe when I get back to Porteus, I'll get sound working. Maybe by then I'll have blkid-based script to minimize my 'too many drives' issue. (grin)

Thanks again for your feedback!
--Tom

PS - I don't run Flash, and only selective Java. If a website requires Flash, I go elsewhere. I've never seen any good reason to trust Adobe.
Consider being the change you wish to see in our world...

tb01
White ninja
White ninja
Posts: 12
Joined: 23 Aug 2012, 16:42
Distribution: P-MATE (all) x32/x64, debian
Location: -happydale-

Re: Firefox always up to date (autd) - i686 & x86_64

Post#29 by tb01 » 01 Nov 2015, 00:20

tome wrote:Updated first post, thanks tb01 for your stuff, nice to read you. Maybe you want to see flashplayer script and update it http://forum.porteus.org/viewtopic.php? ... 538#p35528 :beer:
151031-200323

Hi tome,

Thank you for your feedback, and your thanks -- glad to help in any way I can. Thank you also, so very much, for starting this project! With Firefox updating fast and furious, this is *such* a great idea.

Thanks also for link to flashplayer script, but I don't run Adobe (b/c I don't trust 'em!). That script should still be useful to me in keeping gnash updated, as well as helping me learn to write better scripts. I don't know when I'll work on a gnash-update script, as I only use gnash rarely. But if I come up with something viable, or if I run into problems (<---most likely), I'll post back on that. (smile)

Off topic #1, how do you generate concise links to individual posts? (eg, http://forum.porteus.org/viewtopic.php?f=76&t=2022&p=35538#p35528 -vs- http://forum.porteus.org/viewtopic.php?p=35528&sid=0b225566ecea222ef097a0cce46a1ea5#p35528)

Off topic #2, why do older forum pages show post date different than current? (eg, by tome » 26 Jul 2015, 17:06 -vs- by tome » Jul 2015, 17:06) Well, that's really odd. It's actually displaying day-of-month now -- maybe that was off before I logged in to reply? Me really confuserated... (grin)

I really have enjoyed playing with Porteus. I love that it's small, tight and fast, particularly in RAM. I'm still having issues that prevent me using it full-time (sound, settings), but resolving those will require me posting in other areas, and frankly, it's easier for now to run a heavier distro to get things done.

BTW, I -too- was initially unaware this script was a 'going forward' solution to keeping Firefox updated, and a very elegant one at that! I'd seen the 'decompress, change out files, recompress' fix in other modularized distros, but every time I tried to do that manually, it -always- blew up in my face, and frustrated me so much in troubleshooting what blew up where, and finding just how to fix it, that I'd load another LiveCD and go to town on -that- for a while.

Still, I thoroughly appreciate -everyone's- efforts, in these scripts and in developing Porteus itself. I feel so very fortunate to use an open-source operating system which actually does what I want it to (mostly), and that I can customize, and it does -more- of what I want it to! I just wish I hadn't wasted twenty-eight *extremely frustrated* years of my life with that 'other' closed-source crapware! Long live Linux!

--Tom

PS - Thanks for the :beer:, but I'm allergic. Liquor works, though! Cheers!
Consider being the change you wish to see in our world...

tb01
White ninja
White ninja
Posts: 12
Joined: 23 Aug 2012, 16:42
Distribution: P-MATE (all) x32/x64, debian
Location: -happydale-

Re: Firefox always up to date (autd) - i686 & x86_64

Post#30 by tb01 » 01 Nov 2015, 01:49

tb01 wrote:Off topic #2, why do older forum pages show post date different than current? (eg, by tome » 26 Jul 2015, 17:06 -vs- by tome » Jul 2015, 17:06) Well, that's really odd. It's actually displaying day-of-month now -- maybe that was off before I logged in to reply? Me really confuserated... (grin)
151031-214352

A little investigation revealed the time format snafu was my own doing. In my User Control Panel, Board Preferences, Global Settings, I had used Linux date() formatting where the forum requires PHP formatting. Before I had logged in, display showed day of month. Fixed it. Hope I didn't trouble anyone.

--Tom
Consider being the change you wish to see in our world...

Post Reply