You are not logged in.

#76 2010-08-23 09:14:53

moere
Member
Registered: 2010-02-14
Posts: 29

Re: PCManFM Mod - User-Definable Functions

I use LXDE and pcmanfm (pcmanfm-mod) as my desktop manager.
I did install the pcmanfm-mod-prov. (And deinstalled pcmanfm-mod before).

And the link exists now.

ll /usr/bin/pcmanfm
lrwxrwxrwx 1 root root 20 23. Aug 10:55 /usr/bin/pcmanfm -> /usr/bin/pcmanfm-mod

But still, pcmanfm wont start on startup as my desktop manager.

And the config file seems not to work.

When I switch the view mode to detail it is to set to symbols after a reboot.

I found .config/pcmanfm-mod/main.lxde
and there is also .config/pcmanfm/main.lxde.
Both have rw rights for the user.
My .xinitrc:

exec ck-launch-session startlxde

In the startlxde script it is looking for a "pcmanfm.conf"

Any help is appreciated.

Offline

#77 2010-08-23 16:22:00

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

moere wrote:

But still, pcmanfm wont start on startup as my desktop manager.

And the config file seems not to work.

When I switch the view mode to detail it is to set to symbols after a reboot.

I found .config/pcmanfm-mod/main.lxde
and there is also .config/pcmanfm/main.lxde.
Both have rw rights for the user.
My .xinitrc:

exec ck-launch-session startlxde

In the startlxde script it is looking for a "pcmanfm.conf"

For a short answer, AFAIK pcmanfm.conf is the config file for pcmanfm2/libfm, not the legacy version (eg pcmanfm-mod, which uses main or main.lxde).  The newest pcmanfm-mod will load ~/.config/pcmanfm-mod/main[.lxde] when it starts if it is present.  If it is not present it will import settings from ~/.config/pcmanfm/main[.lxde] if present.  (If pcmanfm-mod detects itself running under LXDE it will add the .lxde extension - this behavior is a holdover from 0.5.2)

I know others are using pcmanfm-mod with lxde without troubles, so I'm not sure why it's not working in your case, unless your lxde is more up-to-date and is perhaps configured for pcmanfm2/libfm.  I do have one machine that runs lxde so when I get a chance I will update that and see if I can reproduce your problem.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#78 2010-08-23 17:49:10

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

@moere:
I did update my lxde machine, which has pcmanfm-mod-prov installed, but didn't encounter your problem.  I do notice a section in the startlxde script which refers to /usr/share/lxde/pcmanfm/pcmanfm.conf, but that file doesn't exist on my system.

FYI, on my system both ~/.config/pcmanfm/ and ~/.config/pcmanfm-mod/ contain only one file: "main.lxde - there is no pcmanfm.conf (because I have never installed pcmanfm2/libfm on that system).  The desktop starts normally (there is a link named "/usr/bin/pcmanfm -> /usr/bin/pcmanfm-mod")


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#79 2010-08-23 18:11:10

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

A note on "Open Current Folder As Root":

This Arch/gksudo bug may render the "Open Current Folder As Root" command in pcmanfm and pcmanfm-mod unresponsive because by default the programs use /usr/bin/gksudo

No error will be displayed but the root folder won't open.  You can see the error by manually running:

/usr/bin/gksudo "pcmanfm-mod --no-desktop '/home/'"

sudo: sorry, a password is required to run sudo

