delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/06/16:43:47

X-Spam-Check-By: sourceware.org
From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Bash Window Geometry
Date: Mon, 6 Feb 2006 22:43:19 +0100
Message-ID: <JAEBIEIILHAGMJNFODIECEBDCEAA._garbage_collector_@telia.com>
MIME-Version: 1.0
In-Reply-To: <20060206175609.GH15572@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Corinna wrote:
> On Feb  6 17:34, Bubba Jones wrote:
>> On Mon, 6 Feb 2006 12:13:43 -0500 (EST) Igor Peshansky
> <pechtcha@**.***.***> wrote:
>>> On Mon, 6 Feb 2006, Bubba Jones wrote:
>>>
>>>> Is it possible to tell the bash prompt where I want it positioned
>>>> on my desktop?  Using X Windows I specify size and location with
>>>> "--geometry". Is there anything comparable under MS Windows?
>>>
>>> First off, <http://cygwin.com/acronyms/#PCYMTWLL>.  Thanks.
>>
>> I think my mailer might be goofed...  I don't see an option
>> for that.  I'll fix it the ole fashioned way though with a manual
>> CR/LF :) .
>>
>>> Now, if you're starting bash from a shortcut (e.g., the one Cygwin
>>> installation puts on your desktop), you can change shortcut
>>> parameters to put the window anywhere you want
>>> (Properties->Layout->Window position).
>>
>> Thanks, but I'm looking for something like the "--geometry"
>> feature of X.
>
> If you use rxvt instead of the standard console window, then just try
> the -geometry option...
>
>
> Corinna

 Note that if you have a correctly defined $HOME at the time when you start
rxvt, then you can use the $HOME/.Xdefaults file to define the geometry and
more
(see man rxvt)

e.g. running something that mimics this; (UNTESTED!)

	bash <<EOF
	HOME="/home/$(id -un)"
	export HOME
	. /etc/profile  # necessary?
	rxvt -ls /bin/bash -li &
	EOF

from cygwin.bat will have you up and running, with settings from .Xdefaults
in your (default) home dir (as setup by /etc/profile).

NOTE: it is necessary to do tricks to accomplish the above,
       as .bat/cmd.exe doesn't allow "here docs".

I have something similar setup on my work machine, but I don't remember how
it is exactly - @home now.
 Another optional "path" is to have $HOME be the null string (from
Windows/cygwin.bat) and have /etc/profile pathed as indicated below.

/H

$ diff -u /etc/defaults/etc/profile{.old,}
--- /etc/defaults/etc/profile.old       2006-02-03 10:14:15.947837500 +0100
+++ /etc/defaults/etc/profile   2006-02-03 10:17:57.977674300 +0100
@@ -42,11 +42,16 @@
 export USER

 # Here is how HOME is set, in order of priority, when starting from Windows
+#  0) /home/$USER if $HOME is null
 #  1) From existing HOME in the Windows environment, translated to a Posix
path
 #  2) from /etc/passwd, if there is an entry with a non empty directory
field
 #  3) from HOMEDRIVE/HOMEPATH
 #  4) / (root)

+if [ -z "$HOME" ]; then
+  HOME=/home/$USER
+fi
+
 # If the home directory doesn't exist, create it.
 if [ ! -d "${HOME}" ]; then
        mkdir -p "${HOME}"

--


--
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