VectorLinux
October 30, 2014, 02:26:18 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: xterm misbehaving  (Read 1440 times)
emi
Member
*
Posts: 21


« on: December 20, 2007, 01:23:38 pm »

I'm trying to get my xterm configured the way I want it on my system (5.8 SOHO) but it's not co-operating. There are 3 persistent problems.

#1)
I like xterm to have a black background and white lettering. I added the following to my /etc/X11/app-defaults/XTerm-color file:

Code:
*VT100*foreground: gray90
*VT100*background: black

and the following into my .Xdefaults file:

Code:
*customization: -color

This works fine in ratpoison, but in KDE the xterms show up black on white again. If I access KDE from ratpoison with :tmpwm and then go back to ratpoison, the xterms are black on white in ratpoison as well.

Does anyone know what file/variable KDE alters?

#2)
When I open a new xterm it doesn't execute my .bash_login file. This is not good because it has my rm='rm -i' aliases and such in it.

#3)
My backspace key is apparently the same as ^H (octal 010). stty says erase=^? but termcap has the bs flag that says, according to the manual,

bs   Control-H (8 dec.) performs a backspace

So the backspace works fine on the command line in xterm but if I execute a c program that I wrote, which asks for a bunch of user text, backspaces are echoed as "^H" and only Cntl-? actually erases the previous character on the screen. The backspace works normally within the program when it is run in konsole or in runlevel 2. For the program to work properly in xterm I need to get very messy and change c_cc.[VERASE] to 010 but then it doesn't work right in other terminal emulators.

This is /etc/termcap in case it's useful.

Code:
143 # Entry for an xterm. Insert mode has been disabled.
144 vs|xterm|xterm-color|vs100|xterm terminal emulator (X Window System):\
145         :am:bs:mi@:km:co#80:li#55:\
146         :im@:ei@:\
147         :ct=\E[3k:ue=\E[m:\
148         :is=\E[m\E[?1l\E>:\
149         :rs=\E[m\E[?1l\E>:\
150         :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\
151         :kI=\E[2~:kD=\177:kP=\E[5~:kN=\E[6~:\
152         :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
153         :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\
154         :F1=\E[23~:F2=\E[24~:\
155         :kh=\E[H:kH=\EOw:\
156         :ks=:ke=:\
157         :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:\
158         :tc=vt-generic:

If anyone smarter than I can shed some light on these issues I would be most grateful.
Logged
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #1 on: December 20, 2007, 01:47:15 pm »

I'm trying to get my xterm configured the way I want it on my system (5.8 SOHO) but it's not co-operating. There are 3 persistent problems.

#2)
When I open a new xterm it doesn't execute my .bash_login file. This is not good because it has my rm='rm -i' aliases and such in it.

Sorry, can't comment on the other points. However, in this case..

A terminal opened from X will never be a login terminal. As a result, ~/.bash_login will not be read. A better option would be to put that type of alias into ~/.bashrc (which is executed by non-login shells and source ~/.bashrc in your ~/.bash_login so that your aliases and other settings are available in both login and non-login shells.

paul

Logged
emi
Member
*
Posts: 21


« Reply #2 on: December 20, 2007, 03:02:34 pm »

A terminal opened from X will never be a login terminal. As a result, ~/.bash_login will not be read. A better option would be to put that type of alias into ~/.bashrc (which is executed by non-login shells and source ~/.bashrc in your ~/.bash_login so that your aliases and other settings are available in both login and non-login shells.

paul

Thanks, I didn't realize this. Konsole always executed .bash_login regardless.

Actually, I'm playing around with it now and I see that Konsole only executes .bash_login when launched from within kde. Launching konsole from ratpoison or from an already-opened terminal in KDE causes it to ignore .bash_login. What an odd feature.
Logged
kidd
Packager
Vectorian
****
Posts: 682


« Reply #3 on: December 22, 2007, 04:33:31 pm »

Ratpoison user here Smiley

I've had some of ^H problems (when I was inside screen) that got solved in terminal by.
Edit->preferences->advanced Erase key sends  "CTRL-H"

I have the following in my ~/.Xdefaults

Code:
xterm*background: black
xterm*foreground: white


Myself I'm using rxvt-unicode with ratpoison and everything is working ok.

HTH
« Last Edit: December 22, 2007, 04:38:10 pm by kidd » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!