On Bash options

Angelo Graziosi angelo.graziosi@alice.it
Thu Mar 13 14:09:00 GMT 2008


Eric Blake wrote:

 > Why execute bash, just to exec urxvt, which in turn executes another
 > instance of bash?  Why not just put urxvt as the shortcut target
 > instead, using ~/.Xdefaults to control everything rather than needing 
 > bash to set it up?

Eric,

For the sake of completeness the 'start_urxvt.sh' (located in 
/usr/local/bin) is

----------------------------------------------
#!/bin/bash

export DISPLAY=:0

export XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
export XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
export XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
export XNLSPATH=/usr/X11R6/lib/X11/locale

start_XWin()
{
     # Cleanup from last run.
     rm -rf /tmp/.X11-unix

     XWin -multiwindow -clipboard -silent-dup-error +bs &
}

/usr/bin/checkX || start_XWin

exec /usr/bin/urxvt
----------------------------------------------

and the link on the desktop is:

C:\cygwin\bin\run.exe bash --login -c start_urxvt.sh


The problem I have tried to solve is:

How to start an urxvt console [1] from a link on desktop, starting also 
the X server if it is not running.

So what would be the best manner (including sourcing ~/.bash* so that 
the prompt, aliases etc. are OK)? What do you suggest?

Perhaps the best thing is to add the solution to the Cygwin FAQ/HowTo.

In any case your detailed explanation is better than an high level lesson!

Many thanks,
    Angelo.


---
[1] More generally, the problem to solve is: How to start an X 
application (Emacs, XFig,...) and/or the X server (if it is not running) 
with a link on desktop.

___
Facesti come quei che va di notte,
che porta il lume dietro e se' non giova,
ma dopo se' fa le persone dotte.
.
                   DANTE, Purgatorio, xxii 67-69

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list