LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-16-2010, 10:56 PM   #1
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Rep: Reputation: 17
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?

With thanks,
Narnie
 
Old 02-18-2010, 12:48 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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.
 
Old 02-18-2010, 09:39 PM   #3
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by GrapefruiTgirl View Post
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.

Yours,
Narnie
 
Old 02-18-2010, 09:57 PM   #4
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by narnie View Post
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.

Interesting.

Narnie
 
Old 02-19-2010, 12:03 AM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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
 
Old 02-19-2010, 08:40 PM   #6
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by GrapefruiTgirl View Post
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?

Narnie
 
Old 02-19-2010, 10:21 PM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
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

Sasha
 
  


Reply



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
Midnight Commander 4.6.2 (also 4.6.1) - F1 to F12 keys doesnt work dlugasx Solaris / OpenSolaris 1 06-25-2009 09:06 AM
[SOLVED] Midnight Commander hangs up console or xterm w1k0 Slackware 4 05-28-2008 08:11 PM
Midnight Commander - "The shell is already running a command" BiThian Linux - Desktop 9 09-16-2006 12:13 AM
Midnight Commander matombo Fedora 3 11-30-2005 12:41 PM
Running midnight commander from console ocgltd Linux - Software 1 09-23-2005 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration