You are not logged in.

#1876 2014-06-08 11:12:16

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

Re: Ranger, a textbased filemanager

PieterGen wrote:

From time to time ranger takes 100% of my CPU and starts frying my laptop. The issue has been mentioned before in this thread, I could not find a solution.

Case:
- I open ranger from the terminal (LXTerm, using the Openbox wm)
- I do some light work. in this case; copy a few small files from a USB stick to the hard disk
- sometimes I close ranger properly (q), sometimes i just close the terminal with the mouse. I think i did that
- actually, I had closed all  terminals, and (as a consequence) no ranger running...... That is......

- a few minutes later my fan starts to howl. htop shows one process that takes 99 or 100% CPU time.  I didn't write down the exact name (sorry), but it was some python process started by ranger
- the process refuses to be killed from htop.
- I have to either reboot, or sudo killall -9 thatbitch

Any hints on what may be going on? How do I prevent this bad behaviour? Thanks! 

For the record: my system is up to date.

maybe you have the name of the process in your bash history? (after the "killall -9 ...") Can you tell me what it is?
I don't really know where I would start to debug. Your best bet is to file a bug report and close ranger with q until this is fixed, which won't happen as long as the weather is this nice smile


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

Offline

#1877 2014-06-10 09:07:03

PieterGen
Member
From: Groningen, NL, EU
Registered: 2012-01-18
Posts: 59

Re: Ranger, a textbased filemanager

Thank you Hut,  of course you are right regarding the need for a *proper* bug report! I forgot the name, it was a python process....Will report later properly.....


......but only if and when the weather gets  bad  :-)      Looking at our locations, we are in the same weather zone.  Exceptionally warm & sunny weather for June, enjoy it   :-)

Offline

#1878 2014-06-10 14:34:57

spupy
Member
Registered: 2009-08-12
Posts: 218

Re: Ranger, a textbased filemanager

Hi, I found that ranger starts very slow on my system. After typing "ranger" in terminal I'm looking at 2 seconds of no response, then ranger pops up and loads the directory.  This happens both with ranger from the main repo as well ranger-git and ranger-python2-git from AUR. 
I opened a python2 console, typed "import ranger". When I type "ranger.main()" for the first time, I see the same 2 seconds of no response followed by start up. However, following runs of "ranger.main()" are almost instant. The same doesn't happen in the terminal, though - re-running ranger always has a ~2s delay before starting. 

My machine is a slow netbook (1.6Ghz Atom, 2GB RAM), but other people say the application is pretty fast to start on their crappy hardware. 

Do you have some ideas how I can continue debugging this issue?


There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.

Offline

#1879 2014-06-25 10:04:03

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Ranger, a textbased filemanager

Hello,

I'm happy user of ranger and I'm also using i3-wm. I'd like to have a option to "open this on specific workspace". Does anyone has any experiences with this?

For example, I'd like to have a choice when I press "R" to open image on workspace 2.

I have this in .config/ranger/rifle.rc

mime ^image, has i3, X, flag f =  i3-msg  'workspace 2:work; exec /usr/bin/gpicview' -- "$@"

now, when I press "R", I can see this option, but when I choose it, it opens gpicview but on current workspace and it throws an error that this file can't be open. This is because it gets only it's path with filename without extension.

For future, I'd like to just press some key, then insert number of workspace on which to open this file, it will be opened with the first option (the default app for given mime type).

Last edited by Kotrfa (2014-06-25 10:53:09)

Offline

#1880 2014-07-10 18:16:14

CoolestArchBro
Member
Registered: 2014-04-13
Posts: 4

Re: Ranger, a textbased filemanager

On my laptop, ranger also sometimes starts to eat 100% CPU. I tried reproducing the issue and narrowing it down, but so far I wasn't able to find what triggers this madness.

Offline

#1881 2014-07-14 20:04:18

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: Ranger, a textbased filemanager

Is there a way to evaluate shell commands within a ranger command or alternatively send a command to an existing ranger instance from the shell? For example if I wanted to do something like this in the ranger commandline:

:cd $(evaluate some shell command)

