delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/13/09:09:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <47D9353C.1030304@alice.it>
Date: Thu, 13 Mar 2008 15:07:56 +0100
From: Angelo Graziosi <angelo DOT graziosi AT alice DOT it>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: On Bash options
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019