Ask a Question related to UNIX Programming, Design and Development.
-
Ken Steen #1
Changing xterm title.
I have an ncurses based application that changes the xterm title to the
current working directory. I was using printf statements and escape
characters to change the title but if the program is running inside of
the screen program that will not work. I changed the program to use Xlib
calls but I am not sure if I am doing it correctly or not.
This works but I am wondering if there is a better way.
void
change_term_title(char * new_title)
{
Display *dsp = NULL;
Window win = 0;
XTextProperty prop;
XStringListToTextProperty(&new_title, 1, &prop);
dsp = XOpenDisplay(NULL);
win = atol(getenv("WINDOWID");
XSetWMName(dsp, win, &prop);
XFlush(dsp);
XFree(prop.value);
XCloseDisplay(dsp);
}
I have never done any Xlib programming and I don't know how portable this
code is. I realize that the code needs some error checking, but I am
wondering if I am on the right track or if there is a better way of doing
this.
Thanks,
Ken
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Ken Steen Guest
-
Changing Admin Page Title
Can you change the page title displayed in CF Admin so it says "Coldfusion Administrator- DEV" when on a dev server? I tried opening the index file... -
Changing the title bar and URL
Hi , I am using Frames in my website, all is well except for one thing. The page title and the URL (in the address bar) stays the same. It always... -
Show information in xterm title bar
I am using Xterm on Solaris 2.8 via Exceed. I like to run ksh. I would like to display details such as, my current userid, server, current... -
Changing Browser Title Bar in MM_openBrWindow?
I used presentation pro's converter to convert my powerpoints to flash. In DMX I am able to launch a flash piece in a new window using the onClick... -
bash: display running foreground command in xterm title
How can I get bash to display the currently running command (at least the foreground process) in the titlebar of an xterm? All I'm finding on Google... -
Stephane CHAZELAS #2
Re: Changing xterm title.
Ken Steen wrote:
[...]> I have an ncurses based application that changes the xterm title to the
> current working directory. I was using printf statements and escape
> characters to change the title but if the program is running inside of
> the screen program that will not work.
You can put this in your ~/.screenrc:
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]0;xterm\007'
--
Stéphane
Stephane CHAZELAS Guest



Reply With Quote

