Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Problems with batch files for Cygwin/rxvt Post 302397031 by SilversleevesX on Sunday 21st of February 2010 02:49:31 AM
Old 02-21-2010
Problems with batch files for Cygwin/rxvt

I'm trying to write batch scripts of the kind that start a Cygwin session in rxvt from the desktop, with the added feature that the session starts in a folder other than $HOME. I want to do this for two folders I use often.

According to the manpage, rxvt has a "-cd" command. Therefore, at first and second glance, the following should work.
Code:
@echo off

C:
chdir C:\cygwin\bin

start rxvt -display :0 -sl 2500 -sr -tn rxvt-cygwin-native -geometry 80x25 -font "Bitstream Vera Sans Mono-14" -e /bin/bash --login -i -cd /cygdrive/c/blu/newest/

exit

The results are that I see an RXVT window for about a blink or two, then nothing.

Is there something wrong with where I have the "-cd" command? Or should I 'bite the bullet' and register the two folders in Environment Variables or .bashrc? I'm thinking then I could use $NEWEST or $TG1 with the "-cd" command and both the OS and Cygwin would know what/where I was talking about.

Advice please on how to proceed.

BZT

---------- Post updated 21st Feb 2010 at 02:46 ---------- Previous update was 20th Feb 2010 at 12:53 ----------

My bad -- it's URXVT (rxvt-unicode) that has the "-cd" command. Wouldn't be a bad time for a bit of backward-inheritance, though, methinks.

Now with slight modifications to the batch file code in my original post to this thread, I'm getting "flashes" or "there-&-gones" by both the Command prompt and rxvt.

BZT

---------- Post updated at 02:46 ---------- Previous update was at 02:46 ----------

My bad -- it's URXVT (rxvt-unicode) that has the "-cd" command. Wouldn't be a bad time for a bit of backward-inheritance, though, methinks.

Now with slight modifications to the batch file code in my original post to this thread, I'm getting "flashes" or "there-&-gones" by both the Command prompt and rxvt.

BZT

---------- Post updated at 02:49 ---------- Previous update was at 02:46 ----------

Okay this ^^ has turned into an awful mess, and I'm not sure how it happened. Could someone please trim the above back to one reply and then delete this request?

BZT
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing middle mouse button for pasting to right mouse button in cygwin rxvt

Hi, I'm using rxvt in Cygwin and I'm wondering how to change my mouse bindings from the middle button for pasting to the right button. The main reason why I want to do this is because my laptop doesn't have a middle mouse button. Thanks for any help! (2 Replies)
Discussion started by: sayeo
2 Replies

2. Windows & DOS: Issues & Discussions

"Striping" the background of an Rxvt/Urxvt window in Cygwin

To get this: https://www.unix.com/members/silversleevesx-albums-incidental-shot-glass-picture127-termshot-rxvt-rootless.png out of Cygwin's rxvt, you have to tweak your /cygwin/etc/x11/app-defaults/rxvt file, which is here:... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

3. Shell Programming and Scripting

Problems with simple script in cygwin

Hello! I have somo problems with simple scripts like this: #!/bin/bash echo -n "Enter your name and press : " read var_name echo "Your name is: $var_name" When I try to run it, this error occurs: ':not a valid identifier var_name. Why?? (I work in cygiwin) Is there anybody out... (10 Replies)
Discussion started by: blianna
10 Replies

4. UNIX for Dummies Questions & Answers

Batch Renaming of Files

Hello all, thanks for your time (and this forum, what an awesome resource for newbs like myself!) Anyways, I've been given the task of importing content from a directory of about...7000 HTML files. They are all named appropriately and broken down by name depending on what book they belong too.... (8 Replies)
Discussion started by: gratefulhokie
8 Replies

5. UNIX Desktop Questions & Answers

rxvt: backgroundPixmap upside down

Anyone have any advice? I've tried just about every option, tweak, re-phrase in the man page, FAQ, and such, but there doesn't seem to be any information about what to do when your AfterImage-enabled RXVT displays its background image (xbm format converted from PNG by ImageMagick v6.-something)... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

6. UNIX for Dummies Questions & Answers

Im having cygwin problems on windooze 64

