[SOLVED] tmux conflicting with Ranger previewing images

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

[SOLVED] tmux conflicting with Ranger previewing images

Unread post by lrcaballero » Wed Aug 13, 2014 4:48 am

Hello Holly Grillers,

I nedd your help if you would please...

So now that I am enjoying my Chili_dwm install and have it set up to my need and liking I am experiencing some dificulties with tmux conflicting with Ranger and previewing images. So here's the list of things I have done so far (thanks to alad BTW for his great help in the LinuxBBQ IRC channel)

1) Install w3m & w3m-img

2)

Code: Select all

$ ranger --copy-configure=all
3) Edit my ~/.config/ranger/rc.conf and set preview_images true

4) and for the sake of it I updated my system....

At first it worked but then rebooted my system and gone!!!

I tried uninstalling tmux: and boy did I ended up pulling my hair there for a minute, I couldn't get a terminal opened in any way, until I manage to reboot and opened up tty4 installed tmux again and I was back in business with urxvt and x-term.

Is there a way of uninstalling tmux with-out leaving any dependencies towards urxvt or x-term?

Any thoughts? All guidance towards a possible solution is highly appreciated.....

Cheers,
Last edited by wuxmedia on Thu Aug 14, 2014 6:51 am, edited 2 times in total.
Reason: Typo in the title made me wince :)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tmux conflicting with Ranger previeing images

Unread post by machinebacon » Wed Aug 13, 2014 8:26 am

Just check what keybinding opens which terminal emulator.

For example, in xbindkeysrc (or dwm's config.h) you should point something like

Alt-Enter
x-terminal-emulator

and not to tmux (if it is not installed)

There is no dependency of tmux on any terminal emulator or vice versa.

What is the question about ranger? Is

# enable w3mimgviewer
set preview_images true

put in .config/ranger/rc.conf? Probably not, because you created a full new ranger config with the ranger --copy-configure=all command.
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: tmux conflicting with Ranger previeing images

Unread post by dkeg » Wed Aug 13, 2014 11:11 am

IIRC there is a known conflict with tmux and ranger displaying images. Ah yes, from their website
Note: previewing images in "true color" is disabled by default. To enable it, first make sure you have w3m installed, then check that your terminal supports it. It was successfully tested with urxvt and xterm, while it did not work with gnome-terminal and st. Currently it does not work with tmux but with screen...

Work hard; Complain less

User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

Re: tmux conflicting with Ranger previeing images

Unread post by lrcaballero » Wed Aug 13, 2014 4:42 pm

Thank you guys so much for such prompt replies...

So apparently tmux is install by default in Chili along with x-term, how do i know this? (please correct me if I am wrong!) but in dwm any app open will display in your dwm bar (in my case top) tmux on the other hand when running it also displays a status bar with date and time and instances running on the bottom, see photo here: http://lrcaballero.deviantart.com/art/C ... -473337190 ..pay attention to dwm bar (top) and my x-terminal in the middle of the screen, you will see tmux status bar on the bottom of x-term, I think this is where the conflict starts and the reason why ranger is not displaying images when navigating images through ranger (Note: if I click enter on any giving image it will display it via Feh) I want it to be display inside ranger.

Per ^dekeg in his replied and http://ranger.nongnu.org/ if tmux is present than the previewing of images is null if I am understanding correctly. And so this is where I am stuck....I hope this clarify things a bit further....BTW I am running both x-terminal and urxvt in Chili dwm 64bit.

Thanks again for ALL of you feedback and help!

Cheers,

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: tmux conflicting with Ranger previeing images

Unread post by wuxmedia » Wed Aug 13, 2014 5:59 pm

not too clear...
I think what you are saying is that tmux starts whenever a terminal window opens.
to stop this behaviour:
First - backup your file; a simple

Code: Select all

cp ~/.bashrc ~/.bashrc.bak
will do the trick (just in case you mess it up)
Then open the file

Code: Select all

.bashrc
(in your home dir) using your favorite text editor - leaf/mousepad for GUI or vim/emacs/nano in the CLI
you should see a bunch of tmux code near the bottom - comment (place a '#' in front of those lines) or simply remove them.
save your file, try opening a new term window, if it doesn't do it right away you may need to

Code: Select all

source ~/.bashrc
if it isn't in that file - it could be in some others - but let us know how you get on with that.
If you are unsure - paste the whole file (in code tags) here.

I know bacon used that cool auto tmux in a quite a few releases.
Probably why you couldn't open a term once you'd disabled it.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

Re: tmux conflicting with Ranger previeing images

Unread post by lrcaballero » Wed Aug 13, 2014 8:00 pm

^wuxmedia Thank you!

To no longer complicate things and mislead all you grillers, I will try wuxmedia's approach and will let you know the results at a later time (hopefully tonight)...but maybe this link: https://bbs.archlinux.org/viewtopic.php?pid=1230451will help me clarify things to ALL of you wonderful and highly knowledgeable people.

Once again Thank you ALL for your wonderful feedback.

Cheers

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tmux conflicting with Ranger previeing images

Unread post by machinebacon » Thu Aug 14, 2014 3:46 am

I understand now.

tmux does not display *any* images from w3m, no matter how we twist it. That's fact and I think it never worked before. It only works for true terminals, and tmux is not.

About tmux opening as standard: it is in the .xbindkeysrc
Tmux cannot be set as x-terminal-emulator. It only works for true terminals, and tmux is not.

So please check your .xbindkeysrc file, and also you config.h for dwm, and check that it opens x-terminal-emulator, and not tmux.
..gnutella..

User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

Re: SOLVED!!!tmux conflicting with Ranger previeing images

Unread post by lrcaballero » Thu Aug 14, 2014 5:46 am

YES! YES! & f$%#@ YES!

So I followed wuxmedia's approached and edited my ~/.bashrc file by commenting out these lines:

Code: Select all

# If not running interactively, don't do anything
#[[ $- != *i* ]] && return
#[[ -z "$TMUX" ]] && exec tmux
Ctrl X | Yes to save and mistery solved......Beard points for ALL of those that helped! THANK YOU!

Image

Image

Image

See the difference from my initial post and now? Nice!!!! ha?

Cheers

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: [SOLVED] tmux conflicting with Ranger previeing images

Unread post by wuxmedia » Thu Aug 14, 2014 6:50 am

^ Glad you got it sorted.
Reading between the lines is a skill I picked up at work, added to the fact you totally ignored bacons suggestions to look at the bindkeys. 8)
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: [SOLVED] tmux conflicting with Ranger previewing images

