Suse linux midnight commander

SDB:Midnight Commander tips

Although Midnight Commander is a text mode application it can make use of mouse. The openSUSE delivered mc will make use of the mouse when used with a GUI console, without any further configuration needed.

The text mode terminal that we get when booting in runlevels 2 or 3 is a bit different story. You have to install the package gpm («general purpose mouse») which is also called mouse server. The gpm is used in Linux to receive movements and clicks from mouse. Start gpm and then start Midnight commander.

If you come to the text terminal using Ctrl + Alt + F1, then gpm will not work as another driver that belongs to GUI (X Server) claims control over the mouse.

Lynx like motion

This is browsing using the cursor keys. You have never seen graphical applications (like Konqueror) run this fast through directories.

openSUSE 11.4 and later

Main difference to older versions of Midnight Commander is different menu, so now we need Panel options instead of Configuration.

  1. Press F9 to select drop down menus on the top of the screen.
  2. Press Alt + o or move highlight with cursor keys for left or right to the Options, then press arrow down, to get drop down menu with options.
  3. Press arrow down to select Panel options and Enter key to open window with setup
  4. Press arrow down until you have selected [ ] Lynx-like motion, or , or ALT + y to jump directly.
  5. Press Space to check option. It will show [x] Lynx-like motion if it is active (enabled)
  6. Press Alt + s or move highlight to the [ Save ] and press Enter to save setting.

openSUSE 11.3 and earlier

  1. Press F9 to select drop down menus on the top of the screen.
  2. Press Alt + o or move highlight with cursor keys for left or right to the Options, then press arrow down, to get drop down menu with options.
  3. Press Alt + c or Enter to get dialog window Configuration with options.
  4. Now don’t use key shortcut, but use cursor key to move highlight to [ ] Lynx-like motion option,
  5. Press Space to check option. It will show [x] Lynx-like motion if it is active (enabled)
  6. Press Alt + s or move highlight to the [ Save ] and press Enter to save setting.

FTP browsing

This is file browsing on remote FTP server just as it is on your computer.

  1. Press F9 to select drop down menus on the top of the screen.
  2. Press Alt + L if you want to use left side panel, or Alt + R for right panel.
  3. Press Alt + P for input box where you have enter server name. Enter for instance
Читайте также:  Alt linux восстановление системы

Now mc will try anonymous connection to remote machine. If machine responds, you’ll get directory listing of /pub on remote server.

It is possible to do the same from mc command line by typing:

Archive browsing

Archive in classic meaning is compressed file. In Linux you can recognize them by suffix like:

and many more, but above few are the most used

That’s it. Midnight Commander will decompress file for you and present it’s internal structure like any other directory. If you want to extract one or all files from archive mark what you want toextract and use F5 to copy in another panel. Done.

RPM browsing

The package installation files for any SUSE are RPM and mc will let you browse them.

/INFO CONTENTS.cpio HEADER *INSTALL *UPGRADE

Browse to see details of your RPM.

The CONTENTS.cpio is actual archive with files, and if you want to see within:

The *INSTALL and *UPGRADE will do what the name tells, but if you want only to extract one or more files from CONTENTS.cpio than use F5 to copy them in the directory in the other panel.

PuTTY and line drawing

PuTTY is terminal application used to access remote computers running Linux via ssh (SSH tunnels from Microsoft Windows see details). The line drawing in Midnight Commander, YaST and another applications that draw lines using special characters can be displayed wrong as something else. The solution is to change settings:

  • menu: Window > Translation:
    • Received data assumed to be in which character set: UTF-8
    • Handling of line drawing characters: Use Unicode for line drawing

    If that doesn’t help, you may set this too:

    • menu: Connection > Connection-type string: linux
    • menu: Terminal > Keyboard > The Function keys and keypad: Linux

    User menu (F2 key) add-on

    Diffs in color

    + t r & ! t t d Diff against file of same name in other directory if [ "%d" = "%D" ]; then echo "The two directores must be different" exit 1 fi if [ -f %D/%f ]; then # if two of them, then diff -up %f %D/%f | sed -e 's/\(^-.*\)/\x1b[1;31m\1\x1b[0m/g' \ -e 's/\(^\+.*\)/\x1b[1;32m\1\x1b[0m/g' \ -e 's/\(^@.*\)/\x1b[36m\1\x1b[0m/g' | less -R else echo %f: No copy in %D/%f fi D Diff current directory against other directory if [ "%d" = "%D" ]; then echo "The two directores must be different" exit 1 fi diff -up %d %D | sed -e 's/\(^-.*\)/\x1b[1;31m\1\x1b[0m/g' \ -e 's/\(^\+.*\)/\x1b[1;32m\1\x1b[0m/g' \ -e 's/\(^@.*\)/\x1b[36m\1\x1b[0m/g' | less -R fi

    Here is place for your tips.

    Help

    For any question that has to be answered ASAP, Midnight Commander has built in online help. Press F1 and you’ll see.

    Источник

    mc on openSUSE Leap

    This tutorial shows how to install mc package:

    2. Uninstall / Remove mc package

    Please follow the steps below to uninstall mc package:

    3. Details of mc package

    Information for package mc:
    —————————
    Repository : Main Repository
    Name : mc
    Version : 4.8.26-bp153.1.1
    Arch : x86_64
    Vendor : openSUSE
    Installed Size : 3,0 MiB
    Installed : No
    Status : not installed
    Source package : mc-4.8.26-bp153.1.1.src
    Summary : Midnight Commander
    Description :
    GNU Midnight Commander (also referred to as MC) is a user shell much
    like the (in)famous Norton Commander with text-mode full-screen
    interface. It can be run on the OS console, in xterm and other
    terminal emulators.
    GNU Midnight Commander allows you to manage files while making most of
    your screen and giving you a clear representation of the filesystem, yet
    it’s simple enough to be run over a telnet or ssh session.
    MC needs several other programs for its various extfs extensions, e.g.
    isoinfo (from mkisofs) or xorriso for the iso:// extension.

    4. References on openSUSE Leap

    vim-plugin-a (2.18-bp153.1.14)

    gvfs-fuse (1.42.2-4.24)

    libretro-bluemsx (0~git20190902-bp153.1.14)

    texlive-babel-welsh (2017.135.1.1asvn38372-6.16)

    openvpn-devel (2.4.3-5.7.1)

    wordnet-devel (3.0-bp153.2.15)

    python2-requests-toolbelt (0.9.1-bp153.1.22)

    vim-plugin-conky (1.11.5-1.20)

    texlive-fei (2017.133.3.0.6svn43630-7.3.1)

    texlive-texlive.infra (2017.134.svn44462-5.18)

    libXaw-devel (1.0.13-3.3.8)

    milou5-lang (5.18.5-bp153.2.2.1)

    perl-Gnome2-VFS (1.082-bp153.1.22)

    texlive-luacode-doc (2017.133.1.2asvn25193-5.18)

    python3-phply (1.2.5-bp153.1.14)

    myspell-si_LK (20191219-3.21.1)

    5. The same packages on other Linux Distributions

    mc (3:4.8.19-1) Ubuntu 18.04 LTS (Bionic Beaver)

    mc (3:4.8.15-2) Ubuntu 16.04 LTS (Xenial Xerus)

    mc (3:4.8.26-1.1) Ubuntu 21.10 (Impish Indri)

    mc (4.8.27-1.1) openSuSE Tumbleweed

    mc (3:4.8.27-1) Ubuntu 22.04 LTS (Jammy Jellyfish)

    mc (3:4.8.22-1) Debian 10 (Buster)

    Источник

    Midnight Commander

    Midnight-commander-file-browser.png

    The Midnight Commander is file system browser and file manager for text mode. It has two panels (frames) where it can show content of 2 directories, 1 directory and view content of the selected file in another and more. The other often used features are embedded file viewer and plain text editor, very useful to see and edit content of configuration files.

    It is Swiss Army knife for console operations and once you learn it, you will ask yourself how you did it without. It will save you learning a lot of commands and its switches.

    Contents

    Installation

    To install Midnight Commander get root permissions and enter the following code in a terminal:

    Starting Midnight Commander

    Open console and type on command prompt:

    There are other ways to start mc. If you enter a directory, it will open in that directory

    will open the current directory and ~/.mc

    will open ~/.mc and /usr/share/mc

    The first directory will be in the pannel you were in the last time you opend mc. e.g. if you left mc with the right pannel selected, mc ~/.mc /usr/share/mc will open /usr/share/mc on the left and ~/.mc on the right.

    Capabilities

    One function that is not enabled by default that allows very fast browsing using cursor keys is Lynx like motion. It is the best frequently used Midnight Commander feature. It makes browsing a breeze that you can’t see with graphic based file managers.

    • Directory browsing
    • View files
    • View archives (compressed files)
    • Edit files
    • Execute commands
    • .

    Keyboard Shortcuts

    Common

    Enter has few functions:

    • if you have text in command line (one with command prompt, above function keys in the last) it will be executed as command
    • if command line is empty than it will do something with selected file in active panel:
      • if file is executable — it will be executed
      • if there is plugin able to open file it will be opened (rpm, tgz, gz, etc)

      Panel Functions

      • TAB is switching focus between left and right panel
      • Insert marks or removes mark on file(s)
      • Alt + g marks first file or directory in active panel
      • Alt + r marks middle file or directory in active panel
      • Alt + j marks last file or directory in active panel
      • Alt + s incremental search
      • Ctrl + / Look for filename given in last line of active panel (not whole screen), and jumps on first file
      • * marks removes marking for all files in active panel (not directories)
      • + (Plus) brings up the input box where it can be given regular expression. All files with names that fill condition(s) in regular expression will be marked.
      • \ (Backslash) remove marking for more data (opposite to «+»)

      Shell Functions

      • Alt + Enter copies selected filename in command line
      • Ctrl + Shift + Enter copies full path of selected file in the command line
      • Alt + H shows command line history

      Function Keys

      • F1 Help
      • F2 Opens user menu
      • F3 View selected file content
      • F4 Opens file in internal text editor
      • F5 Copies selected file. Default is to another panel, but it asks first.
      • F6 Moving file. Default is to another panel, but it asks first.
      • F7 Make directory.
      • F8 Delete file or directory.
      • F9 Opens main menu at the top of the screen.
      • F10 Ends current action; editor, viewer, dialog window or ends mc program.

      See Also

      Источник

      Как установить Midnight Commander в openSUSE 15.2

      openSUSE еще один достаточно популярный дистрибутив Linux. В этом 2020 году он вошел в ТОП 10 самых популярных дистрибутивов, точно уже не помню но вроде бы был на 8 месте, обогнав таких конкурентов как Elementary OS и Arch Linux. Раньше я не использовал openSUSE, но после того как увидел его в 10 лидеров решил установить и посмотреть на что он способен. Установлена была последняя версия openSUSE 15.2 Leap. После запуска я обнаружил отсутствие установленного по умолчанию файлового менеджера Midnight Commander.

      Так процесс установки пакетов в openSUSE немного отличается от всех остальных, решил написать об этом небольшую статью. Опишу все очень подробно что бы даже самый не опытный пользователь смог все понять.

      Рекомендую прочитать следующие статьи.

      openSUSE установка MC

      openSUSE у меня с оболочкой GNOME, для начала запускаем терминал, найти его можно через поиск.

      openSUSE 15.2 как запустить терминал

      Далее для установки пакетов необходимо получить права суперпользователя для этого вводим команду.

      openSUSE 15.2 как получить root права

      Если авторизация продет удачно localhost:/home/ad будет подсвечен красным цветом.

      Остается только ввести команду установки mc.

      и подтвердить установку введя y.

      openSUSE 15.2 как установить mc

      По окончанию установки можно запустить программу введя

      openSUSE 15.2 установка файлового менеджера mc

      Далее должен запуститься файловый менеджер MC.

      openSUSE 15.2 как запустить mc

      Вот таким образом можно установить файловый менеджер MC в openSUSE 15.2 Leap.

      Источник

Оцените статью
Adblock
detector