Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 01 Aug 2014, 08:21
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
[HowTo] Make Firefox Or Other Mozilla Based App Portable
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Sun 02 May 2010, 18:00    Post subject:  [HowTo] Make Firefox Or Other Mozilla Based App Portable  

I use this script for making Firefox portable but it should work with any Mozilla base based app.

Update8: Firefox 4 Portable

Update7:Instead of these steps you can use the attached script. Which is based on this one: https://www.privacyfoundation.de/wiki/PortableLinuxApps?action=AttachFile&do=view&target=download-firefox-portable-EN.sh

  1. Extract the current version of the Firefox .tar.bz2 where you want it. You can get it from: http://www.mozilla.com/en-US/firefox/all.html (Note: The Linux version is a binary).
  2. You will now have a folder called Firefox which has all the Firefox bits. You might (which I do.) want to rename it to "firefoxportable" (Without the quotes.)

    In that folder:
  3. Create a new folder called "profile" (Without the quotes.)
  4. Create a new file called "firefoxportable" (Without the quotes.).
  5. Give the file "firefoxportable" excutable permissions.
  6. Put this code in that file:
    Code:
    #!/bin/sh
    #Version 0.0.8
    #Put together by Alexander S.T. Ross (abushcrafter)
    #Based on the luncher from: https://www.privacyfoundation.de/wiki/PortableLinuxApps
    #Also based on the luncher from: http://portools.com/apps/iceweasel-portable

    #Works with any mozzila base based app like Firefox,ThunderBird,SongBird,SunBird,Fennec (Firefox Mobile),Seamonkey,etc.

    #The reason for the bit of code, for disabling error output of the $app. Is because if you are for instants using Firefox, some addons like ReadItLater reviles (In a URL) your password and user-name of your ReadItLater account. This info then ends up in the system log: "/tmp/xerrs.log".

    #ChangeLog ----------------------------------------------------------------------
    #   2010/10/31  Alexander .S.T. Ross (abushcrafter) Email: <http://www.google.com/recaptcha/mailhide/d?k=01uNeUuXxeNm9FA3Zciuoqzw==&c=nVfKeb7kjqZVVIQanqJwEC2DP5zrALkSERTopYvj_pU=>
    #      * 0.0.7: Now finds out what the current version of the Mozilla app is. Thanks to my dad.
    #      * 0.0.7: Now gives you a splash screen telling you that Mozilla app is now closed.
    #      * 0.0.7: Added some Debug/Info echos.
    #      * 0.0.7: Removed Dingo's <http://dokupuppylinux.co.cc/> Puppy Linux font fix as it's fixed in newer versions of Puppy Linux (.E.G. Lupu 5.*.* (Might have not been fixed in first few version?)).
    #      * 0.0.7: Removed nooby mistakes of mine. .E.G. variables being exported, "exec" being used to run the Mozilla app.

    #   2010/11/01  Alexander .S.T. Ross (abushcrafter) Email: <http://www.google.com/recaptcha/mailhide/d?k=01uNeUuXxeNm9FA3Zciuoqzw==&c=nVfKeb7kjqZVVIQanqJwEC2DP5zrALkSERTopYvj_pU=>
    #      * 0.0.8: Fixed all bugs. Now works.
    #      * 0.0.8: Added more echos.

    app="firefox"

    echo "${app}portable:Debug/Info: 0="$0""
    dir=${0%/*}
    echo "${app}portable:Debug/Info: dir="$dir""
    if [ "$dir" = "$0" ]; then
      dir="."
    fi
    HOME=${dir}/profile
    cd "$dir"
    echo "${app}portable:Debug/Info: Current Dir="`pwd`

    version=`./$app --version |tr , \ | cut --fields=3 --delimiter=\ `
    echo "Welcome to the Linux version of $app $version in portable mode. Feedback is NOT disabled."

    #START: Part of Dingo's <http://dokupuppylinux.co.cc/> additions to this script.
    if test -d profile ; then
    printf "${app}portable:Debug/Info: Profile Directory already exists!\n"
    else
    mkdir -p profile
    fi
    #END: Part of Dingo's <http://dokupuppylinux.co.cc/> additions to this script.

    #Remove the "#" from the next line to disable error output.
    ./$app -no-remote -profile "./profile" $@ #2>/dev/null

    echo "${app}portable:Debug/Info: $app is now closed."
    yaf-splash -text "$app Is Now Closed" -bg green -fg black -timeout 3 -display :0 -margin 2 -bw 0 -font "9x15B" -outline 0
    echo "${app}portable:Debug/Info: ${app}portable is now closed."


  7. Run "firefoxportable".
  8. Done.

If you want your profile from a existing install of Firefox. Then (Firefox must be not running!) copy your profile folders contents into the profile folder of your portable Firefox.

Profile Info:
http://support.mozilla.com/search.php?where=all&locale=en-US&qs=s&q=profile&sa=Search

Update2:
To enable Java do the flowing:
For the current stable version of java. See my SFS here:
http://www.murga-linux.com/puppy/viewtopic.php?t=55015
  1. Make syslinks to:
    (Note: Change "/usr/lib/java/jre1.6.0_20/" to the path of your java folder)
    Code:
    /usr/lib/java/jre1.6.0_20/lib/i386/libnpjp2.so

    and
    Code:
    /usr/lib/java/jre1.6.0_20/plugin/i386/ns7/libjavaplugin_oji.so

    into the "plugins" of your Firefox Application Folder.

  2. Restart Firefox Portable if it is already running.

  3. Check that Java works here: http://www.java.com/en/download/help/testvm.xml If it is not loading read this: http://www.murga-linux.com/puppy/viewtopic.php?t=54856

Update3:
Things you can do to improve Firefox's performance: Improving Firefox Portable's Performance.

That's it!
DownloadAndMake-Firefox-Portable-0.0.3-EN.sh.bz2
Description 
bz2

 Download 
Filename  DownloadAndMake-Firefox-Portable-0.0.3-EN.sh.bz2 
Filesize  1.91 KB 
Downloaded  299 Time(s) 

Last edited by abushcrafter on Tue 29 Mar 2011, 21:27; edited 17 times in total
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1415
Location: somewhere at the end of rainbow...

PostPosted: Thu 06 May 2010, 15:57    Post subject:  

modifying executable name, also Thunderbird can become portable with this script

I have only a problem with firefox portable: menu fonts are too small, tried already tricks with userChrome.css, without success

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Thu 06 May 2010, 19:28    Post subject:  

Dingo wrote:
modifying executable name, also Thunderbird can become portable with this script
Thanks for the conformation.

Dingo wrote:
I have only a problem with firefox portable: menu fonts are too small, tried already tricks with userChrome.css, without success
This is a problem with puppy. This gets fixed for me by all the packages I install Razz! I believe this info from Jemimah is that you what:

Quote:

In "/etc/fonts/local.conf" add:
Code:

        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>DejaVu Sans</family>
                </prefer>
        </alias>
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1415
Location: somewhere at the end of rainbow...

PostPosted: Fri 07 May 2010, 08:17    Post subject:  

yes, it works

meanwhile I discovered that creating a chrome subdir in profile dir, and putting into an userChrome.css file, it solves the small fonts menu, but your trick is also needed for better rendition in form fields and elsewhere in page modules

So I downloaded latest Firefox en_US

uncompressed archive

putted into three files I attach (in one archive)

- portable firefox script
- userChrome.css
- a modified version of local.conf (for font tweaking, I first backup existing)


libdbus-1-3_1.2.1-5
libdbus-glib-1-2_0.76-1


are also required , you can download from here

http://bit.ly/aakcnp

or from debian repositories (lenny)

I modified your script as follows, adding some lines (being not a good scripter any suggestion is welcomed)

EDIT:

improved version of Script, now only portablefirefox script (attached) is needed

Code:
#!/bin/sh
#Version 0.0.5
#Put together by Alexander S.T. Ross (abushcrafter)
#Based on the luncher from: https://www.privacyfoundation.de/wiki/PortableLinuxApps
#Also based on the luncher from: http://portools.com/apps/iceweasel-portable
#

######### Dingo's addition to script - http://dokupuppylinux.co.cc/
if test -d profile ; then
printf "directory already exists\n"
else
mkdir -p profile/chrome
cat << EOF > profile/chrome/userChrome.css
/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


/*
 * Some possible accessibility enhancements:
 */
/*
 * Make all the default font sizes 20 pt:
 *
 * * {
 *   font-size: 20pt !important
 * }
 */

 * {
   font-size: 9pt !important;
   font-family: DejaVu Sans !important;
 }
/*   font-family: nimbus !important;*/

/*
 * Make menu items in particular 15 pt instead of the default size:
 *
 * menupopup > * {
 *   font-size: 15pt !important
 * }
 */

/*BK experimenting...
menupopup > * {
  font-size: 12pt !important
}
menu > * {
  font-size: 12pt !important
}
*/

/*
 * Give the Location (URL) Bar a fixed-width font
 *
 * #urlbar {
 *    font-family: monospace !important;
 * }
 */

/*
 * Eliminate the throbber and its annoying movement:
 *
 * #throbber-box {
 *   display: none !important;
 * }
 */

/*
 * For more examples see http://www.mozilla.org/unix/customizing.html
 */
EOF
fi
if test -f /etc/fonts/local.conf.zip ; then
printf "backup  file already exists\n"
else
zip /etc/fonts/local.conf.zip /etc/fonts/local.conf
cat << EOF > /etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
<!--
  Enable sub-pixel rendering
   <match target="font">
      <test qual="all" name="rgba">
         <const>unknown</const>
      </test>
      <edit name="rgba" mode="assign"><const>rgb</const></edit>
   </match>
-->
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>DejaVu Sans</family>
                </prefer>
        </alias>
</fontconfig>
EOF
fi
######## end of additions

export app="firefox"
export version="3.6.*"

echo "Welcome to the Linux version of $app $version in portable mode. Feedback is NOT disabled."
dir=${0%/*}
if [ "$dir" = "$0" ]; then
  dir="."
fi
HOME=${dir}/profile
cd "$dir"
#Remove the "#" from the next line to disable error output.
exec ./$app -no-remote -profile "./profile" $@ #2>/dev/null
portablefirefox.zip
Description 
zip

 Download 
Filename  portablefirefox.zip 
Filesize  1.37 KB 
Downloaded  438 Time(s) 

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

Last edited by Dingo on Fri 07 May 2010, 16:38; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Fri 07 May 2010, 08:32    Post subject:  

@Dingo Thanks for adding that feature. Hope you when not asking for suggestions from me! I don't know much at all. I still need to read some bash manuals! I have been living of dad telling me how to do little things like setting a viable! BTW could you increase the version number in you post's code to 0.0.4 please.
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1415
Location: somewhere at the end of rainbow...

PostPosted: Fri 07 May 2010, 16:51    Post subject:  

I Improved script in order to redirect directly text output from script instead of copying from files see here

another question:

it seems to me firefox I have downloaded from mozilla, has some problems in showing transparent png

are you able to view png image here?
http://www.clker.com/clipart-2760.html

it should look like this:



I suspect this can be related with libpng version in Puppy, I have yyet tried with a firefox version compiled in Puppy

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Fri 07 May 2010, 17:10    Post subject:  

Dingo wrote:
another question:

it seems to me firefox I have downloaded from mozilla, has some problems in showing transparent png

are you able to view png image here?
http://www.clker.com/clipart-2760.html

it should look like this:



I suspect this can be related with libpng version in Puppy, I have yet tried with a firefox version compiled in Puppy
I have no problems on my heavy customised system.
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 10 May 2010, 08:46    Post subject:  

Updated first post on how to get Java working.
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2646
Location: Montenegro

PostPosted: Tue 11 May 2010, 16:38    Post subject:  

Hey guys I was just investigating fonts problem in firefox today (not portable one, will get to that Very Happy so yeah firefox is there in dpup by default and has nice fonts but when I renamed .mozilla dir they've apeared bad by default so I looked into original dir that was there, I found out these lines in prefs.js in profile dir:

Code:

user_pref("browser.display.use_document_fonts", 0);
user_pref("font.default.x-western", "sans-serif");
user_pref("font.minimum-size.x-western", 12);
user_pref("font.name.sans-serif.x-western", "DejaVu Sans");


It can be probably tweaked manually thru about:config when filtering search with "fonts" but if it's new profile which doesn't have prefs.js created yet you can just make new file with those lines only inside and fonts should be ok.

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Sun 01 Aug 2010, 18:38    Post subject:  

Update 3: Improving Firefox's performance.
_________________
adobe flash is rubbish!
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 01 Nov 2010, 13:10    Post subject: Update! See First Post!  

New version of script!
Version=0.0.8

_________________
adobe flash is rubbish!
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 01 Nov 2010, 13:17    Post subject: Update! See First Post!  

Fixed two little mistakes.
_________________
adobe flash is rubbish!
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Back to top
View user's profile Send private message Visit poster's website 
magerlab

Joined: 08 Jul 2007
Posts: 731

PostPosted: Mon 01 Nov 2010, 13:29    Post subject:  

hey!!!
i can say again that this forum is GREAT!!!! Laughing
I was looking for a solution to run both FF3.6 and beta 4
and it seems, i can do it with this script

_________________
skype: desafimager
Back to top
View user's profile Send private message 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 01 Nov 2010, 13:56    Post subject: Update! See First Post!  

magerlab wrote:
hey!!!
i can say again that this forum is GREAT!!!! Laughing
I was looking for a solution to run both FF3.6 and beta 4
and it seems, i can do it with this script
Oh yes Very Happy and Thanks.

Fixed some spelling and other errors in the change-log.

_________________
adobe flash is rubbish!
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 01 Nov 2010, 14:23    Post subject: Update! See First Post!  

Update7: New script to do it all for you.
_________________
adobe flash is rubbish!
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1124s ][ Queries: 13 (0.0061s) ][ GZIP on ]