Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 12-09-2008, 10:23 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 12

Rep: Reputation: 1
Problem with xterm + Xresources + bash

I put the following to state a context.
(It is taken from a book).
"Project Auto-shrinking xterm

Most people just use X resources to make simple modifications to colors or fonts. Even then, they generally just copy the X resources from another user without ever really understanding what the resouces are doing. In this short project we will investigate an interesting set of resources in xterm: Translations.

Translations in xterm enable you to execute certain actions in response to events. Often this events are key presses or mouse clicks (a good way to get macros), but there are other events such as when the mouse enters or leave the window.

Say you want the xterm to shrink whenever the mouse leaves it and then grow when the mouse enters. This way, you could have may xterms on the screen and could somewhat watch what they were doing without having them take over your entire desktop. This can be very handy when you have a lot of compilations goin on. You might want to watch them all to see when one completes, but you don't really care what the output looks like most of the time.

To get this effect you can instruct xterm to change its font in response to mouse actions. The following X resource would do this:

shrinkterm*VT100.Translations: <EnterWindow>: set-vt-font(d) \n \
<LEaveWindow>: set-vt-font(1) \n"

Now I take the freedom to make a question: (At last). I am using Debian GNU/Linux. But I do not use KDE and I do not use Gnome. Instead I only use X and a window manager. Specifically my ~/.xinitrc file gives with $cat .xinitrc the following

xterm -geometry +50+35 -fa courier -fs 14 -fg green -bg black

So I tried to get the shrinking xterms mentioned above. Therefore I edit a file called my_shrinkterm where I included the lines

shrinkterm*VT100.Translations: <EnterWindow>: set-vt-font(d) \n \
<LEaveWindow>: set-vt-font(1) \n

After that I introduce the comand
$xrdb -merge my_shrinkterm
Then type
$xterm -name shrinkterm&
After that I get a xterm that effectively grows when the mouse enters the window an shrinks when the mouse leaves it. The problem is that I cannot write in that xterm. When I put the mouse on the shrinked xterm, it grows but it seems not attend the keyboard. As an aproach to diagnose (make a diagnostic of) the problem I used the command write (from my first xterm on pts/0) to send a message to the pseudo terminal. I mean I introduced the command
$write user pts/1

And the message (SOME WORDS) in effect appears on the xterm (the one that shwinks and grows depending on the mouse position).

If somebody can and take the time to send help. Thanks in advence.

I apologize if this is not the right place to ask this. I spent several hours yesterday trying to solve this but I were not able to get it.

Originally Posted by reddazz View Post
XFCE does not show a recycle bin or any icons on >your desktop (this will change in newer versions). I think you can >install the rox filer if you want icons on your desktop whilst using >XFCE. XFCE uses GTK2 just like GNOME, so the look you describe is native >to XFCE. If you want MacOS like themes seach at You can >tinker with the panel size and other settings to make look like OS X but >I am not sure how well this will work out. Not sure about your volume >control.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Readline for Xterm-bash imputerate Linux - Newbie 1 06-19-2008 07:26 PM
xterm and bash completion athanatos Slackware 12 07-22-2006 01:47 PM
taking off the bash-3xx of the XTerm maginotjr Slackware 3 10-05-2005 08:18 PM
xterm start with sh instead of bash freeindy Linux - Software 4 04-25-2004 11:58 AM
Difference between bash and xterm krackerroot Red Hat 4 09-08-2003 11:32 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration