[clug] Ubuntu Unity -> MC command line

Scott Ferguson scott.ferguson.clug at gmail.com
Wed Apr 22 22:39:50 MDT 2015


On 22/04/15 22:04, Bryan Kilgallin wrote:
> Hey Scott:
> 
>> mlocate mc.desktop /usr/share/applications/mc.desktop
>> 
>> grep 'Exec\|Terminal' /usr/share/applications/mc.desktop Exec=mc 
>> Terminal=true
> 
> I replicated that in a terminal window.
> 
>> Compare elinks.desktop to mc.desktop for evidence to support that 
>> suspicion.
> 
> The end of the elinks.desktop content says this. 
> {Exec=/usr/bin/elinks %u Terminal=true Icon=html 
> MimeType=text/html;}

The point of the exercise was to show that mc runs in a terminal, as
does elinks.

i.e. typing mc into a "run command" window in a desktop will only work
if the run command interpreter looks for the associated XDG desktop file
- in which case it will start a terminal and then execute the mc
command. If it simply executes the mc command nothing will happen. I'm
guessing you run GNOME, which supports the XDG standard, in which case
mc.desktop will be used - so any problems with gibberish will likely be
character encoding issues; your problems with key combinations will be
because they have been assigned to another program.


> 
> Whereas the end of the mc.desktop content says this. {Exec=mc 
> Icon=MidnightCommander Terminal=true Type=Application 
> Categories=ConsoleOnly;Utility;FileManager; # vi: encoding=utf-8}
> 
>> you 'could' then edit that file with "nano test.file" (which you
>> could also just type in the mc cli, or simply select it (if you've 
>> previously created it with the touch command) in mc and press F4
>> to edit it.
> 
> Under the Midnight Commander window, but above the command buttons,
> are two lines. The upper of those lists hints.
> 
> Beneath that is a blank line. When I had tried say alt-F1,
> characters had been displayed there (in this example, "1;3P"). But I
> otherwise do not know what to use this line for!


That blank line 'should' be a CLI - you simply type command in it. If
you need to see the output of a command press Ctrl+O to "switch out" of
mc. Mc will still be running and can be returned to by repeating the
command.  At the right-hand end of that CLI line you'll see [^],
clicking in that with your mouse will show your command history.

As you've previously noted - you have "hard hotkeyed" most of your key
combinations which breaks the built-in hotkey combinations for other
applications. You have a number of keys on your keyboard that you can
safely use for "hard" hotkey combinations. e.g. at a minimum you'll have
two "meta" keys (with the MS logo on a MS keyboard) and "drop-down"
button (between the right meta and Ctrl keys). You may also have
dedicated email, browser, and search buttons.
Usually the Ctrl and Alt combinations are pre-assigned as "soft-hotkeys"
- by which I mean they are contextual (do different things according to
which program has focus). If you are not careful when you create your
own hotkey combinations you will breaks stuff (as it appears you have
with mc).


Kind regards


More information about the linux mailing list