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 Sat 02 Aug 2014, 03:03
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Fix the Help in Abiword and Homebank
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
playdayz


Joined: 25 Apr 2008
Posts: 3788

PostPosted: Wed 04 Apr 2012, 13:52    Post subject:  Fix the Help in Abiword and Homebank
Subject description: and the web links in Help -> About
 

Fix the Help in Abiword and Homebank and the web links in many programs Help -> About

1. Gvfs should be installed

2. The weird part: FF seems to be the only browser that “sets itself as default browser” in the way that gvfs expects. Specifically, FF creates the directory /root/.gconf/desktop/gnome/url-handlers which contains the directories chrome, ftp, http, and https. It also needs to contain the directory file. The same thing is inside each of these directories, the file %gconf.xml. I recommend to just let FF set itself as default and then if it does not create the directory named file, just copy one of the others to that name. These folders and files are necessary.

If FF is the built-in browser then that should be all. If there is another built-in browser, say Seamonkey, then the %gconf.xml files should be edited to call seamonkey instead of FF.

Version 005 of Lucid has this working. Test at http://www.murga-linux.com/puppy/viewtopic.php?p=617026#617026

----------------------------------------------------------------------------------------

Lucid has its own problems because there is no built-in browser. I created a kludge to handle that. It is not enough to edit the %gconf.xml to call defaultbrowser because depending on how FF is installed that could cause a loop. To handle whatever browser is installed I left /usr/lib/firefox/firefox in %gconf.xml and created a file /usr/lib/firefox/firefox as a script. If FF is installed in the default location by a pet then this script will be covered up and gvfs will work correctly. If FF is installed in the default location but as an sfs then the script is not covered up and it calls firefox-bin. If FF is installed in a non-standard location then the script calls defaultbrowser. If FF is not installed then the script calls defaultbrowser. Whew. No doubt someone can come up with something better. This file needs to be present for the kludge to work. And oh yes, the script needs to be persistent because if FF is sets itself as default browser and is then uninstalled, it leaves all of the business in /root/.gconf/desktop/gnome/url-handlers and so another browser would not work correctly. But these are problems because of Lucid's insistence on Browser Choice Wink

Code:
#!/bin/sh
# If Firefox is installed by a pet in the default location, this script will be covered up
# The script is necessary if FF is installed by an sfs in the default location or in a different location, ,
# in order to make gvfs default browser work in apps that use it to display Help
BROWSINSTALLED=`grep "exec" /usr/local/bin/defaultbrowser|awk '{print $2}'`
if [[ $BROWSINSTALLED = firefox ]];then
   if [-a /usr/lib/firefox/firefox-bin];then
   USEBROWSER="/usr/lib/firefox/run-mozilla.sh /usr/lib/firefox/firefox-bin"
   fi
   else USEBROWSER="/usr/local/bin/defaultbrowser"
fi

exec $USEBROWSER "$@"
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Wed 04 Apr 2012, 17:57    Post subject:  

This glib patch fixes it without the need for gvfs or gconf.

Code:
--- gappinfo.c.orig   2012-04-04 17:37:12.279994165 -0400
+++ gappinfo.c   2012-04-04 17:49:07.356656534 -0400
@@ -660,8 +660,12 @@
   file = g_file_new_for_uri (uri);
   app_info = g_file_query_default_handler (file, NULL, error);
   g_object_unref (file);
-  if (app_info == NULL)
-    return FALSE;
+  if (app_info == NULL){
+      gchar *cCommand = g_strdup_printf (" xdg-open %s", uri ); 
+       system(cCommand);
+       g_free (cCommand);
+      return TRUE;
+  }
 
   /* Use the uri, not the GFile, as the GFile roundtrip may
    * affect the uri which we don't want (for instance for a
Back to top
View user's profile Send private message Visit poster's website 
RSH


Joined: 05 Sep 2011
Posts: 2293
Location: Germany

PostPosted: Wed 04 Apr 2012, 18:33    Post subject:  

This script
Code:
#!/bin/sh
# If Firefox is installed by a pet in the default location, this script will be covered up
# The script is necessary if FF is installed by an sfs in the default location or in a different location, ,
# in order to make gvfs default browser work in apps that use it to display Help
BROWSINSTALLED=`grep "exec" /usr/local/bin/defaultbrowser|awk '{print $2}'`
if [[ $BROWSINSTALLED = firefox ]];then
   if [-a /usr/lib/firefox/firefox-bin];then
   USEBROWSER="/usr/lib/firefox/run-mozilla.sh /usr/lib/firefox/firefox-bin"
   fi
   else USEBROWSER="/usr/local/bin/defaultbrowser"
fi

exec $USEBROWSER "$@"

i can run in the terminal.

Where can i run this script?
Code:
--- gappinfo.c.orig   2012-04-04 17:37:12.279994165 -0400
+++ gappinfo.c   2012-04-04 17:49:07.356656534 -0400
@@ -660,8 +660,12 @@
   file = g_file_new_for_uri (uri);
   app_info = g_file_query_default_handler (file, NULL, error);
   g_object_unref (file);
-  if (app_info == NULL)
-    return FALSE;
+  if (app_info == NULL){
+      gchar *cCommand = g_strdup_printf (" xdg-open %s", uri );
+       system(cCommand);
+       g_free (cCommand);
+      return TRUE;
+  }
 
   /* Use the uri, not the GFile, as the GFile roundtrip may
    * affect the uri which we don't want (for instance for a

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7785
Location: qld

PostPosted: Wed 04 Apr 2012, 19:24    Post subject:  

RSH

The second "script" to which you refer is not a script but a patch for C code. It is applied to the C source code with the "patch" program then the source code needs to be compiled.

-

Interesting jemimah, I might try it.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Wed 04 Apr 2012, 21:20    Post subject:  

While you're patching glib, you might as well appy this patch too.

This makes mounted drives show up in file open dialogs.


Code:
diff -ur glib-2.31.6/gio/gunixmounts.c glib-2.31.6-patched//gio/gunixmounts.c
--- glib-2.31.6/gio/gunixmounts.c   2011-12-07 20:10:26.000000000 -0500
+++ glib-2.31.6-patched//gio/gunixmounts.c   2011-12-20 21:22:17.000000000 -0500
@@ -2089,7 +2089,7 @@
       if (g_getenv ("XDG_RUNTIME_DIR") != NULL && g_str_has_prefix (mount_path, g_get_user_runtime_dir ()))
         is_in_runtime_dir = TRUE;
 
-      if (is_in_runtime_dir || g_str_has_prefix (mount_path, "/media/"))
+      if (is_in_runtime_dir || g_str_has_prefix (mount_path, "/mnt/"))
         {
           char *path;
           /* Avoid displaying mounts that are not accessible to the user.
@@ -2099,7 +2099,7 @@
            * block or fail stat()'ing, such as network mounts.
            */
           path = g_path_get_dirname (mount_path);