On Arch /usr/bin/gksudo is a link to /usr/bin/gksu, so one temporary method to avoid this problem is to force pcmanfm-mod to use gksu by deleting /usr/bin/gksudo (if that's missing, pcmanfm-mod will use gksu).

Or, you can use the following patch for vfs-utils.c, which causes it to prefer gksu over gksudo:

static char* find_su_program( GError** err )
{
    char* su;

#ifdef PREFERABLE_SUDO_PROG
    su = g_find_program_in_path( PREFERABLE_SUDO_PROG );
#else
    /* Use default search rules */
    su = g_find_program_in_path( "gksu" );
    if ( ! su )
        su = g_find_program_in_path( "gksudo" );
    if ( ! su )
        su = g_find_program_in_path( "kdesu" );
#endif

    if ( ! su )
        g_set_error( err, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, _( "gksu or kdesu is not found" ) );

    return su;
}

Download patch
MD5SUM: c5de7aef236136f95c7f9f7978695a84
SHA256SUM: 03031fb7efcd78cac4d50d857441f200a5299c0321671a67a85aba5b87628213


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#80 2010-08-23 18:14:46

moere
Member
Registered: 2010-02-14
Posts: 29

Re: PCManFM Mod - User-Definable Functions

The /usr/share/lxde/pcmanfm/pcmanfm.conf doesnt exist on my system either.

I changed my startlxde script so that it looks for the .config/pcmanfm-mod/main.lxde.
But still it wont start pcmanfm-mod on startup.

When I do a change to the view mode for example it is reset after a reboot.

I found out that this happens when I kill x and pcmanfm-mod is not
ended "normally".
When I kill every pcmanfm session being in the xsession the changes are written
into the main.lxde file.
But when I log out of the xsession nothing is written to that file.

Last edited by moere (2010-08-23 18:16:48)

Offline

#81 2010-08-23 18:38:57

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

moere wrote:

The /usr/share/lxde/pcmanfm/pcmanfm.conf doesnt exist on my system either.

I changed my startlxde script so that it looks for the .config/pcmanfm-mod/main.lxde.
But still it wont start pcmanfm-mod on startup.

I don't know what would be causing that.  Only thing I notice not working is if I right-click on the desktop and select "Desktop Settings", nothing opens.  Not sure why that is, but desktop settings can be changed in PCManFM-Mod's Preferences.

When I do a change to the view mode for example it is reset after a reboot.

I found out that this happens when I kill x and pcmanfm-mod is not
ended "normally".
When I kill every pcmanfm session being in the xsession the changes are written
into the main.lxde file.
But when I log out of the xsession nothing is written to that file.

That is normal if the session is killed, because pcmanfm-mod doesn't write changes to main.lxde until the program closes.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#82 2010-09-04 18:27:39

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

IgnorantGuru, "copy as text" feature copies "space quote filepath quote".  I understand that the space and quotes are part of the feature but I often have to delete them manually.  I would like to make a mod for myself which doesn't copy the space and quotes, can you point me to the source file that contains the codes for this.

Also, I'd like to make a request for "Alt+c" for copy just filename as text.

Offline

#83 2010-09-04 20:39:11

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

tri1976 wrote:

IgnorantGuru, "copy as text" feature copies "space quote filepath quote".  I understand that the space and quotes are part of the feature but I often have to delete them manually.  I would like to make a mod for myself which doesn't copy the space and quotes, can you point me to the source file that contains the codes for this.

Search for "void ptk_clipboard_copy_as_text(" in src/ptk/ptk-clipboard.c  (line 91)

Also, I'd like to make a request for "Alt+c" for copy just filename as text.

Good idea - I'll consider that.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#84 2010-09-05 01:43:25

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

PCManFM-Mod v1.1.1 is available, which adds a few minor features:

    * A "Copy Name" (Alt-Shift-C) command has been added to the Edit and right-click menus to copy filenames to the clipboard (without path).
    * The Copying, Moving, and Deleting progress dialogs have been widened for easier reading
    * The Paste items on the context menu are now disabled if the clipboard does not contain a pastable file list
    * The Paste and Create items now appear on the context menu even if the cursor is over a file

No changes were made regarding the gksudo 'Open Current Folder As Root' issue since that bug should be addressed in gksu.

http://igurublog.wordpress.com/downloads/mod-pcmanfm/


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#85 2010-09-15 20:47:37

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

I'm checking out the "paste as target" feature, but not quite sure what it is.  If I copy a files and folders, "paste as target" seems to do the same thing as "paste".  Can someone elaborate on how "paste as target" is used?  Thanks.

Offline

#86 2010-09-15 21:23:54

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

tri1976 wrote:

I'm checking out the "paste as target" feature, but not quite sure what it is.  If I copy a files and folders, "paste as target" seems to do the same thing as "paste".  Can someone elaborate on how "paste as target" is used?  Thanks.

If you copy symlinks to the clipboard, then Paste As Target will paste a copy of the targets of the links, rather than a copy of the links.  It's meant as a handy way to grab the target without having to find and enter the target folder.  For regular (non-symlink) files or folders on the clipboard, Paste As Target works the same as Paste.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#87 2010-09-15 23:12:57

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

ah, got it.  That's convenient...Thank you.

Offline

#88 2010-11-03 01:19:37

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

PCManFM-Mod v1.1.2 is available.  Changes in this version:

* The ability to disable the delete confirmation dialog has been added
* The ability to change the su program used for 'open folder as root' and mounting as root has been added
* ktsuss is now supported
* The Copy/Move progress dialog has been simplified
* IEC binary units now show KB/MB/GB/TB instead of KiB/MiB/GiB/TiB, and these units are now the default (see Edit|Preferences|Advanced to change to IEC binary units - this affects whether KB is measured as 1000 bytes or 1024 bytes)
* If no_execute is set in the config file, a file will be executed if Execute is explicitly selected from the context menu
* A build problem which affected Fedora users should be corrected

http://igurublog.wordpress.com/downloads/mod-pcmanfm/


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#89 2010-11-27 22:25:28

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

PCManFM-Mod v1.1.3 is available.  This update adds the command line switches --desktop, --profile, and --desktop-pref for compatibility with PCManFM 0.9.  This will help LXDE users to use pcmanfm-mod as a desktop management replacement for pcmanfm, without the need to change LXDE's startup files.  Right-clicking on the LXDE desktop and selecting "Desktop Settings" will now work with pcmanfm-mod.

This update also provides a workaround for a dbus error produced by Roxterm when running pcmanfm-mod as root.

As a reminder, there are two AUR packages for pcmanfm-mod:

The pcmanfm-mod package does not provide pcmanfm and can thus be installed concurrently with other versions of pcmanfm.

The pcmanfm-mod-prov package is identical to pcmanfm-mod except that it provides pcmanfm and thus conflicts with other versions of pcmanfm.  This package is primarily intended for LXDE users who want pcmanfm-mod to manage their desktop.  Alternatively, LXDE users who want the newer version of pcmanfm to manage their desktop, and want to run pcmanfm-mod as a file manager only, can install the normal pcmanfm-mod AUR package.

LXDE users who want more control over desktop management may also want to consult /etc/xdg/lxsession/  If that folder is copied to the user's home as ~/.config/lxsession, those config files may be edited on a per-user basis to control pcmanfm startup.

Last edited by IgnorantGuru (2010-11-27 22:28:38)


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#90 2010-11-28 15:25:06

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

Is there a way to reorder the columns (i.e. name, size, last modification, type, ....)?  If not, I'd like to make this a feature request.

Offline

#91 2010-11-28 15:53:47

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

tri1976 wrote:

Is there a way to reorder the columns (i.e. name, size, last modification, type, ....)?

No, and that's not something I'm likely to add.  But you could look around in the source - it might not be very difficult to hard code it the way you want.  Have a look in src/ptk/ptk-file-browser.c line 1693 (init_list_view function):

    int cols[] = { COL_FILE_NAME, COL_FILE_SIZE, COL_FILE_DESC,
                   COL_FILE_PERM, COL_FILE_OWNER, COL_FILE_MTIME };
    int i;

    const char* titles[] =
        {
            N_( "Name" ), N_( "Size" ), N_( "Type" ),
            N_( "Permission" ), N_( "Owner:Group" ), N_( "Last Modification" )
        };

If you change the order of both the cols[] and titles[] arrays so the order matches, I suspect that will do it.  IOW to put the owner last change that section to:

    int cols[] = { COL_FILE_NAME, COL_FILE_SIZE, COL_FILE_DESC,
                   COL_FILE_PERM, COL_FILE_MTIME, COL_FILE_OWNER };
    int i;

    const char* titles[] =
        {
            N_( "Name" ), N_( "Size" ), N_( "Type" ),
            N_( "Permission" ), N_( "Last Modification" ), N_( "Owner:Group" )
        };

Then build normally:

cd pcmanfm-mod-1.1.3
./configure --prefix=/usr
make
sudo make install

Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#92 2010-11-28 18:36:34

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

That does the trick.  Thank you.

Offline

#93 2011-01-14 00:12:06

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

PCManFM-Mod 1.2.0 is available.  This update includes the following changes and additions:

* The Copy/Move progress dialog now displays file count, size, transfer speeds, and time remaining

* Nautilus-style .hidden files are now supported.  Any filenames listed in a text file named ".hidden" will not be displayed.  List one file per line (file name only, excluding path).  Each folder may have a ".hidden" file which determines display of files in that folder.  The total hidden count is shown in the status bar.  The View|Show Hidden Files setting has no effect on this method.

* The View|Refresh function has been improved yet again to really re-read the directory

* The status bar text has been streamlined

* A bug in the original 0.5.2 which caused some Find Files results to not be displayed has been corrected

* A bug in the original 0.5.2 which caused the Find Files 'Search in Sub Directories' checkbox to be ignored has been corrected

* A bug in the original 0.5.2 which sometimes produced an erroneous "Invalid cross-device link" error has been corrected

http://igurublog.wordpress.com/downloads/mod-pcmanfm/
http://aur.archlinux.org/packages.php?ID=34819
http://aur.archlinux.org/packages.php?ID=39547


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#94 2011-01-14 01:29:16

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

I'm using version 1.2.0, but I start noticing this problem while using 1.1.3.  When I right click on a file and open it with a program in "open with" menu, it doesn't work the first time, but it will work the 2nd time.  Can you investigate this bug?  Thanks.

Offline

#95 2011-01-14 01:39:47

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

tri1976 wrote:

I'm using version 1.2.0, but I start noticing this problem while using 1.1.3.  When I right click on a file and open it with a program in "open with" menu, it doesn't work the first time, but it will work the 2nd time.  Can you investigate this bug?  Thanks.

I can't reproduce that problem.  The older versions are available at http://sourceforge.net/projects/pcmanfm-mod/files/  If you can find which version began doing it I could look over the changes in the code.  I don't recall changing anything that should have affected that and no one else has reported it thus far.  You might also check if all open-with programs exhibit the problem.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#96 2011-01-14 02:00:47

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

Also, there are PKGBUILDs inside of each tarball appropriate for that version.  Just copy the PKGBUILD, .install file, and tarball to a dir and 'makepkg'.  That should make testing older versions easy.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#97 2011-01-14 02:57:51

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

version 1.1.0 doesn't have this problem.  Thanks.

Offline

#98 2011-01-14 17:51:49

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 639
Website

Re: PCManFM Mod - User-Definable Functions

tri1976 wrote:

version 1.1.0 doesn't have this problem.  Thanks.

I looked over the changes since 1.1.0 and I certainly don't see anything that should affect something as low-level as a mouse click.  Most of the code for the right-click menu is in ptk-file-menu.c and my changes are always marked with "//MOD".  Most of them just add and remove menu items.

I suspect what you're dealing with is a GTK bug, and some difference since 1.1.0 is triggering that bug for you.  For example, one user reported that when he had two pcmanfm-mod windows open and drag/dropped a file from one to the other, he had to click twice on the target to get it to open.  But the problem disappeared when he changed his GTK theme.

One possible trigger might be the code introduced in 1.1.1 in ptk-file-menu.c which checks the clipboard contents and makes some menu items insensitive based on the result (gtk_clipboard_wait_is_target_available and gtk_widget_set_sensitive line 420).  But that change doesn't directly affect the Open With menu, and certainly shouldn't do what you describe.  But it may be triggering a gtk bug in combination with your theme, for example, although I don't find any bugs filed that match your description.

You might be able to narrow the cause down by comparing different versions of ptk-file-menu.c and removing some of my changes one at a time.  Also note that the contents of your clipboard may affect the problem.  That might tell you what function call is triggering the problem.  You could then avoid that code.  It's not something I can do here because I can't reproduce it.  But if you do find the trigger for the problem I would suggest filing a bug report with GTK, and also let me know.

Specifically, you can find this section in src/ptk/ptk-file-menu.c (version 1.2.0 line 418):

    // clipboard contents valid for paste?    //MOD added
    GtkClipboard * clip = gtk_clipboard_get( GDK_SELECTION_CLIPBOARD );
    if ( ! gtk_clipboard_wait_is_target_available ( clip,
                gdk_atom_intern( "x-special/gnome-copied-files", FALSE ) ) &&
         ! gtk_clipboard_wait_is_target_available ( clip,
                    gdk_atom_intern( "text/uri-list", FALSE ) ) )
    {
        gtk_widget_set_sensitive( paste, FALSE );
        gtk_widget_set_sensitive( paste_link, FALSE );
        gtk_widget_set_sensitive( paste_target, FALSE );
    }

and disable it:

    // clipboard contents valid for paste?    //MOD added
/*
    GtkClipboard * clip = gtk_clipboard_get( GDK_SELECTION_CLIPBOARD );
    if ( ! gtk_clipboard_wait_is_target_available ( clip,
                gdk_atom_intern( "x-special/gnome-copied-files", FALSE ) ) &&
         ! gtk_clipboard_wait_is_target_available ( clip,
                    gdk_atom_intern( "text/uri-list", FALSE ) ) )
    {
        gtk_widget_set_sensitive( paste, FALSE );
        gtk_widget_set_sensitive( paste_link, FALSE );
        gtk_widget_set_sensitive( paste_target, FALSE );
    }
*/

All that code does is make the paste menu items insensitive if the clipboard contents don't support pasting, so there is no harm in using it with that code disabled - a paste with the wrong clipboards contents is ignored anyway.  It's just a cosmetic issue.


Check out my blog for software, news and tips... http://igurublog.wordpress.com

Offline

#99 2011-01-15 00:29:32

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: PCManFM Mod - User-Definable Functions

I give up sad  I'll live with this minor bug for now smile

Offline

#100 2011-01-15 01:05:15

Korrode
Member
From: Australia
Registered: 2009-11-02
Posts: 110

Re: PCManFM Mod - User-Definable Functions

hmmm considering your recent bugfixes/features address some probs with PCManFM 0.5.2 that have annoyed me for a while, I think you just got a new user.

Thanks IgnorantGuru.


xfce | compiz | gmrun | urxvt | chromium | geany | aqualung | vlc | geeqie

Offline

Board footer

Powered by FluxBB