You are not logged in.
Pages: 1
Hello everyone, I have 3 issues when working from a terminal. 2 of these have been discussed here, however the solutions provided there do not work for me. Also, the thread is over 2 years old so let me explain my own problems...
Firstly, line breaking doesn't seem to work properly. When a line exceeds the window width, it does get broken but instead of continuing on a new row, the current row is being overwritten. Like this:
it should work!!n@thinkpad][~]$ this is not how This happends when using my usual xfce4-terminal but also on xterm. When using 'su' then only the first command I enter gets broken wrongly, but the following commands are broken properly onto new lines. Interestingly, it doesn't work when logging in as root on a tty.
I do have a fancy PS1 with colors and all but disabling those doesn't help. Also,
shopt -s checkwinsizein .bashrc doesn't help, altough I didn't expect that to since the window width doesn't seem to be the issue here.
Secondly, deleting umlauts doesn't work. When typing a command that contains an umlaut (like in a path) and I delete it (doesn't matter whether by using delete or backspace) it is removed but the resulting command contains a question mark in a diamond - like this:
bash: foo: command not foundHere I entered "föo", deleted "ö" and added another "o". The question-mark-diamond is after the "f" in "foo".
This problem appears exactly the same when logging on tty as root but when entering 'su' then I see that, apparently umlauts consist of two codes ("\303\266" for "ö") and that only the latter code is being removed (and "\303" remains). How can I get rid of this?
Thirdly, an issue I am not quite sure how it's caused. The only place where I'm certain it appears every time is when watching a video on VLC. If I finish watching a video I want to remove it so I use the "up"-arrow to get the previous command, press "home", enter "rm" and press "delete" three times so I get
rm /path/to/video. However, whenever a character of the command is altered, the whole line is copied to the line *above*. This is how it may look:
[0x209b148] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0 ✓][13:10][me@thinkpad][/data/video]$ rm^C accept value "0"
[130✗][13:11][me@thinkpad][/data/video]$
[0 ✓][13:10][me@thinkpad][/data/video]$ rmlc misc/VID_20140802_113808.mp4
[0 ✓][13:10][me@thinkpad][/data/video]$ rmvlc misc/VID_20140802_113808.mp4
0 ✓][13:10][me@thinkpad][/data/video]$ rvlc misc/VID_20140802_113808.mp4
[0 ✓][13:10][me@thinkpad][/data/video]$ vlc misc/VID_20140802_113808.mp4When I delete "vlc" before entering "rm" then this doesn't happen, however my cursor is on one of the lines above like this:
Fontconfig warning: FcPattern object size does not accept value "0"
[0 ✓][13:12][me@thinkpad][/data/video]$ rm to resize displayEspecially with problem 1 and 3 I don't even know what might be the cause. Any help is appreciated :-)
Last edited by mystyfly (2014-09-16 12:14:31)
Offline
Check that your locale is correctly set. Make sure you aren't setting a TERM anywhere in your shell files and, just for kicks, paste your PS1 anyway...
Offline
About setting the locale "correctly", that has been quite tricky, I eventually copied the settings from a friend which worked. How would I make sure that it is correct?
I never (on purpose) set TERM anywhere. This is info that was posted in the other thread as well:
$ set | grep -i termCOLORTERM=xfce4-terminal
TERM=xterm
_terms ()
COMPREPLY+=($( compgen -W "$( sed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap 2>/dev/null )" -- "$cur" ));I'm not really sure what that means, especially the "_terms" function...
My PS1 (with welcome text):
echo -e '\e[0;37m'Welcome to the '\e[1;34m'other side'\e[0;37m'...
echo ''
PS1="\[\033[1;30m\][\[\033[01;37m\]\$?\$(if [[ \$? == 0 ]]; then echo \" \[\033[01;32m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi)\[\033[1;30m\]][\[\033[1;37m\]\A\[\033[1;30m\]][\[\033[1;37m\]\u\[\033[1;30m\]@\[\033[1;37m\]\h\[\033[1;30m\]][\[\033[1;37m\]\w\[\033[1;30m\]]\[\033[1;34m\]\$\[\033[0;37m\] "I don't think the PS1 is the problem, since the problems persist when logging in as root. I have that "\[ ... \]" since I'm using colors.
Does this help somehow?
Offline
Read the wiki page to correctly set your locale; "copied the settings from a friend" doesn't sound all that promising...
Grep your shell initialization files for TERM: make sure you aren't forcing it anywhere.
That PS1 is ridiculous.
Offline
I've had issues with the locale all the time and that was the first config that seemed to work for me. Will recheck that though. That might fix the delete-umlaut-problem but I don't see how that would impact the other two. How might those be caused?
What do you mean by forcing TERM?
Haha that PS1 mostly consists of various parts found in the Wiki page here ![]()
Offline
Forcing the term would be setting `export TERM=xterm` or something like that in one of your shell start up files (.bashrc etc).
Replace the PS1 with the vanilla one and try and replicate.
Offline
Awesome, thanks! Turns out that the locale was indeed the problem. I recently reinstalled arch and often used config files that worked in my previous installation, like locale.gen. However, it seems I forgot to copy locale.conf. Adding that did the trick, removing umlaute works properly now.
The other two problems were fixed that way as well: They were apparently caused by the tick/cross mark I used in PS1 depending on the exit code of the previous command. I used their unicode (I think) which, combined with the faulty locale, caused the problems. My monster PS1 works properly again ![]()
Offline
Pages: 1