I have installed ruby with cygwin according to these inst: w w w .sproutcore.com/install_win/#tab=advanced-install but at the last command: gem install sproutcore I'm getting a bunch of errors: $ gem install sproutcore Fetching: rack-1.3.2.gem (100%) Fetching:... (0 Replies)
Discussion started by: Sssssssssssslep
0 Replies

7. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

8. Shell Programming and Scripting

Need to exclude .NFSxxx files in clear old files batch script

I am new to Shell Scripting and need some help. The following batch job has been failing for me due to the .nfsxxx files in use. I need to know how to modify the following script to exclude the .nfsxxx files so this batch job will not fail on me. I have done lots of googling and keep coming back... (2 Replies)
Discussion started by: kimberlyg2007
2 Replies

9. Shell Programming and Scripting

Accessing files in batch

hai, I have a list of files having extension .sy in a folder. I want to find such files and print the first two columns of the files to new extension .tmp (1 Reply)
Discussion started by: sreejithalokkan
1 Replies

10. UNIX for Beginners Questions & Answers

Using BATCH to call a BASH script on CygWin

I am trying to use a batch file to automatically execute a bash script with no luck this far. The batch script looks like this: C:\Cygwin64\bin\bash test.sh I have also tried this: C:\Cygwin64\bin\bash "C:\Cygwin64\bin\test.sh" Needless to say that the windows box has Cygwin... (7 Replies)
Discussion started by: Xterra
7 Replies
urxvt(1)							   RXVT-UNICODE 							  urxvt(1)

NAME
urxvtd - urxvt terminal daemon SYNOPSIS
urxvtd [-q|--quiet] [-o|--opendisplay] [-f|--fork] [-m|--mlock] urxvtd -q -o -f # for .xsession use DESCRIPTION
This manpage describes the urxvtd daemon, which is the same vt102 terminal emulator as urxvt, but runs as a daemon that can open multiple terminal windows within the same process. You can run it from your X startup scripts, for example, although it is not dependent on a working DISPLAY and, in fact, can open windows on multiple X displays on the same time. Advantages of running a urxvt daemon include faster creation time for terminal windows and a lot of saved memory. The disadvantage is a possible impact on stability - if the main program crashes, all processes in the terminal windows are terminated. For example, as there is no way to cleanly react to abnormal connection closes, "xkill" and server resets/restarts will kill the urxvtd instance including all windows it has opened. OPTIONS
urxvtd currently understands a few options only. Bundling of options is not yet supported. -q, --quiet Normally, urxvtd outputs the message "rxvt-unicode daemon listening on <path>" after binding to its control socket. This option will suppress this message (errors and warnings will still be logged). -o, --opendisplay This forces urxvtd to open a connection to the current $DISPLAY and keep it open. This is useful if you want to bind an instance of urxvtd to the lifetime of a specific display/server. If the server does a reset, urxvtd will be killed automatically. -f, --fork This makes urxvtd fork after it has bound itself to its control socket. -m, --mlock This makes urxvtd call mlockall(2) on itself. This locks urxvtd in RAM and prevents it from being swapped out to disk, at the cost of consuming a lot more memory on most operating systems. Note: In order to use this feature, your system administrator must have set your user's RLIMIT_MEMLOCK to a size greater than or equal to the size of the urxvtd binary (or to unlimited). See /etc/security/limits.conf. Note 2: There is a known bug in glibc (possibly fixed in 2.8 and later versions) where calloc returns non-zeroed memory when mlockall is in effect. If you experience crashes or other odd behaviour while using --mlock, try it without it. EXAMPLES
This is a useful invocation of urxvtd in a .xsession-style script: urxvtd -q -f -o This waits till the control socket is available, opens the current display and forks into the background. When you log-out, the server is reset and urxvtd is killed. ENVIRONMENT
RXVT_SOCKET Both urxvtc and urxvtd use the environment variable RXVT_SOCKET to create a listening socket and to contact the urxvtd, respectively. If the variable is missing then $HOME/.rxvt-unicode-<nodename> is used. DISPLAY Only used when the "--opendisplay" option is specified. Must contain a valid X display name. SEE ALSO
urxvt(7), urxvtc(1) 9.07 2009-12-30 urxvt(1)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy