You are not logged in.

#851 2011-02-27 17:46:52

satvikc
Member
Registered: 2011-02-27
Posts: 4

Re: Ranger, a textbased filemanager

Hey , Is there some kind of bug , ranger has developed due to python 3.2 update. I am not able to open files. It gives error bad file descriptor. and I have to use :open_with  again and again.

[EDIT] Sorry , it is already reported above. I think I should use python2 version. Thanks.

Last edited by satvikc (2011-02-27 17:49:50)

Offline

#852 2011-02-27 21:28:11

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: Ranger, a textbased filemanager

I'm getting an [Errno 9] whenever I'm trying to open movie files.

Offline

#853 2011-02-27 21:44:18

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: Ranger, a textbased filemanager

nvm.

Offline

#854 2011-03-02 16:45:39

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

The problem with mplayer + python3.2 should be fixed now. (in ranger-git at least.)

Last edited by hut (2011-03-02 16:47:56)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#855 2011-03-02 16:50:18

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Ranger, a textbased filemanager

I don't know whether this has been discussed before but how can i replace open with mplayer to open with vlc by default. I have both the pkgs installed but use mplayer only as fallback.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#856 2011-03-02 16:53:08

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

skodabenz wrote:

I don't know whether this has been discussed before but how can i replace open with mplayer to open with vlc by default. I have both the pkgs installed but use mplayer only as fallback.

hmm... try ranger --copy-config=apps and have a look at ~/.config/ranger/apps.py


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#857 2011-03-02 18:10:03

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Ranger, a textbased filemanager

hut wrote:
skodabenz wrote:

I don't know whether this has been discussed before but how can i replace open with mplayer to open with vlc by default. I have both the pkgs installed but use mplayer only as fallback.

hmm... try ranger --copy-config=apps and have a look at ~/.config/ranger/apps.py

Thanks. That helped. I reordered to have vlc (specifically nvlc) before mplayer in line 95 of ~/.config/ranger/apps.py . Thanks for this wonderful file manager. Very useful when X11 is broken.

return self.either(c, 'vlc', 'mplayer', 'smplayer', 'totem') 

My new forum user/nick name is "the.ridikulus.rat" .

Offline

#858 2011-03-02 18:39:12

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

skodabenz wrote:

Thanks for this wonderful file manager. Very useful when X11 is broken.

I fixed that for you. smile


ᶘ ᵒᴥᵒᶅ

Offline

#859 2011-03-02 19:39:55

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:
skodabenz wrote:

Thanks for this wonderful file manager. Very useful when X11 is broken.

I fixed that for you. smile

Just some further polishing.


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#860 2011-03-02 21:11:07

orlandu63
Member
Registered: 2010-03-29
Posts: 29

Re: Ranger, a textbased filemanager

Miblo wrote:
litemotiv wrote:
skodabenz wrote:

Thanks for this wonderful file manager. Very useful when X11 is broken.

I fixed that for you. smile

Just some further polishing.

Pedantry. tongue

Offline

#861 2011-03-02 21:30:58

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: Ranger, a textbased filemanager

orlandu63 wrote:
Miblo wrote:
litemotiv wrote:

I fixed that for you. smile

Just some further polishing.

Pedantry. tongue

Haha, beautiful! You can't beat a bit of collectively refined appreciation.


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#862 2011-03-02 22:46:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Ranger, a textbased filemanager

Miblo wrote:
orlandu63 wrote:
Miblo wrote:

Just some further polishing.

Pedantry. tongue

Haha, beautiful! You can't beat a bit of collectively refined appreciation.

Mostly because you can't catch it fast enough.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#863 2011-03-04 23:19:57

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Ranger, a textbased filemanager

@hut, have you had the time to look into https://bbs.archlinux.org/viewtopic.php … 63#p872563 https://bbs.archlinux.org/viewtopic.php … 49#p874949 ? It's still there. I use ranger with python2.

Last edited by Army (2011-03-04 23:20:54)

Offline

#864 2011-03-05 14:05:04

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

I'm getting a "failed to run" for all applications that have the d flag for running detached. Did I miss some changes for the apps.py? I'm using ranger 1.4.1-2

running with python2 won't work at all (no module named ranger)

Last edited by golwin (2011-03-05 14:42:46)


arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee

Offline

#865 2011-03-05 15:09:08

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Ranger, a textbased filemanager

You forgot to update your apps.py! Make sure the first line is "import ranger". Looks like your whole apps.py needs to be updated, maybe you should run something like

vimdiff ~/.config/ranger/apps.py /usr/lib/python2.7/site-packages/ranger/defaults/apps.py

(adjust your python version)

Last edited by Army (2011-03-05 15:10:49)

Offline

#866 2011-03-05 15:40:33

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

Oh trivial mistake concerning python2. All the ranger stuff was just in /python3.2. So now it works fine with python2, but the problem with the detached application in python3.2 still persists. I compared the two apps.py, but that didn't help.


arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee

Offline

#867 2011-03-05 16:50:35

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

golwin wrote:

Oh trivial mistake concerning python2. All the ranger stuff was just in /python3.2. So now it works fine with python2, but the problem with the detached application in python3.2 still persists. I compared the two apps.py, but that didn't help.

It is fixed in ranger-git but not yet in "ranger".
I'll make a new version, stay tuned

Army wrote:

@hut, have you had the time to look into https://bbs.archlinux.org/viewtopic.php … 63#p872563 https://bbs.archlinux.org/viewtopic.php … 49#p874949 ? It's still there. I use ranger with python2.

Yeah but I didn't come to a solution yet..


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#868 2011-03-06 20:20:32

konlaasz
Member
Registered: 2011-02-22
Posts: 1

Re: Ranger, a textbased filemanager

Thanks for this very fine file manager!

Here's a tiny patch for apps.py ('flags='d'' is set again further down for evince; evince also supports djvu (and ps/ps.gz, too)):

--- /usr/lib/python3.2/site-packages/ranger/defaults/apps.py    2011-03-06 21:11:09.000000000 +0200
+++ /tmp/apps.py    2011-03-06 21:20:48.156668915 +0200
@@ -65,8 +65,9 @@
 
         if f.extension is not None:
             if f.extension in ('pdf', ):
-                c.flags += 'd'
                 return self.either(c, 'evince', 'zathura', 'apvlv')
+            if f.extension in ('djvu', ):
+                return self.either(c, 'evince')
             if f.extension in ('xml', ):
                 return self.either(c, 'editor')
             if f.extension in ('html', 'htm', 'xhtml'):

when running 'source ranger ranger', I get 'bash: $'\177:': command not found'. I'm not entirely sure that this is caused by something in ranger, but perhaps it is?

Offline

#869 2011-03-08 02:52:29

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

konlaasz wrote:

Thanks for this very fine file manager!

Here's a tiny patch for apps.py ('flags='d'' is set again further down for evince; evince also supports djvu (and ps/ps.gz, too)):

--- /usr/lib/python3.2/site-packages/ranger/defaults/apps.py    2011-03-06 21:11:09.000000000 +0200
+++ /tmp/apps.py    2011-03-06 21:20:48.156668915 +0200
@@ -65,8 +65,9 @@
 
         if f.extension is not None:
             if f.extension in ('pdf', ):
-                c.flags += 'd'
                 return self.either(c, 'evince', 'zathura', 'apvlv')
+            if f.extension in ('djvu', ):
+                return self.either(c, 'evince')
             if f.extension in ('xml', ):
                 return self.either(c, 'editor')
             if f.extension in ('html', 'htm', 'xhtml'):

when running 'source ranger ranger', I get 'bash: $'\177:': command not found'. I'm not entirely sure that this is caused by something in ranger, but perhaps it is?

Thanks for the patch. Guys, give me more of these! smile

I have no idea about the bug though... makes no sense to me sad
Check the readme for an alternative to "source ranger ranger"


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#870 2011-03-10 19:36:17

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Ranger, a textbased filemanager

Loving this file manager! Thanks for the excellent work hut!

Added two useful commands for compressing/extracting archives to the Ranger wiki. Don't know if it is the best place to put it but feel free to add them to the default commands if you find it appropriate!

Offline

#871 2011-03-10 20:11:50

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: Ranger, a textbased filemanager

Revolt wrote:

Loving this file manager! Thanks for the excellent work hut!

Added two useful commands for compressing/extracting archives to the Ranger wiki. Don't know if it is the best place to put it but feel free to add them to the default commands if you find it appropriate!

there is already a command for extracting

:open_with aunpack 1

you only need atool

Offline

#872 2011-03-10 20:49:00

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Ranger, a textbased filemanager

Compare that with my setup:

Want to extract 4 archives. yy all of them, go to the destination directory and type 'px' which in turn calls ":extract_here" thus extracting all archives to that directory.

Or marking some files in a directory and typing 'pc' to write ':compress ' to the console and allowing automatic filename suggestion.

Last edited by Revolt (2011-03-10 20:49:36)

Offline

#873 2011-03-10 22:11:00

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: Ranger, a textbased filemanager

Revolt wrote:

Compare that with my setup:

Want to extract 4 archives. yy all of them, go to the destination directory and type 'px' which in turn calls ":extract_here" thus extracting all archives to that directory.

Or marking some files in a directory and typing 'pc' to write ':compress ' to the console and allowing automatic filename suggestion.

Really interesting!

Can you share this trick? smile

Offline

#874 2011-03-10 22:27:42

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Ranger, a textbased filemanager

As I said I added it to the wiki wink

https://wiki.archlinux.org/index.php/Ra … l_commands

EDIT: Found a bug but am afraid to submit a patch lest I break something. To my understanding, python handles unicode/utf8 strings internally. Why did you find the need to create ranger/ext/widestring? Because it seems to be reporting wrong string sizes when non-ascii characters appear on the string.

Problem: When I navigate to ~/University/2-2/Lógica de Programação/ and have 3 tabs open, their numbers get pushed away of the bar and disappear.

Solution: Tried replacing uwid to len in line 141 and everything works as expected and the tab numbers are back. Thought of submitting a patch to replace all uwid by len and remove the widestring file but I guess you should have solid reason to write it in the first place.

Last edited by Revolt (2011-03-11 20:23:02)

Offline

#875 2011-03-12 11:47:44

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Revolt wrote:

As I said I added it to the wiki wink

https://wiki.archlinux.org/index.php/Ra … l_commands

EDIT: Found a bug but am afraid to submit a patch lest I break something. To my understanding, python handles unicode/utf8 strings internally. Why did you find the need to create ranger/ext/widestring? Because it seems to be reporting wrong string sizes when non-ascii characters appear on the string.

Problem: When I navigate to ~/University/2-2/Lógica de Programação/ and have 3 tabs open, their numbers get pushed away of the bar and disappear.

Solution: Tried replacing uwid to len in line 141 and everything works as expected and the tab numbers are back. Thought of submitting a patch to replace all uwid by len and remove the widestring file but I guess you should have solid reason to write it in the first place.

Well the thing is: width is something else than length. Afaik len() counts the number of characters in python3 and the number of bytes in python2. What I really need though is the width of the string, with wide chars (kanji etc) taken into consideration, which is the function of uwid(). This seems to work with python3.1 (on my machine) but fails with python3.2 for some reason


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

Board footer

Powered by FluxBB