LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Problem with xterm + Xresources + bash (https://www.linuxquestions.org/questions/linux-desktop-74/problem-with-xterm-xresources-bash-690450/)

lmaza 12-09-2008 09:23 AM

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
fvwm

$
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
SOME WORDS
^D

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.



>
Quote:

Originally Posted by reddazz (Post 2377263)
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 xfce-look.org. 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.



All times are GMT -5. The time now is 07:29 AM.