LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-07-2010, 05:30 PM   #1
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Rep: Reputation: 115Reputation: 115
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
 
Old 01-07-2010, 05:55 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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
 
Old 01-07-2010, 06:05 PM   #3
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
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.
 
Old 01-07-2010, 06:17 PM   #4
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
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.
 
Old 01-07-2010, 06:40 PM   #5
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
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?
 
Old 01-07-2010, 07:03 PM   #6
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
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!
 
Old 01-07-2010, 08:09 PM   #7
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
What Window Manager and/or Desktop Environment are you running?
 
Old 01-07-2010, 08:14 PM   #8
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
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
 
Old 01-07-2010, 08:40 PM   #9
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
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.
 
Old 01-17-2010, 05:34 PM   #10
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
Hi,
It is just the same with xterm -ls.

Thanks
 
Old 01-17-2010, 11:01 PM   #11
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by devnull10 View Post
btw, I have created a .xresources file in my home directory
Linux filenames are case sensitive ... it is supposed to be:

~/.Xresources
 
Old 01-18-2010, 04:05 AM   #12
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
Sorry, yes it was called that, I just didn't type it with the capital - me being lazy!
 
Old 01-18-2010, 06:15 PM   #13
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Original Poster
Rep: Reputation: 115Reputation: 115
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.
 
Old 01-21-2010, 10:55 PM   #14
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Your xterm console set to 80 characters?
maximise the window and see.
 
Old 03-12-2010, 10:33 AM   #15
gavinz
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Rep: Reputation: 1
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 "\]".
 
  


Reply


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
Sed append text to end of line if line contains specific text? How can this be done? helptonewbie Linux - Newbie 4 10-23-2013 01:48 PM
End-of-line Characters missing from last line of md5 file. Md5sum fails mehorter Linux - General 5 06-29-2009 08:56 PM
Attempting to append a line of text to the end of the previous line market_garden Linux - General 4 12-11-2008 11:37 AM
C: fread to read a file line by line until the end Blue_muppet Programming 2 09-19-2008 09:42 AM
php - Read file line by line and change a specific line. anrea Programming 2 01-28-2007 01:43 PM


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

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