Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have configured XWin to start automatically at logon, this gives me a tray icon where I can launch X apps that will be children of the XWin instance and have their environment correclty set just like I was running in a Unix based OS(XWin is started through a login shell that setups the environment).

The problem is that I can't find a way to launch x apps(urxvt) as children of that XWin instance. This breaks interactive shells startup since I have to use login shells for every terminal I need to open.

How can I simulate the XWin tray icon application menu action?(Eg: from a start menu shortcut)

share|improve this question
add comment

1 Answer

If you are comfortable with the XWin-Menu, you can expand that by editing /etc/X11/system.XWinrc:

 // Make some menus...
 menu apps {
          xterm   exec    "xterm"
          "Emacs" exec    "emacs"
          notepad exec    notepad
          xload   exec    "xload -display %display%"  # Comment
          urxvt   exec    "urxvt"                     # <- added by me

After saving, don't forget to Reload XWinrc to apply changes.

However, I use the following approach (I wanted to pin URxvt to the taskbar) -- it sounds really cumbersome, and it probably is... but hey it's Windows ;)

First, I created a c:\cygwin\cygwin.bat

@echo off
chdir C:\cygwin\bin
zsh --login -i -c 'urxvt'

Adapt path and shell to your situation.

To configure the appearance of URxvt I use these lines in .Xdefaults:

URxvt.borderColor: black
URxvt.internalBorder: 4 
URxvt.background: black
URxvt.foreground: orange
! URxvt.inheritPixmap: True
! URxvt.shading: 40
! URxvt.tintColor: orange
URxvt.scrollBar: False
URxvt.geometry: 150x60+500+100
URxvt.font: -*-clean-bold-r-normal-*-17-*-*-*-*-*-*-*

change to your preferences or uncomment with ! if you like the default.

Then I created a shortcut (also in C:\cygwin) so that I can customize the icon and renamed that shortcut to ZSH_tray. This shortcut gets pinned to the taskbar.

My main problem was (and probably yours, too) is, that there is a shell windows in addition to the URxvt window. To prevent that I use Tray-It:

  1. Install & start Tray-It
  2. Start URxvt via the shortcut
  3. In Tray-IT:
    • right click the corresponding entry -> Place in Systray
    • Edit -> Profiles
    • Config according to screenshots
  4. Hide Tray-It itself and start it with windows (Edit -> Options)

config of trayit

share|improve this answer
I'm sorry but that's not what I meant. My problem is that I want to start the rxvt process as child of the login shell used to start XWin, so it will correctly inherit the environment I usually setup on Unixes. Btw to run X apps without the DOS window just run it with the cygwin 'run.exe' executable (man run). –  Thiado de Arruda Mar 22 '13 at 18:04
@ThiadodeArruda: Oh yes, I didn't get your point first, sorry. I think your edited question is clearer now, but unfortunately I don't have a solution for that. -- And thanks for the hint with run, my presented workaround looks stupid now... –  mpy Mar 22 '13 at 19:25
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.