You are not logged in.

#1 2015-11-10 11:34:21

nogz
Member
Registered: 2015-10-15
Posts: 13

[SOLVED] Urxvt -e not working

urxvt -e [command] doesn't work as expected. It opens a new urxvt window and it closes immediately without executing the command.

I looked at this thread, https://bbs.archlinux.org/viewtopic.php?id=63516 but even the -e bash -c stuff isn't working for me, even after a restart.

What fixed it
When going through my env it was noticed that I was declaring a TERM commenting that out resulted in it working again.

Last edited by nogz (2015-11-10 22:09:17)

Offline

#2 2015-11-10 11:39:20

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

What command exactly are you trying to run?


pkgs │ hacks │ cfg │ blag

Offline

#3 2015-11-10 12:09:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [SOLVED] Urxvt -e not working

You will likely also need the -hold flag, otherwise urxvt is expected to exit as soon as the program is complete.  So something like htop would not need a -hold flag, but ls would.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2015-11-10 14:03:52

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

I'm trying to use it for mutt, ncmpcpp, htop, and a couple other persistent CLI apps.

Offline

#5 2015-11-10 14:11:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [SOLVED] Urxvt -e not working

ayekat wrote:

What command exactly are you trying to run?

Emphasis added.

Additionally, please provide any error messages you get from attempting the command from a terminal emulator.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2015-11-10 18:15:54

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

urxvt -e mutt 

No error output it just opens then closes immediately.

Offline

#7 2015-11-10 18:58:41

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,422
Website

Re: [SOLVED] Urxvt -e not working

Trilby wrote:

You will likely also need the -hold flag, otherwise urxvt is expected to exit as soon as the program is complete.  So something like htop would not need a -hold flag, but ls would.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#8 2015-11-10 19:26:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [SOLVED] Urxvt -e not working

-hold should not be needed for mutt, but it would help to see if there were error messages in the urxvt terminal.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2015-11-10 19:31:26

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

If you run just

urxvt

does the window remain?

Then, what about this?

urxvt -e /usr/bin/mutt

pkgs │ hacks │ cfg │ blag

Offline

#10 2015-11-10 20:56:58

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

running urxvt by itself opens a new terminal.

urxvt -e /usr/bin/mutt does the same thing.

urxvt -hold -e mutt, and urxvt -hold -e mutt both close immediately.

xterm -e mutt and other commands works, termite -e and other commands works.

Offline

#11 2015-11-10 21:02:05

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

nogz wrote:

running urxvt by itself opens a new terminal.

urxvt -e /usr/bin/mutt does the same thing.

Does that mean it opens a new terminal that is empty? Or with an ordinary shell (with the bash/zsh/whatever prompt)?


pkgs │ hacks │ cfg │ blag

Offline

#12 2015-11-10 21:15:52

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

ordinary shell with zsh

Last edited by nogz (2015-11-10 21:26:56)

Offline

#13 2015-11-10 21:23:58

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

That is... pretty weird TBH.

I would have thought that a difference in behaviour between putting a full path and just a command would indicate a problem with the PATH variable... but if /usr/bin/mutt runs a shell, something is clearly wrong.

Are you able to run mutt regularly?


pkgs │ hacks │ cfg │ blag

Offline

#14 2015-11-10 21:24:05

c0mm0ner
Member
Registered: 2015-11-09
Posts: 93

Re: [SOLVED] Urxvt -e not working

Where are you executing your commands? In a terminal, in dmenu, via a script, a menu item, whatever?

Offline

#15 2015-11-10 21:29:33

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

@ c0mm0ner - Initially I was trying to use run or rise in Awesome WM, however I noticed none of the terminal shortcuts. IE mutt, ncmpcpp, weechat, etc... wouldn't not launch so I tried running the commands in the terminal to see where they were erroring out.

@ ayekat - Yes I am able to just open a terminal and run mutt and others just fine.

Offline

#16 2015-11-10 21:31:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Urxvt -e not working

pacman -Q | grep rxvt

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#17 2015-11-10 21:35:49

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

I assume something with the environment variables are wrong. Try this:

#!/bin/sh
env
sleep 10

Store this somewhere (e.g. as $HOME/test.sh), then:

chmod 755 $HOME/test.sh
urxvt -e $HOME/test.sh

Is there something weird in the output? E.g. the PATH variable, the HOME, XDG_CONFIG_HOME (if set), etc...


pkgs │ hacks │ cfg │ blag

Offline

#18 2015-11-10 21:41:01

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

XDG_VTNR=1
XDG_SESSION_ID=c1
SHELL=/usr/bin/zsh
TERM=screen-256
DESKTOP_STARTUP_ID=awesome/urxvt/785-4-zoned_TIME496776
WINDOWID=46137366
GTK_MODULES=canberra-gtk-module
ANTIGEN=/usr/share/.antigen
ZSH=/usr/lib/.oh-my-zsh
USER=nogz
ZSH_TMUX_TERM=screen-256color
_ZSH_TMUX_FIXED_CONFIG=/usr/lib/.oh-my-zsh/plugins/tmux/tmux.extra.conf
PAGER=less
DOTFILES=/home/nogz/.dotfiles
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
SDL_VIDEO_FULLSCREEN_DISPLAY=0
LSCOLORS=Gxfxcxdxbxegedabagacad
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
MAIL=/var/spool/mail/nogz
_=/usr/bin/env
HG=/usr/bin/hg
PWD=/home/nogz
EDITOR=vim
LANG=en_US.UTF-8
ADOTDIR=/home/nogz/.antigen
SHLVL=4
HOME=/home/nogz
ANTIGEN_DEFAULT_REPO_URL=https://github.com/robbyrussell/oh-my-zsh.git
XDG_SEAT=seat0
COLORFGBG=15;default
XDG_CONFIG_HOME=/home/nogz/.config
TERMINFO=/usr/share/terminfo
LESS=-R
LOGNAME=nogz
VISUAL=vim
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
LC_CTYPE=en_US.UTF-8
WINDOWPATH=1
ARCHFLAGS=-arch x86_64
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0
XAUTHORITY=/home/nogz/.Xauthority
COLORTERM=rxvt

Offline

#19 2015-11-10 21:43:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Urxvt -e not working

Is this in a tmux session?

Also, please post the version information I requested...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#20 2015-11-10 21:49:00

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

rxvt-unicode-256xresources 9.21-2
rxvt-unicode-terminfo 9.21-3
urxvt-perls 2.2-1
urxvt-tabbedex 0.4-3

this is not in a tmux session

Offline

#21 2015-11-10 21:52:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Urxvt -e not working

nogz wrote:

this is not in a tmux session

env wrote:

TERM=screen-256

Then why are you forcing a $TERM?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#22 2015-11-10 21:54:45

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Urxvt -e not working

Also, have you tried using the non-AUR urxvt, just to be sure? (I doubt it's because of that, but still...)


pkgs │ hacks │ cfg │ blag

Offline

#23 2015-11-10 22:02:37

nogz
Member
Registered: 2015-10-15
Posts: 13

Re: [SOLVED] Urxvt -e not working

I was forcing terms to test. ( I was using xterm-256)
I actually just switched from the non-AUR to test.

Edit: So i just removed the screen-256 and it works now!

Last edited by nogz (2015-11-10 22:05:13)

Offline

Board footer

Powered by FluxBB