I know that doesn't work, so I'm using :shell right now. For example, I'd like to have a ranger binding that will cd to the most recently updated (files modified within) subdirectory of a particular directory. I have a binding to execute a script that gives this most recent dir with ranger's shell command. I've made it so that the script just opens the directory in a new ranger instance (using ranger --choosedir=...) on top of the current one (which works at least but isn't exactly what I want). I don't think there's a way to do this for the current ranger instance though (which would be nice). Using fzf with ranger might be interesting as well.

I thought maybe the chain command might be able to do this because the brackets make it seem as if command 1 is acting on command 2:

chain command1[; command2[; command3...]]

Testing this (and from the name) it seems the commands are just executed separately in order. Is there a way to have ranger's cd command work on the output of ranger's shell command or is that just not possible currently?

Offline

#1882 2014-07-15 13:17:58

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Ranger, a textbased filemanager

I'd like to ask about an FR which was discussed somewhere around page 30-32. Is there possibility to run specific command as root? It would be really handy when I need to edit some files in vim which needs sudo privilegies (for example in /etc). Or when I need to paste some files inside system directories (like downloaded images to /var/www/...). Thank you

Offline

#1883 2014-07-15 13:36:08

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Ranger, a textbased filemanager

I don't know about pasting files, but you can edit files as root in vim using sudo with the :shell command:

# Edit the currently highlighted file:

sudo vim %f

# Edit multiple selected files:

sudo vim %s

Offline

#1884 2014-07-15 18:03:20

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: Ranger, a textbased filemanager

ANOKNUSA wrote:

I don't know about pasting files, but you can edit files as root in vim using sudo with the :shell command:

# Edit the currently highlighted file:

sudo vim %f

# Edit multiple selected files:

sudo vim %s

I'm pretty sure it should work with everything. Sudo works with mv. A key could be mapped to something like this:

console shell sudo mv %f 

Then you could just specify the path to move the file to (I don't know about using sudo with ranger's copy or cut commands). I personally don't like running vim with sudo. You can also do the following in vim:

:w !sudo tee %

Tpope's vim-eunuch also gives the SudoWrite and SudoEdit commands as well as a Move command that will move the file on disk and rename the buffer in vim.

Last edited by angelic_sedition (2014-07-15 18:04:28)

Offline

#1885 2014-07-16 19:39:47

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Ranger, a textbased filemanager

Thank you for advices.

Edit: Hut's solution below is great! Thank you

Last edited by Kotrfa (2014-07-17 19:21:52)

Offline

#1886 2014-07-17 15:38:36

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

Re: Ranger, a textbased filemanager

To open a file as root: type "r" to open the "open with" console, then type another "r" to open it using the r-flag (see "man rifle"), then press enter.


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

Offline

#1887 2014-08-19 21:01:02

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: Ranger, a textbased filemanager

I discovered ranger and rifle yesterday and love them! I have a small bug to report though, I hope posting this here is fine:
I installed ranger 1.6.1-2 from community and it doesn't seem to pick up vim as $EDITOR. I export EDITOR with ~/.bashrc and rifle called from command line selects vim when I point it to a shell script. Ranger starts nano though. When I press "r" in ranger, nano is also the program started as option 0.

Replacing "$EDITOR" with vim in .config/ranger/rifle.conf works, though...


Haven't been here in a while. Still rocking Arch. smile

Offline

#1888 2014-08-22 15:24:53

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

Re: Ranger, a textbased filemanager

Sigi wrote:

I discovered ranger and rifle yesterday and love them! I have a small bug to report though, I hope posting this here is fine:
I installed ranger 1.6.1-2 from community and it doesn't seem to pick up vim as $EDITOR. I export EDITOR with ~/.bashrc and rifle called from command line selects vim when I point it to a shell script. Ranger starts nano though. When I press "r" in ranger, nano is also the program started as option 0.

Replacing "$EDITOR" with vim in .config/ranger/rifle.conf works, though...

Works for me perfectly... Try typing "!echo $EDITOR; read" in ranger. If the output is not vim, maybe you are exporting it wrong? If all fails, try running "EDITOR=vim ranger"


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

Offline

