3

I'm going through the process of making XTerm transparent, I've followed the steps on this site. I installed transset-df and Xcompmgr and added this line to my .bashrc file [ -n "$XTERM_VERSION" ] && transset-df -a >/dev/null

I'm using Awesome WM and when I open a new window with Mod4 + Enter I get an error saying invalid window parameter among other things, and it doesn't make the window transparent, but when I create successive windows it does makes the previous windows transparent, even it makes previous non-XTerm windows transparent, except the most recent one. First I thought it was a software problem but then after looking at transset-df help, I realized the -a option tells transset-df to apply transparency to the actual window.

So what it is doing is to apply transparency to the most recent window, that's why the first XTerm windows show the error (it is not created by the time the command is called), and successive XTerms make previous transparent.

I need some way to tell bash to apply the command only after the window has been created.

Thanks.

2

I got around this by avoiding .bashrc altogether. I created a shell script named xterm that opens xterm, and sets the transparency after a short delay to make sure the xterm window has been created:

#!/usr/bin/env sh

# Launch xterm in the background
/usr/bin/xterm &

# Sleep long enough to get the window open, and set transparency
sleep .4s
transset-df -a

This does cause issues if other applications embed xterm, or expect it to be run directly, so you might want to name the script xterm-trans or something that doesn't override the actual binary.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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