You are not logged in.

#1 2011-05-12 07:39:46

anirudh215
Member
Registered: 2011-03-07
Posts: 78

urxvt problem

I have tried to configure my urxvt to behave like the Kuake terminal by following the Wiki. For some reason, it isn't working. I don't know why. I have followed the wiki to a T. Here are my files:

urxvtc:
#!/bin/sh
urxvtc "$@"
if [ $? -eq 2 ]; then
   urxvtd -q -o -f
   urxvtc "$@"
fi

urxvtq:
#!/bin/bash

wid=$(xdotool search --name urxvtq | grep -m 1 "" )
if [ -z "$wid" ]; then
  /home/anirudh/.config/openbox/urxvtc -name urxvtq -geometry 80x28
  wid=$(xdotool search --name urxvtq | head -1)
  xdotool windowfocus $wid
  xdotool key Control_L+l
else
  if [ -z "$(xdotool search --onlyvisible --name urxvtq 2>/dev/null)" ]; then
    xdotool windowmap $wid
    xdotool windowfocus $wid
  else
    xdotool windowunmap $wid
  fi
fi

.Xresources:
URxvt.perl-ext-common: default,matcher,tabbed

I don't know what is wrong. I have installed xdotools, and have reconfigured openbox and xrdb'ed the .Xresources, but still it doesn't work.

Offline

#2 2011-05-12 14:02:01

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: urxvt problem

You'll need to provide a bit more detail.  Does urxvt (not your script) execute properly on its own? If not, then it's likely an issue with your ~/.Xdefaults or ~/.Xresources file; incorrect font declarations are a common culprit.

If urxvt does run fine, what exactly isn't working?

Last edited by thayer (2011-05-12 14:02:46)


thayer williams ~ thayerwilliams.ca

Offline

#3 2011-05-12 15:41:37

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

I have added (through openbox) the keyboard shortcut 'W-t' for urxvt and 'W-grave' for urxvt (quake like terminal). urxvt by itself works fine. However, when I hit 'W-t' or 'W-grave' nothing happens.

Offline

#4 2011-05-12 17:45:59

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: urxvt problem

Okay, so urxvt works; let's move onto the next step in the process of elimination...

Does your urxvtc script work when run from a terminal?  If so, then there's likely something wrong with ~/.config/openbox/rc.xml so you might want to include it here (or via pastebin or whatever).


thayer williams ~ thayerwilliams.ca

Offline

#5 2011-05-12 17:53:19

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: urxvt problem

Try replacing all occurrences of xdotool's "--name" option with "--classname". The "--name" option used to mean the classname in older version, but has been changed to mean the window name (i.e. what's in the title bar).

Offline

#6 2011-05-12 17:58:09

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

I've done that and nothings happened as yet.

Offline

#7 2011-05-12 18:12:59

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: urxvt problem

Replace "urxvtc" from within your urxvtc script to be /usr/bin/urxvtc. Otherwise you get a nice recursive loop

Note: This really depends on what comes first in your path, but you should use the full path to urxvtc just to make sure.

Last edited by jac (2011-05-12 18:15:52)

Offline

#8 2011-05-12 18:19:07

nnoell
Member
From: Spain
Registered: 2010-08-21
Posts: 99

Re: urxvt problem

Hi anirudh215;

Does your rc.xml look something like this?

[...]

<!-- KEYBOARD SECTION -->
<keybind key="W-q">
  <action name="Execute">
    <command>/home/anirudh/.config/openbox/urxvtc</command>
  </action>
</keybind>
<keybind key="W-grave">
  <action name="Execute">
    <execute>/home/anirudh/.config/openbox/urxvtq</execute>
  </action>
</keybind>

[...]

<!-- APPLICATION SECTION -->
<application name="urxvtq">
  <decor>no</decor>
  <position force="yes">
    <x>center</x>
    <y>0</y>
  </position>
  <layer>above</layer>
  <desktop>all</desktop>
  <skip_pager>yes</skip_pager>
  <skip_taskbar>yes</skip_taskbar>
  <maximized>yes</maximized>
</application>

[...]

Make sure your urxvtq is defined as "<execute>" and not as "<command>" like urxvtc. Also, you should check if your scripts have x permissions.

If the problem still persists, could you post your rc.xml as said above?

Offline

#9 2011-05-13 16:04:27

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

@nnoell:
Yes, I'd edited the rc.xml to look just like that. Sorry I didn't mention that in the first post. I forgot.

@thayer and nnoell:
Here is my rc.xml:
  <keybind key="W-t">
    <action name="Execute">
      <command>/home/anirudh/.config/openbox/urxvtc</command>
    </action>
  </keybind>
  <keybind key="W-grave">
    <action name="Execute">
      <execute>/home/anirudh/.config/openbox/urxvtq</execute>
    </action>
  </keybind>

...

<application name="urxvtq">
    <decor>no</decor>
    <position force="yes">
      <x>center</x>
      <y>0</y>
    </position>
    <desktop>all</desktop>
    <layer>above</layer>
    <skip_pager>yes</skip_pager>
    <skip_taskbar>yes</skip_taskbar>
    <maximized>Horizontal</maximized>
  </application>
...

Offline

#10 2011-05-13 19:54:53

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: urxvt problem

thayer wrote:

Okay, so urxvt works; let's move onto the next step in the process of elimination...

Does your urxvtc script work when run from a terminal?  If so, then there's likely something wrong with ~/.config/openbox/rc.xml so you might want to include it here (or via pastebin or whatever).


thayer williams ~ thayerwilliams.ca

Offline

#11 2011-05-14 06:46:24

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

Yes, urxvtc does work when opened from a terminal. That's what I meant to say in post #6. Sorry. Was quite sleepy then and didn't quite communicate properly.

Offline

#12 2011-05-14 14:55:13

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: urxvt problem

No worries.  Well, I'm stumped; your rc.xml entries look fine and if the script works on its own, I'm not sure what to suggest next...

Is it possible that you have have an existing key binding for W-t that could be overriding this one?  I can't remember how openbox handles duplicates.


thayer williams ~ thayerwilliams.ca

Offline

#13 2011-05-14 16:04:16

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

Nope. I don't have any other key bound to 'W-t'. Darn. What should I do? I've heard about yeahconsole. Maybe I should try using that? Could others confirm this, and if so update the wiki stating that it doesn't work any more?

And another thing. To get tabs working on urxvt, I have to login and do xrdb Xresources everytime. Why doesn't it load tabs by default when I log in?

Last edited by anirudh215 (2011-05-14 16:12:45)

Offline

#14 2011-05-14 16:25:24

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: urxvt problem

Can you try renaming your script from urxvtc? Since there is already a urxvtc in /usr/bin, perhaps your WM's path and your console's paths are set to different things. Then, try your script from the console again, as with from the keybinding.

Offline

#15 2011-05-14 18:24:27

anirudh215
Member
Registered: 2011-03-07
Posts: 78

Re: urxvt problem

Hi jac,
Yes, I have tried renaming my urxvtc script to urxvtani as well as tried to substitute the /usr/bin/urxvtc inside the orginal urxvtc script. Neither approach works. sad

Last edited by anirudh215 (2011-05-15 06:07:33)

Offline

Board footer

Powered by FluxBB