#1889 2014-08-24 20:16:27

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: Ranger, a textbased filemanager

Works for me perfectly... Try typing "!echo $EDITOR; read" in ranger. If the output is not vim, maybe you are exporting it wrong? If all fails, try running "EDITOR=vim ranger"

You're right, something with the export wasn't correct. I open ranger through a keybinding in xmonad and somehow that didn't export the EDITOR... Strange. Using this line in the xmonad.hs helps:

    , ((win,                xK_e     ), spawn "env EDITOR=vim urxvt -e ranger")

Thanks hut!


Haven't been here in a while. Still rocking Arch. smile

Offline

#1890 2014-09-01 19:41:04

MangoBaobab
Member
Registered: 2013-03-25
Posts: 7

Re: Ranger, a textbased filemanager

Dear,
How to have a fixed columns instead of floating ones?
Regards,
Mango

Offline

#1891 2014-09-11 11:59:29

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

Re: Ranger, a textbased filemanager

MangoBaobab wrote:

Dear,
How to have a fixed columns instead of floating ones?
Regards,
Mango

Perhaps you want to disable the "collapse_preview" setting. Add the line

set collapse_preview true

to your ~/.config/ranger/rc.conf. That way, when you move from a directory/file with a preview to one without a preview, the size of columns doesn't change.


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

Offline

#1892 2014-09-18 16:10:56

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Ranger, a textbased filemanager

I wonder, has anyone tried to write a Ranger command to send marked files via email?


Fear me! I have root! Sometimes...

Offline

#1893 2014-09-18 17:01:01

loop
Member
Registered: 2011-05-06
Posts: 58

Re: Ranger, a textbased filemanager

You can do it with mutt: https://stackoverflow.com/questions/173 … mmand-line
Each file must be prepend with '-a' option, so you may wrap it into a script or write own ranger command.

Offline

#1894 2014-09-21 08:50:42

fukin_jim
Member
Registered: 2013-02-27
Posts: 20

Re: Ranger, a textbased filemanager

mkaito wrote:

I wonder, has anyone tried to write a Ranger command to send marked files via email?

I just added the following binding in rc.conf and it works like a charm:
map <F5> shell mutt -a %s

Offline

#1895 2014-09-28 18:03:44

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

Re: Ranger, a textbased filemanager

Hey people, there's a ranger IRC channel on freenode now:

Server: chat.freenode.net
Channel: #ranger
Server info: https://freenode.net/irc_servers.shtml


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

Offline

#1896 2014-09-30 15:52:29

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Ranger, a textbased filemanager

Time to add it to my list of idling places


Fear me! I have root! Sometimes...

Offline

#1897 2014-10-28 20:49:42

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: Ranger, a textbased filemanager

anyway using the latest termite and have the image preview working?

Offline

#1898 2014-10-28 21:32:03

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: Ranger, a textbased filemanager

3xOSC wrote:

anyway using the latest termite and have the image preview working?

I just realized that it's not working for me anymore either.  It may have something to do with true transparency being added back? Even with the alpha channel set to no transparency, it doesn't work though.

Offline

#1899 2014-10-29 11:45:29

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: Ranger, a textbased filemanager

ah, so i'm not the only one. 

i ran a pacaur -Syua --devel yesterday  (sighhhhh)  and it hasn't been working. 

i suppose we wait and/or bring it up on thestinger/termite?

EDIT: gonna play around with it tonight and if i get anywhere i'll let you know

Last edited by 3xOSC (2014-10-29 11:47:53)

Offline

#1900 2014-11-02 06:55:14

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: Ranger, a textbased filemanager

3xOSC wrote:

ah, so i'm not the only one. 

i ran a pacaur -Syua --devel yesterday  (sighhhhh)  and it hasn't been working. 

i suppose we wait and/or bring it up on thestinger/termite?

EDIT: gonna play around with it tonight and if i get anywhere i'll let you know

I tested to make sure it was the true transparency commit that made it stop working and made an issue. I loved it before, but now I realize just how useful image preview is and miss it.

Last edited by angelic_sedition (2014-11-02 06:55:54)

Offline

Board footer

Powered by FluxBB