Results 1 to 7 of 7

Thread: Midnight Commander on Main Menu doesn't work

  1. #1

    Default Midnight Commander on Main Menu doesn't work

    A minor issue for sure. I started using Midnight Commander recently. It loads fine as a terminal window, then entering the mc command. I noticed that it is also available as an icon in the main menu, under system tools. However it only opens a blank terminal window without a command line and no MC. Using the main menu editor shows that it is simply "run in terminal" and the command of "mc". That should work, but doesn't. Does anyone have a way to fix this minor glitch?

    Love MC, just would like to have a lazy single click command in the toolbar if possible.
    openSUSE Tumbleweed 64-bit / Cimmamon

  2. #2

    Default Re: Midnight Commander on Main Menu doesn't work

    Quote Originally Posted by idee View Post
    A minor issue for sure. I started using Midnight Commander recently. It loads fine as a terminal window, then entering the mc command. I noticed that it is also available as an icon in the main menu, under system tools. However it only opens a blank terminal window without a command line and no MC.
    Indeed!

    Quote Originally Posted by idee View Post
    Using the main menu editor shows that it is simply "run in terminal" and the command of "mc". That should work, but doesn't. Does anyone have a way to fix this minor glitch?
    Well, it could be a bug or wrong default in lxterminal. I don't have time to look at it closely, but here's a quick hack that should fix it - if you don't mind:

    open a terminal and type the following:

    Code:
    $ su -l
    # cp /usr/share/applications/mc.desktop{,.orig} && sed -i 's|Exec=mc|Exec=lxterminal -e mc|;s|Terminal=true|Terminal=false|' /usr/share/applications/mc.desktop
    That should fix it for all users. Please report if it does not.

    Quote Originally Posted by idee View Post
    Love MC, just would like to have a lazy single click command in the toolbar if possible.
    Probably one of the most useful programs in Linux and Unix history. That one should be on the live CD too!

  3. #3

    Default Re: Midnight Commander on Main Menu doesn't work

    Once it works (an it will), notice that you can change the default size of the terminal window. To do this, open the file /usr/share/applications/mc.desktop (the one we just modified) as root in a text editor and replace this line:

    Code:
    Exec=lxterminal -e mc
    with this one:

    Code:
    Exec=lxterminal --geometry=120x40 -e mc
    where you can obviously set any number of columns and rows you like.

  4. #4

    Default Re: Midnight Commander on Main Menu doesn't work

    Here's a diff that shows the changes applied to the .desktop file:

    Code:
    # diff -u /usr/local/share/applications/mc.desktop{.orig,}
    --- /usr/local/share/applications/mc.desktop.orig       2013-01-15 15:15:01.534588656 -0800
    +++ /usr/local/share/applications/mc.desktop    2013-01-15 15:33:03.175368878 -0800
    @@ -3,8 +3,8 @@
     Categories=X-Main;
     Type=Application
     Name=Midnight Commander
    -Exec=mc
    -Terminal=true
    +Exec=lxterminal --geometry=120x40 -e mc
    +Terminal=false
     Icon=mc
    * It should be /usr/share/applications in your case.

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Midnight Commander on Main Menu doesn't work

    On 2013-01-16 00:36, please try again wrote:
    > Probably one of the most useful program in Linux and Unix history. That
    > one should be on the live CD too!


    Indeed.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))

  6. #6

    Default Re: Midnight Commander on Main Menu doesn't work

    Quote Originally Posted by please_try_again View Post
    with this one:

    Code:
    Exec=lxterminal --geometry=120x40 -e mc
    where you can obviously set any number of columns and rows you like.
    Thanks! One additional note for the launch bar. It seems that the mc.desktop is copied, as opposed to linked into the launch bar. So any changes made in the config (screen size) were not active in the launch bar button until it was reopened, deleted, and a fresh mc placed back into the launch bar.

    Love it, and thanks!
    openSUSE Tumbleweed 64-bit / Cimmamon

  7. #7

    Default Re: Midnight Commander on Main Menu doesn't work

    Quote Originally Posted by idee View Post
    Thanks! One additional note for the launch bar. It seems that the mc.desktop is copied, as opposed to linked into the launch bar. So any changes made in the config (screen size) were not active in the launch bar button until it was reopened, deleted, and a fresh mc placed back into the launch bar.
    That's correct.

    Quote Originally Posted by idee View Post
    Love it, and thanks!
    You're welcome.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •