LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xterm - how to go onto next line when end of current line is reached? (https://www.linuxquestions.org/questions/linux-newbie-8/xterm-how-to-go-onto-next-line-when-end-of-current-line-is-reached-780699/)

devnull10 01-07-2010 05:30 PM

xterm - how to go onto next line when end of current line is reached?
 
Hi,
I am using xterm and sometimes when typing long commands into a small window, the command extends beyond the end of the line. On my old uni setup, when this happens, the cursor moves to the line below and you can see what text you have typed above however on my slack 13 setup, it overwrites the current line so you cannot see what you have typed!
How can I set xterm to move onto the next line instead of overtyping?

Thanks

Simon Bridge 01-07-2010 05:55 PM

You have to configure xterm to enable "line wrapping".

autoWrap is supposed to be true by default so you may have it set false.

if your xterm window has an edit menu - edit > preferences

devnull10 01-07-2010 06:05 PM

Hi,
It doesn't have an edit menu - I can use ctrl+click but that doesn't show up any such option. I see from the man page that the -aw flag should enable auto-wraparound however if I invoke xterm with this, it makes no difference.

devnull10 01-07-2010 06:17 PM

btw, I have created a .xresources file in my home directory as such:

Code:

xterm*autoWrap: true
and run

Code:

xrdb -merge .Xresources
but it still doesn't work.

DonnieP 01-07-2010 06:40 PM

Is yours a standard, full Slack 13 install? Do you get the same behavior with other terminal emulators or is it only with xterm? Do you get the same behavior when logged in as root vs user? Have you made changes to /etc/termcap? What does 'echo $TERMCAP' report?

devnull10 01-07-2010 07:03 PM

Is yours a standard, full Slack 13 install?
> Yep

Do you get the same behavior with other terminal emulators or is it only with xterm?
> It's the same with rxvt although I only use xterm

Do you get the same behavior when logged in as root vs user?
> If I run "su" then yes, it's the same however if I use "su -" then no, it works fine and goes onto the next line (in both xterm and rxvt)

Have you made changes to /etc/termcap?
> No, I haven't made any changes to this

What does 'echo $TERMCAP' report?
> For my user, it returns this:

Code:

vs|xterm|xterm-color|vs100|xterm terminal emulator (X Window System):am:bs:km:co#100:li#70:ct=\E[3k:ue=\E[m:is=\E[m\E[?1l\E>:rs=\E[m\E[?1l\E>:eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:kI=\E[2~:kD=:kP=\E[5~:kN=\E[6~:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:F1=\E[23~:F2=\E[24~:kh=\E[H:kH=\EOw:ks=:ke=:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ms:pt:xn:xo:it#8:RA=\E[?7l:SA=\E?7h:bl=^G:cr=^M:ta=^I:cm=\E[%i%d;%dH:le=^H:up=\E[A:do=\E[B:nd=\E[C:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:DO=\E[%dB:ho=\E[H:cl=\E[H\E[2J:ce=\E[K:cb=\E[1K:cd=\E[J:sf=\ED:sr=\EM:st=\EH:cs=\E[%i%d;%dr:sc=\E7:rc=\E8:ic=\E[@:IC=\E[%d@:al=\E[L:AL=\E[%dL:dc=\E[P:DC=\E[%dP:dl=\E[M:DL=\E[%dM:so=\E[7m:se=\E[m:us=\E[4m:mb=\E[5m:mh=\E[2m:md=\E[1m:mr=\E[7m:me=\E[m:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=\177:
> and for root (su -) it returns just nothing.

Cheers!

DonnieP 01-07-2010 08:09 PM

What Window Manager and/or Desktop Environment are you running?

devnull10 01-07-2010 08:14 PM

I'm running fvwm with a custom (yet basic) .fvwmrc2 file:

Code:

#------------------------------------------------------------------------------
# FVWM Configuraton file
#
# Creation Date 19/09/2009
#------------------------------------------------------------------------------

# Environment Variables etc
#------------------------------------------------------------------------------

ImagePath /usr/include/X11/pixmaps/:/usr/share/pixmaps/:/usr/share/pixmaps/downloaded/


# Virtual Desktops
#------------------------------------------------------------------------------
DesktopSize 3x2
DesktopName 0 Desk 1
DesktopName 1 Desk 2
EdgeScroll 100 100
EdgeResistance 450 450
EdgeThickness 1

# Default behaviour
#------------------------------------------------------------------------------
ClickTime 350
Style * SloppyFocus, MouseFocusClickRaises, NoIcon, MinOverlapPlacement
#EwmhBaseStruts 100 100 10 100
IgnoreModifiers L25 #Ignore numlock modifier

# Startup Functions
#------------------------------------------------------------------------------
DestroyFunc StartFunction
AddToFunc        StartFunction
 + I Module FvwmButtons FvwmWinTools
 + I FvwmTaskBar
 + I Module FvwmButtons FvwmLoadBar
 + I Exec xscreensaver -no-splash &
 + I Exec xv -root -quit -maxpect /usr/local/wallpapers/clean.jpg &
 
#DestroyFunc InitFunction
#AddToFunc  InitFunction

# Keyboard and Mouse bindings
#------------------------------------------------------------------------------
# General
Mouse 1 R A Menu FvwmRootMenu #Left
Mouse 2 R A WindowList #Middle
Mouse 3 R A Menu FvwmWindowMenu #Right
Mouse 4 R A NoOp #Scroll Up
Mouse 5 R A NoOp #Scroll Down

#Although these buttons are on the mouse, apparently X11 doesn't support them!
Mouse 6 A A NoOp
Mouse 7 A A NoOp
Mouse 8 A A NoOp

# Windows
Mouse 1 2 A Close
Mouse 1 4 A Maximize 100 -45p
Mouse 1 6 A Iconify
Mouse 1 1 A Menu FvwmWindowMenu

#Scroll window list
Key Tab A M WindowList Root c c NoDeskSort
Key L        A        4        Exec xscreensaver-command -lock

#Specific Windows
Style "xmms"                NoTitle

# Decor and animations
#------------------------------------------------------------------------------
Style * UseDecor FvwmDecor

# These styles are vector-based and are taken from http://www.fvwm.org/screenshots/vectorbuttons/
AddToDecor FvwmDecor
 + BorderStyle Simple
 + AddButtonStyle 2 Vector 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
 + AddButtonStyle 4 Vector 10 25x40@1 20x40@1 20x80@1 60x80@1 60x65@1 35x65@0 85x65@0 85x10@0 30x10@1 30x65@1
 + AddButtonStyle 6 Vector 14 20x20@1 20x70@1 70x70@0 70x20@0 20x20@1 60x60@0 60x50@0 60x60@0 50x60@0 60x60@0 60x80@0 80x80@0 80x60@0 60x60@0
 + AddButtonStyle 1 Vector 4 50x75@1 25x25@1 75x25@1 50x75@0


# Additional Elements Styling and Configuration [FvwmTaskbar, FvwmPager etc.]
#------------------------------------------------------------------------------
# FvwmPager
Style "FvwmPager" NoTitle, NoHandles, NoBorders, Sticky, WindowListSkip, \
 CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, NonIconifiable
 
DestroyModuleConfig FvwmPager: *
*FvwmPagerUseSkipList

#Window Tools Buttons
Style "FvwmWinTools" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 0, NonIconifiable
 *FvwmWinToolsRows 1
 *FvwmWinToolsGeometry -0-48
 *FvwmWinTools - mini.camera.xpm Exec import -window root ~/screenshot_`date +%Y%m%d_%H%M%S`.jpg
 *FvwmWinTools - mini.zoom.xpm Module FvwmIdent
 *FvwmWinTools - mini.resize2.xpm Resize
 *FvwmWinTools - mini.move2.xpm Move
 *FvwmWinTools - mini.bomb.xpm Destroy

#Load Bar
Style "FvwmLoadBar" NoTitle, NoHandles, NoBorders, Sticky, WindowListSkip, \
 CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, NonIconifiable
 *FvwmLoadBarColumns 6
 *FvwmLoadBarGeometry 482x82-0+0
 *FvwmLoadBar: (Swallow xbiff "Exec xbiff")
 *FvwmLoadBar: (Swallow xclock "Exec xclock -update 1")
 *FvwmLoadBar: (Swallow MemDetails "Module FvwmScript memdetails")
 *FvwmLoadBar: (Swallow xload "Exec xload -scale r5 -update 5 -nolabel -jumpscroll 1")
 *FvwmLoadBar: (2x1, Swallow FvwmPager "Module FvwmPager 0 1")

# FvwmTaskbar
Style "FvwmTaskBar" NoTitle, NoHandles, NoBorders, Sticky, WindowListSkip, \
 CirculateSkip, FixedPosition, FixedSize, NonIconifiable, \
 StaysOnTop
 
DestroyModuleConfig FvwmTaskBar: *
 *FvwmTaskBarUseSkipList
 *FvwmTaskBarRows 2
 *FvwmTaskBarDeskOnly
 *FvwmTaskBarStartName fvwm
 *FvwmTaskBarStartMenu FvwmRootMenu
 *FvwmTaskBarStartIcon mini.penguin.xpm
 *FvwmTaskBarClockFormat %R %a %d %b %y
 *FvwmTaskBar: Action Click3 Menu FvwmTaskBarContextMenu
 
# Menus
#------------------------------------------------------------------------------

#Window functions menu
DestroyMenu FvwmWindowMenu "Window Operations" Title
AddToMenu FvwmWindowMenu "Window Ops" Title
 + "&Move%mini.move2.xpm%" Move
 + "&Resize%mini.resize2.xpm%" Resize
 + "(Un)S&hade%mini.shade1.xpm%" WindowShade
 + "(Un)S&tick%mini.stick1.xpm%" Stick
 + "" Nop
 + "&Close%mini.exclam.xpm%" Close
 + "De&lete%mini.cross.xpm%" Delete
 + "&Destroy%mini.destroy.xpm%" Destroy
 + "" Nop
 + "&Identify%mini.zoom.xpm%" Module FvwmIdent

#Task Bar Context Menu
DestroyMenu FvwmTaskBarContextMenu
AddToMenu FvwmTaskBarContextMenu
 + "&Raise%mini.raise.xpm%" Raise
 + "&Iconify%mini.iconify.xpm%" Iconify
 + "&Maximize%mini.max1.xpm%" Maximize
 + "I&dentify%mini.zoom.xpm%" Module FvwmIdent
 + "(Un)S&hade%mini.shade1.xpm%" WindowShade
 + "" Nop
 + "&Close%mini.exclam.xpm%" Close
 + "&Destroy%mini.destroy.xpm%" Destroy


#Root Menu
DestroyMenu FvwmRootMenu
AddToMenu        FvwmRootMenu "Root Menu" Title
 + "&XTerm%mini.xterm.xpm%" Exec xterm -rw -aw +ls -geometry 100x70+10+10 &
 + "" Nop
 + &Internet Popup FvwmInternetMenu
 + &Multimedia Popup FvwmMultimediaMenu
 + &Utilities Popup FvwmUtilsMenu
 + &Office Popup FvwmOfficeMenu
 + &Development Popup FvwmDevelopmentMenu
 + &Graphics Popup FvwmGraphicsMenu
 + &Fun Popup FvwmFunMenu
 + &System Popup FvwmSystemMenu
 + "" Nop
 + "X&Lock%mini.xlock.xpm%" Exec xlock
 + "" Nop
 + "&Restart FVWM%mini-turn.xpm%" Restart
 + "&Quit FVWM%mini.excl.xpm%" Quit
 
#Internet Menu
DestroyMenu FvwmInternetMenu
AddToMenu  FvwmInternetMenu
 + "&Firefox%firefox.xpm%" Exec firefox &
 + "&Thunderbird%thunderbird.xpm%" Exec thunderbird &
 + "&Pidgin%mini.run.xpm%" Exec pidgin &
 + "&XChat%mini.happy.xpm%" Exec xchat &
 + "&Limewire%LimeWire.xpm%" Exec limewire &
 
#Multimedia Menu
DestroyMenu FvwmMultimediaMenu
AddToMenu  FvwmMultimediaMenu
 + "&Alsamixer%mini.sound.xpm%" Exec xterm -rw -aw +ls -geometry 100x70+10 -T "Alsamixer" alsamixer &
 + "X&mms%mini.audiovol.xpm%" Exec xmms &
 + "&VLC Player%vlc16x16.xpm%" Exec vlc &
 + "X&ine%mini.xaniroc.xpm%" Exec xine
 + "&Nero%nerolinux16x16.xpm%" Exec nero &
 + "&Cover Manager%mini.cave.xpm%" Exec cover_manager &
 
#Utilities Menu
DestroyMenu FvwmUtilsMenu
AddtoMenu FvwmUtilsMenu
 + "x&Calc%mini.calc2.xpm%" Exec xcalc &
 
#Office Menu
DestroyMenu FvwmOfficeMenu
AddToMenu FvwmOfficeMenu
 + "&Writer%mini.edit.xpm%" Exec soffice -writer &
 + "&Calc%mini.xkeycaps.xpm%" Exec soffice -calc &
 + "&Impress%mini.lower.xpm%" Exec soffice -impress &
 + "&Draw%mini.pencil.xpm%" Exec soffice -draw &
 + "&Math%mini.graph.xpm%" Exec office -math &
 + "&Base%mini.filemgr.xpm%" Exec soffice -base &
 + "&Acroread%mini.pdf.xpm%" Exec acroread &
 + "X&Fig%mini.xfig.xpm%" Exec xfig &

#Development Menu
DestroyMenu FvwmDevelopmentMenu
AddToMenu FvwmDevelopmentMenu
 + "&NEdit%mini.file.xpm%" Exec nedit &
 
#Graphics Menu
DestroyMenu FvwmGraphicsMenu
AddToMenu FvwmGraphicsMenu
 + "&Gimp%mini.gimp.xpm%" Exec gimp &
 + "GQ&View%mini.mag.xpm" Exec gqview &
 + "&xv%mini.xv.xpm%" Exec xv &
 
#Fun Menu
DestroyMenu FvwmFunMenu
AddToMenu FvwmFunMenu
 + "x&Snow%mini.xsnow.xpm%" Exec xsnow -santa 2 -slc "brown"

#System Menu
DestroyMenu FvwmSystemMenu
AddToMenu FvwmSystemMenu
 + "&Top%mini.perf.xpm%" Exec xterm -rw -aw +ls -geometry 100x70+10 -T "Running Processes (Top)" top &

Thanks

DonnieP 01-07-2010 08:40 PM

Have you tried running 'xterm -ls' (i.e., the login option)? I'm grasping at straws here because I'm not experiencing this behavior in my Slack 13 running LXDE.

devnull10 01-17-2010 05:34 PM

Hi,
It is just the same with xterm -ls. :(

Thanks

Simon Bridge 01-17-2010 11:01 PM

Quote:

Originally Posted by devnull10 (Post 3818195)
btw, I have created a .xresources file in my home directory

Linux filenames are case sensitive ... it is supposed to be:

~/.Xresources

devnull10 01-18-2010 04:05 AM

Sorry, yes it was called that, I just didn't type it with the capital - me being lazy! :)

devnull10 01-18-2010 06:15 PM

I have just discovered something. If I type LOTS of text into the console, it eventually wraps onto a new line and then continues wrapping after than. I am wondering whether it is maybe some setting which is setting the width of my window to be larger than it actually is? I have looked but can't find anything. :(

Simon Bridge 01-21-2010 10:55 PM

Your xterm console set to 80 characters?
maximise the window and see.

gavinz 03-12-2010 10:33 AM

I have the same problem, and also sometimes have junk appearing in terminal-based programs like irssi, but I think I've fixed it.

Check your PS1 variable, and make sure you surround non-printing characters (e.g. colour codes) with "\[" and "\]".


All times are GMT -5. The time now is 06:10 PM.