-          if (g_str_has_prefix (path, "/media/"))
+          if (g_str_has_prefix (path, "/mnt/"))
             {
               if (g_access (path, R_OK|X_OK) != 0)
                 {
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7785
Location: qld

PostPosted: Thu 05 Apr 2012, 07:24    Post subject:  

Well it works! Abiword help, partial gnumeric help and partial homebank. I'm about to recompile homebank-4.4 so I'll see if I can hack away at the source and get it working. EDIT- yep, got it working in Homebank.

Thanks Smile

BTW, the patch I modded for Slacko, it has a slightly older glib..
Code:
diff -rupN glib-2.28.6-orig/gio/gappinfo.c glib-2.28.6/gio/gappinfo.c
--- glib-2.28.6-orig/gio/gappinfo.c   2011-01-06 07:44:06.000000000 +1000
+++ glib-2.28.6/gio/gappinfo.c   2012-04-05 20:29:29.752403887 +1000
@@ -655,8 +655,12 @@ g_app_info_launch_default_for_uri (const
   file = g_file_new_for_uri (uri);
   app_info = g_file_query_default_handler (file, NULL, error);
   g_object_unref (file);
-  if (app_info == NULL)
-    return FALSE;
+  if (app_info == NULL){
+      gchar *cCommand = g_strdup_printf (" xdg-open %s", uri );
+       system(cCommand);
+       g_free (cCommand);
+      return TRUE;
+  }
 
   /* Use the uri, not the GFile, as the GFile roundtrip may
    * affect the uri which we don't want (for instance for a
diff -rupN glib-2.28.6-orig/gio/gunixmounts.c glib-2.28.6/gio/gunixmounts.c
--- glib-2.28.6-orig/gio/gunixmounts.c   2011-01-18 06:54:00.000000000 +1000
+++ glib-2.28.6/gio/gunixmounts.c   2012-04-05 20:34:00.299083904 +1000
@@ -1950,7 +1950,7 @@ g_unix_mount_guess_should_display (GUnix
       if (g_strstr_len (mount_path, -1, "/.") != NULL)
         return FALSE;
 
-      if (g_str_has_prefix (mount_path, "/media/"))
+      if (g_str_has_prefix (mount_path, "/mnt/"))
         {
           char *path;
           /* Avoid displaying mounts that are not accessible to the user.
@@ -1960,7 +1960,7 @@ g_unix_mount_guess_should_display (GUnix
            * block or fail stat()'ing, such as network mounts.
            */
           path = g_path_get_dirname (mount_path);
-          if (g_str_has_prefix (path, "/media/"))
+          if (g_str_has_prefix (path, "/mnt/"))
             {
               if (g_access (path, R_OK|X_OK) != 0)
                 {


applies with patch -p0 <glib_slacko.patch outside the src dir for anyone curious, official slackware-13.37 source package.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Thu 05 Apr 2012, 17:15    Post subject:  

Seems to work in Dpup Exprimo also. Thanks.
Back to top
View user's profile Send private message 
Pelo


Joined: 10 Sep 2011
Posts: 2932
Location: Mer méditerrannée (1 kms°)

PostPosted: Sat 12 Jul 2014, 06:46    Post subject: Homebank help  

homebank help : to remember solutions already found and refresh information regarding new versions
_________________
Puppy, il ne lui manque que la parole !
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
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.0822s ][ Queries: 11 (0.0036s) ][ GZIP on ]