You are not logged in.

#751 2010-12-30 21:54:29

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

Re: Ranger, a textbased filemanager

I have a little problem (again..)
My /.config/ranger/keys.py looks like this

% cat .config/ranger/keys.py
from ranger.api.keys import *
map = keymanager.get_context('browser')
map('F', fm.open_console('shell -p find . | grep '))
map('DEL', fm.execute_console('shell -d rm -rf %s'))

This last line, DEL, works like a charm with a freshly started ranger. But after a while of usage, it stops working. Instead of deleting files, ranger show the following output

'NoneType' object has no attribute 'path'

What does that mean? Where does this come from? I greped through the ranger sources, but couldn't find this line, so it comes from somewhere else. When this message pops up, :delete y still works. What's wrong here?

Offline

#752 2010-12-30 22:17:59

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

Re: Ranger, a textbased filemanager

run ranger with --debug to see the whole traceback


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

Offline

#753 2010-12-31 10:06:14

cap_sensitive
Member
Registered: 2010-04-05
Posts: 35

Re: Ranger, a textbased filemanager

Hi hut,

when I preview files, ranger fails to "refresh" the screen. See the image attached below.
5309350384_24da7a4b42.jpg

Last edited by cap_sensitive (2010-12-31 10:08:51)

Offline

#754 2010-12-31 13:26:55

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

Re: Ranger, a textbased filemanager

cap_sensitive wrote:

Hi hut,

when I preview files, ranger fails to "refresh" the screen. See the image attached below.
5309350384_24da7a4b42.jpg

Thats fixed in ranger-git


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

Offline

#755 2010-12-31 14:30:55

cap_sensitive
Member
Registered: 2010-04-05
Posts: 35

Re: Ranger, a textbased filemanager

Great! thanks.

Offline

#756 2010-12-31 17:23:56

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ranger, a textbased filemanager

Recent install of ranger in community repo.

Please advise reason why "no action found" for flash videos in local files.  Seems to occur with .avi and mpeg as well.

Nicely done system.......


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#757 2011-01-01 03:46:22

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

Re: Ranger, a textbased filemanager

lilsirecho wrote:

Recent install of ranger in community repo.

Please advise reason why "no action found" for flash videos in local files.  Seems to occur with .avi and mpeg as well.

Nicely done system.......

Happy new year.

What video player are you using?


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

Offline

#758 2011-01-01 16:49:05

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ranger, a textbased filemanager

Vlc mostly which normally plays the flash nicely.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#759 2011-01-01 16:58:43

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

Re: Ranger, a textbased filemanager

The program is selected out of a list. For videos, this list is "mplayer or totem". You don't have any program in that list so ranger doesn't know how to open the file.

I'll add vlc to that list for future versions.
You can do it for yourself now by typing "ranger --copy-config=apps" and modifying line 85 of ~/.config/ranger/apps.py

And guys, tell me what else to add! I can't do a complete list for any file type myself.


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

Offline

#760 2011-01-01 17:06:51

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ranger, a textbased filemanager

Clarifying my statements, I report that VLC plays the flash files when opening them through the vlc menu.

I am able to display .jpg files by simply clicking on the file and FEH displays them.

The problem described producing "no action found" occurs when trying to display the flash files by selecting them from the file listing, either by left click or right click.  This differs from normal action in arch which allows a selection of video players when a video file is selected.

It's no biggie since vlc provides the access thru its menu.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#761 2011-01-01 17:07:13

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: Ranger, a textbased filemanager

I was bothered by this problem before. Isn't there a central place (like the registry in Windows *cough* *cough*) where all the applications which can open certain type of file are listed?

It seems logical that this task should be resolved system-wide.

Offline

#762 2011-01-01 17:10:49

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: Ranger, a textbased filemanager

hut wrote:

And guys, tell me what else to add! I can't do a complete list for any file type myself.

you could add openoffice/libreoffice

Offline

#763 2011-01-01 17:20:17

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ranger, a textbased filemanager

Perhaps my description should include that things are different with root than with user.  User gives a smplayer response when the file is selected with the mouse click.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#764 2011-01-01 18:30:55

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

Re: Ranger, a textbased filemanager

lilsirecho wrote:

Clarifying my statements, I report that VLC plays the flash files when opening them through the vlc menu.

I am able to display .jpg files by simply clicking on the file and FEH displays them.

The problem described producing "no action found" occurs when trying to display the flash files by selecting them from the file listing, either by left click or right click.  This differs from normal action in arch which allows a selection of video players when a video file is selected.

It's no biggie since vlc provides the access thru its menu.

You have to understand, ranger doesn't work like other file managers. Do what hut explained above, then you'll quickly see and understand how ranger is configured and how powerfull this approach is (although you need to do a bit more than with other file managers)

Offline

#765 2011-01-02 15:51:45

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

Re: Ranger, a textbased filemanager

silenc3r wrote:
hut wrote:

And guys, tell me what else to add! I can't do a complete list for any file type myself.

you could add openoffice/libreoffice

Actually I was hoping for some code or a list of file extensions or something like that but thanks smile

SoleSoul wrote:

I was bothered by this problem before. Isn't there a central place (like the registry in Windows *cough* *cough*) where all the applications which can open certain type of file are listed?

It seems logical that this task should be resolved system-wide.

There are a bunch of programs that automate the task of running files. Ranger natively supports mimeopen ( http://linux.die.net/man/1/mimeopen ) as a fallback to the builtin mechanism and by reordering 1 line in 1 config file you could use mimeopen for every file.

I developed an alternative program that uses "flags" and "modes" just like ranger: https://github.com/hut/ranger/blob/d35e … s/rifle.py But it also uses python for configuration which has its downsides.

lilsirecho wrote:

Clarifying my statements, I report that VLC plays the flash files when opening them through the vlc menu.

I am able to display .jpg files by simply clicking on the file and FEH displays them.

The problem described producing "no action found" occurs when trying to display the flash files by selecting them from the file listing, either by left click or right click.  This differs from normal action in arch which allows a selection of video players when a video file is selected.

It's no biggie since vlc provides the access thru its menu.

No no, I understand your problem. Ranger just doesn't know about VLC. Add it to the list and everything's fine.
To read more about this topic, start ranger and type either 2? or gR5Gljl

Army wrote:

I have a little problem (again..)
[...]
This last line, DEL, works like a charm with a freshly started ranger. But after a while of usage, it stops working. Instead of deleting files, ranger show the following output

'NoneType' object has no attribute 'path'

What does that mean? Where does this come from? I greped through the ranger sources, but couldn't find this line, so it comes from somewhere else. When this message pops up, :delete y still works. What's wrong here?

Problem resolved yet?
With my reply "run ranger with --debug to see the whole traceback" I implied that I'd like to see the traceback too smile


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

Offline

#766 2011-01-02 19:27:11

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

Re: Ranger, a textbased filemanager

hut wrote:
Army wrote:

I have a little problem (again..)
[...]
This last line, DEL, works like a charm with a freshly started ranger. But after a while of usage, it stops working. Instead of deleting files, ranger show the following output

'NoneType' object has no attribute 'path'

What does that mean? Where does this come from? I greped through the ranger sources, but couldn't find this line, so it comes from somewhere else. When this message pops up, :delete y still works. What's wrong here?

Problem resolved yet?
With my reply "run ranger with --debug to see the whole traceback" I implied that I'd like to see the traceback too smile

Sure big_smile But it hasn't happened yet, so you'll have to wait a little longer. Right now I'm not as much on my laptop as usual because of christmas holiday, which equals family time for me. I'll post my output as soon as I get one, promise.

Offline

#767 2011-01-04 01:14:48

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

Re: Ranger, a textbased filemanager

1.4.1 is out, fixes a few bugs and automatically detects vlc + ooffice.


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

Offline

#768 2011-01-04 02:13:03

Visti
Member
Registered: 2009-09-30
Posts: 13

Re: Ranger, a textbased filemanager

Great, thanks!

Offline

#769 2011-01-04 05:07:01

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ranger, a textbased filemanager

+1 thanks


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#770 2011-01-04 15:49:20

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

Re: Ranger, a textbased filemanager

YESS it finally happened again. I already thought that you accidently fixed it already (which of course would be great wink )
Anyways, here's the output

% ranger --debug
Ranger version: 1.4.0, executed with python 3.1.3
Locale: en_US.UTF8
Current file: /home/army/PHONE CARD/music/karnivool - goliath.mp3
Traceback (most recent call last):
  File "/usr/lib/python3.1/site-packages/ranger/core/main.py", line 85, in main
    fm.loop()
  File "/usr/lib/python3.1/site-packages/ranger/core/fm.py", line 202, in loop
    ui.handle_input()
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 202, in handle_input
    self.handle_key(key)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 161, in handle_key
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 159, in handle_key
    cmd.function(CommandArgs.from_widget(self.fm))
  File "/usr/lib/python3.1/site-packages/ranger/api/keys.py", line 52, in function
    return fnc(*args, **kws)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 89, in execute_console
    self.ui.console.execute()
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 301, in execute
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 299, in execute
    cmd.execute()
  File "/usr/lib/python3.1/site-packages/ranger/defaults/commands.py", line 112, in execute
    command = self.fm.substitute_macros(command)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 92, in substitute_macros
    return _MacroTemplate(string).safe_substitute(self._get_macros())
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 126, in _get_macros
    macros[i + 'f'] = shell_quote(tab_dir.pointed_obj.path)
AttributeError: 'NoneType' object has no attribute 'path'

Offline

#771 2011-01-05 14:54:53

freeman93
Member
Registered: 2011-01-05
Posts: 1

Re: Ranger, a textbased filemanager

Hi,

this looks like a great filemanager. A feature I did not see from reading the docs is the ability to paste using hard links instead of symlinks.

Have I missed it ?

Offline

#772 2011-01-05 15:16:10

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Ranger, a textbased filemanager

hut wrote:

To read more about this topic, start ranger and type either 2? or gR5Gljl

Lol.. are you serious?


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#773 2011-01-05 16:25:40

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

Re: Ranger, a textbased filemanager

Army wrote:

YESS it finally happened again. I already thought that you accidently fixed it already (which of course would be great wink )
Anyways, here's the output

% ranger --debug
Ranger version: 1.4.0, executed with python 3.1.3
Locale: en_US.UTF8
Current file: /home/army/PHONE CARD/music/karnivool - goliath.mp3
Traceback (most recent call last):
  File "/usr/lib/python3.1/site-packages/ranger/core/main.py", line 85, in main
    fm.loop()
  File "/usr/lib/python3.1/site-packages/ranger/core/fm.py", line 202, in loop
    ui.handle_input()
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 202, in handle_input
    self.handle_key(key)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 161, in handle_key
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 159, in handle_key
    cmd.function(CommandArgs.from_widget(self.fm))
  File "/usr/lib/python3.1/site-packages/ranger/api/keys.py", line 52, in function
    return fnc(*args, **kws)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 89, in execute_console
    self.ui.console.execute()
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 301, in execute
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 299, in execute
    cmd.execute()
  File "/usr/lib/python3.1/site-packages/ranger/defaults/commands.py", line 112, in execute
    command = self.fm.substitute_macros(command)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 92, in substitute_macros
    return _MacroTemplate(string).safe_substitute(self._get_macros())
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 126, in _get_macros
    macros[i + 'f'] = shell_quote(tab_dir.pointed_obj.path)
AttributeError: 'NoneType' object has no attribute 'path'

Looks like a deeper problem ;_;. I'll check when I got more time.



freeman93 wrote:

Hi,

this looks like a great filemanager. A feature I did not see from reading the docs is the ability to paste using hard links instead of symlinks.

Have I missed it ?

No such feature, sorry.

Try yanking 1 file with yy and typing !ln %c newname or stuff like that.



Rasi wrote:
hut wrote:

To read more about this topic, start ranger and type either 2? or gR5Gljl

Lol.. are you serious?

I figoured the chance of tfefeIf I said read the doc,


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

Offline

#774 2011-01-05 16:31:16

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

Re: Ranger, a textbased filemanager

Army wrote:

YESS it finally happened again. I already thought that you accidently fixed it already (which of course would be great wink )
Anyways, here's the output

% ranger --debug
Ranger version: 1.4.0, executed with python 3.1.3
Locale: en_US.UTF8
Current file: /home/army/PHONE CARD/music/karnivool - goliath.mp3
Traceback (most recent call last):
  File "/usr/lib/python3.1/site-packages/ranger/core/main.py", line 85, in main
    fm.loop()
  File "/usr/lib/python3.1/site-packages/ranger/core/fm.py", line 202, in loop
    ui.handle_input()
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 202, in handle_input
    self.handle_key(key)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 161, in handle_key
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/ui.py", line 159, in handle_key
    cmd.function(CommandArgs.from_widget(self.fm))
  File "/usr/lib/python3.1/site-packages/ranger/api/keys.py", line 52, in function
    return fnc(*args, **kws)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 89, in execute_console
    self.ui.console.execute()
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 301, in execute
    self.fm.notify(error)
  File "/usr/lib/python3.1/site-packages/ranger/gui/widgets/console.py", line 299, in execute
    cmd.execute()
  File "/usr/lib/python3.1/site-packages/ranger/defaults/commands.py", line 112, in execute
    command = self.fm.substitute_macros(command)
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 92, in substitute_macros
    return _MacroTemplate(string).safe_substitute(self._get_macros())
  File "/usr/lib/python3.1/site-packages/ranger/core/actions.py", line 126, in _get_macros
    macros[i + 'f'] = shell_quote(tab_dir.pointed_obj.path)
AttributeError: 'NoneType' object has no attribute 'path'

Looks like a deeper problem ;_;. I'll check when I got more time.



freeman93 wrote:

Hi,

this looks like a great filemanager. A feature I did not see from reading the docs is the ability to paste using hard links instead of symlinks.

Have I missed it ?

No such feature, sorry.

Try yanking files with yy, changing the directory and typing !ln %c . or stuff like that.
If you use this regularily, you can add a keybinding for that.


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

Offline

#775 2011-01-05 21:08:08

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

Re: Ranger, a textbased filemanager

Hi, this looks like a really interesting project.

I notice that .rtf files open in nano by default, as opposed to OpenOffice/LibreOffice. Just wondering, is this behaviour intentional? It seems counter-intuitive to me but maybe others have good reason for opening RTF files in text editors.

Offline

Board footer

Powered by FluxBB