Unread post by machinebacon » Thu Aug 14, 2014 7:31 am

moved from Upgrade Warnings to Support Section
..gnutella..

User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

Re: [SOLVED] tmux conflicting with Ranger previeing images

Unread post by lrcaballero » Thu Aug 14, 2014 5:12 pm

^ Thank you! Sir Bacon...

Cheers
Last edited by lrcaballero on Thu Aug 14, 2014 8:36 pm, edited 1 time in total.

User avatar
lrcaballero
Window Manager
Posts: 62
Joined: Sun Nov 10, 2013 6:02 am
Location: /home/California

Re: [SOLVED] tmux conflicting with Ranger previeing images

Unread post by lrcaballero » Thu Aug 14, 2014 8:35 pm

wuxmedia wrote:^added to the fact you totally ignored bacons suggestions to look at the bindkeys. 8)
^ Thank you wuxmedia for ALL of your help...I apologies if I might of given the impression that I ignored Sir Bacon's suggestion...but I am fairly new to dwm and also I am definitely not as experienced as most of you here at the grill (for now!) but when I grow up I want to be like you grillers...thats for sure. Feeling more comfortable with the ~/.bashrc file I followed your advice and I am very HAPPY that I did.

I have GREAT respect for ALL of you grillers and I thank you for your help and support!

Cheers

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: [SOLVED] tmux conflicting with Ranger previewing images

Unread post by wuxmedia » Thu Aug 14, 2014 9:09 pm

takes a while to get to know where every file is, and what order it runs, what it controls.
i'm currently bashing my head against SSH keys - which should be piss easy. so, you know... just keep plugging away.
you might wanna read as much as you can, our wiki is an excellent place to get you going 8)
"Seek, and Ye shall find"
"Github | Chooons | Site"

Post Reply