Ctrl-enter doesn't work when running Midnight Commander in xterm
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Rep:
Ctrl-enter doesn't work when running Midnight Commander in xterm
When running MC in xterm or gnome-terminal, it doesn't seem to allow the use of Ctrl-enter and Ctr-shift-enter to copy marked files to the command line.
Does anyone know of another way to cause this to happen or a way to enable it under xterm/gnome-term?
I just tried that out to see what it did (never knew about that, thanks!) and it worked fine for me; therefore, it must be something specific to your system vs my system, or the way you are (or are not) starting xterm. I'm using Slackware; you're using Mint?
I'd venture a guess that it has something to do with either the TERMCAP file, or the INPUTRC file, both of which are located in /etc. I don't think there's a problem with either file (unless maybe it doesn't exist) but rather that your xterm is not making use of what's in the files.
What I would try first, is to make sure your xterm is starting with a $TERM variable that works for your system. On my system, I set TERM=xterm when I start xterm. This is done using the -tn argument to xterm, like so:
shell$ xterm -tn xterm
So, try starting xterm like above, and see if that helps. If not, then I might be off-track in thinking that this has something to do with the INPUTRC file.
If the above does not help, try in your xterm: press CTRL-v followed by CTRL-ENTER and make note of the character(s) that get printed. On my system, I get ^M -- do you get this too?
Also, you might find some useful information over here: http://www.ibiblio.org/mc/FAQ but do let us know how you make out, or if the trouble remains.
I suppose too, that this *might* be an MC configuration option, but upon looking at my mc's ini file, I did not see anything resembling an option to configure this functionality, so that kind of reinforces the idea that this has more to do with the xterm itself, than the mc.
Sasha
Last edited by GrapefruiTgirl; 02-18-2010 at 12:50 AM.
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Original Poster
Rep:
Quote:
Originally Posted by GrapefruiTgirl
I just tried that out to see what it did (never knew about that, thanks!) and it worked fine for me; therefore, it must be something specific to your system vs my system, or the way you are (or are not) starting xterm. I'm using Slackware; you're using Mint?
I'd venture a guess that it has something to do with either the TERMCAP file, or the INPUTRC file, both of which are located in /etc. I don't think there's a problem with either file (unless maybe it doesn't exist) but rather that your xterm is not making use of what's in the files.
What I would try first, is to make sure your xterm is starting with a $TERM variable that works for your system. On my system, I set TERM=xterm when I start xterm. This is done using the -tn argument to xterm, like so:
shell$ xterm -tn xterm
So, try starting xterm like above, and see if that helps. If not, then I might be off-track in thinking that this has something to do with the INPUTRC file.
If the above does not help, try in your xterm: press CTRL-v followed by CTRL-ENTER and make note of the character(s) that get printed. On my system, I get ^M -- do you get this too?
Also, you might find some useful information over here: http://www.ibiblio.org/mc/FAQ but do let us know how you make out, or if the trouble remains.
I suppose too, that this *might* be an MC configuration option, but upon looking at my mc's ini file, I did not see anything resembling an option to configure this functionality, so that kind of reinforces the idea that this has more to do with the xterm itself, than the mc.
Sasha
Sadly, xterm -tn xterm didn't work. Quoting the Ctrl-enter combo gives me ^M
I'm jealous it is working for you (but I'm glad it does for you).
I'm on a Mint systems and Ubuntu netbook remix boxes.
I'll try to look for the mc config file and have a look too. If you think posting if for comparison would be useful, let me know.
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Original Poster
Rep:
Quote:
Originally Posted by narnie
Sadly, xterm -tn xterm didn't work. Quoting the Ctrl-enter combo gives me ^M
I'm jealous it is working for you (but I'm glad it does for you).
I'm on a Mint systems and Ubuntu netbook remix boxes.
I'll try to look for the mc config file and have a look too. If you think posting if for comparison would be useful, let me know.
Yours,
Narnie
Like you, I didn't see anything in my config file (in debian it seems it is in /etc/mc/)
It is not specific to mc because if I go to a virtual terminal and do the ctrl-enter (paste selected names w/o paths onto command line) or ctrl-shift-enter (past select names with full paths) works fine.
Something having to do with gnome. It doesn't work in both gnome-terminal and xterm.
must have to do with some kind of keyboard trapping or keybinding.
If it works in a VT (virtual terminal) but does NOT work inside X in your gnome-terminal or xterm, I wonder if it is indeed something to do with the fact that *maybe* your xterm or gnome terminal is not being instantiated as a "login" terminal, as opposed to the VT which *is* a login terminal.
Some things to try (some repetition here, but we want to compare..):
1) open a xterm as your regular user -- try the ctrl-paste thing. Does it work?
2) in that same terminal, type (including the leading period):
Code:
. /etc/profile
and now try the ctrl-paste thing again. Does that work?
3) close the terminal and pop open a new fresh one. su to root, using only the `su` command, i.e. no trailing dash. Try ctrl-paste again. Does it work?
4) in that same terminal, as root, repeat that:
Code:
. /etc/profile
and try ctrl-paste again. Does it work?
If, as either user or root, the functionality does work after sourcing the /etc/profile file, then the workaround would be one of two things: either make sure that when you open a terminal, that it is a login terminal, OR: take the code from /etc/profile which is making this functionality work, and add it to your local shell config file, such as ~/.bashrc or ~/.bash_login or whatever the file might be.
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Original Poster
Rep:
Quote:
Originally Posted by GrapefruiTgirl
If it works in a VT (virtual terminal) but does NOT work inside X in your gnome-terminal or xterm, I wonder if it is indeed something to do with the fact that *maybe* your xterm or gnome terminal is not being instantiated as a "login" terminal, as opposed to the VT which *is* a login terminal.
Some things to try (some repetition here, but we want to compare..):
1) open a xterm as your regular user -- try the ctrl-paste thing. Does it work?
2) in that same terminal, type (including the leading period):
Code:
. /etc/profile
and now try the ctrl-paste thing again. Does that work?
3) close the terminal and pop open a new fresh one. su to root, using only the `su` command, i.e. no trailing dash. Try ctrl-paste again. Does it work?
4) in that same terminal, as root, repeat that:
Code:
. /etc/profile
and try ctrl-paste again. Does it work?
If, as either user or root, the functionality does work after sourcing the /etc/profile file, then the workaround would be one of two things: either make sure that when you open a terminal, that it is a login terminal, OR: take the code from /etc/profile which is making this functionality work, and add it to your local shell config file, such as ~/.bashrc or ~/.bash_login or whatever the file might be.
Sasha
Thank you so much for trying to troubleshoot this with me.
Ctrl-V (paste) has NEVER worked for me in xterm, so I thought it was just a feature it didn't support, thus I liked gnome-terminal (btw, this also doesn't work in gnome-terminal where Ctrl-V does work).
Thus for #1, no pasting. After sourcing the system profile in etc, still no pasting. Same for doing such as root.
/etc/profile is pretty spartan in Mint 8 (based on Ubuntu 9.10 Karmic). All it does is source profile.d, which only has a script I wrote that has nothing to do with these things, an ati-script, which does nothing as I'm not using those drivers. Also, it sets the terminal prompt, sources /etc/bash.bashrc and finally sets the umask.
Nothing that would seem to affect the terminal. I ran through /etc/bash.bashrc and my own bashes to no avail.
I wonder if it is the way Canonical compiled xterm?
I wonder if it is the way Canonical compiled xterm?
Hmm.. At this point, I dunno -- but to find out, you could recompile xterm and see. xterm is pretty easy to compile, though you'd need to do whatever minty-sorta-things are required to make yourself a Mint package from the compilation; I guess you use .DEB packages, but not being a Mint user, I cannot help with that part.
PS - I may have confused the issue by writing "try ctrl-paste", when what I meant was for you to try the "ctrl-ENTER" thing again. My apology if I got you to inadvertently try the wrong stuff
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.