MochiuWiki : SUSE, EC, PCB
案内
メインページ
最近の更新
おまかせ表示
MediaWiki についてのヘルプ
ツール
リンク元
関連ページの更新状況
特別ページ
ページ情報
We ask for
Donations
検索
個人用ツール
ログイン
Toggle dark mode
名前空間
ページ
議論
表示
閲覧
ソースを閲覧
履歴を表示
インストール - ターミナルのソースを表示
提供: MochiuWiki : SUSE, EC, PCB
←
インストール - ターミナル
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループのいずれかに属する利用者のみが実行できます:
管理者
、new-group。
このページのソースの閲覧やコピーができます。
== 概要 == 全てのLinuxディストリビューションには、ターミナルが既にプレインストールされている。<br> <br> ここでは、多くのLinuxディストリビューションで使用することができるターミナルについて記載する。<br> <br><br> == Gnome Terminal == ==== シェルの変更 ==== ===== 方法 1 ===== # Gnome Terminalを右クリックまたは[≡]ボタンを押下して、環境設定を開く。 # 設定プロファイルを開くまたは作成する。 # [Command]タブを選択する。 # [Run a custom command instead of my shell.]チェックボックスにチェックを入力する。 # [Custom command]項目に、Zsh等のシェルの実行ファイルのフルパスを入力する。 <br> ===== 方法 2 ===== 他の方法として、.bashrcファイルの1行目に、以下の設定を追記する。<br> <syntaxhighlight lang="bash"> [ -n "$GNOME_TERMINAL_SCREEN" ] && [ -x "$(command -v zsh)" ] && exec zsh "$@" </syntaxhighlight> <br> 上記の設定の説明を、以下に示す。<br> まず、<code>[ -n "$GNOME_TERMINAL_SCREEN" ]</code>コマンドを実行して、Gnome Terminalを確認する。<br> 次に、<code>[ -x "$(command -v zsh)" ]</code>コマンドを実行して、Zshのパスが存在するかどうかを確認する。<br> 最後に、<code>exec zsh "$@"</code>コマンドを実行して、Bashと同じ引数でZshを起動する。<br> <br> これにより、Gnome Terminalを起動する時、Zsh等のシェルが使用できる。<br> <br><br> == Drop Down Terminal == [https://github.com/anarchodin/gs-extensions-drop-down-terminal Drop Down Terminal]は、Gnome Shellのデスクトップ環境にインストールできるターミナルの拡張機能である。<br> カスタムスクロールバーの設定、カラースキーム、起動時にカスタムコマンドを起動する機能等、便利な機能が搭載されている。<br> <br> また、カスタマイズ性にも優れており、透明度、アニメーション、スクロールバーの表示、ウィンドウのサイズ、ホットキーボタンをカスタマイズすることができる。<br> <br> さらに、コマンド機能により、ユーザのデフォルトシェルではなく、カスタムのコマンドライン引数を実行することができる。<br> URL : https://extensions.gnome.org/extension/442/drop-down-terminal/<br> <br><br> == ST == STのビルドに必要な依存関係のライブラリをインストールする。<br> # CentOS sudo yum install xrdb libXft-devel libX11-devel harfbuzz-devel libXext-devel libXrender-devel libXinerama-devel # SUSE sudo zypper install xrdb libXft-devel libX11-devel harfbuzz-devel libXext-devel libXrender-devel libXinerama-devel <br> [https://st.suckless.org STの公式Webサイト]にアクセスして、ソースコードをダウンロードする。<br> ダウンロードしたファイルを解凍する。<br> tar xf st-<バージョン>.tar.gz cd st-<バージョン> <br> または、以下のコマンドを実行して、STのソースコードをダウンロードする。<br> git clone https://github.com/siduck/st.git ST cd ST <br> STをビルドおよびインストールする。<br> make clean install DESTDIR=$HOME/InstallSoftware/ST <br><br> == Kitty == ==== 実行ファイルをダウンロードする場合 ==== [https://github.com/kovidgoyal/kitty/releases KittyのGithub]にアクセスして、Kittyの実行ファイルをダウンロードする。<br> ダウンロードしたファイルを解凍する。<br> tar xf kitty-<バージョン>-x86_64.txz cd kitty-<バージョン>-x86_64 <br> 解凍したディレクトリを任意のディレクトリに配置する。<br> mv kitty-<バージョン>-x86_64 <Kittyのインストールディレクトリ> <br> ==== ソースコードからインストールする場合 ==== Kittyのビルドに必要な依存関係のライブラリをダウンロードする。<br> <u>ただし、Python 3.7以降が必要となることに注意する。</u><br> sudo zypper install gcc pkg-config dbus-1-devel libXcursor-devel libXrandr-devel libXi-devel libXinerama-devel \ libXcursor-devel libXrandr-devel Mesa-libGL-devel libxkbcommon-devel fontconfig-devel libX11-devel \ libxcb-devel liblcms2-devel libcanberra-devel ImageMagick-devel \ python39-devel python3-Pygments sphinx libsphinxclient-devel python3-Sphinx \ libb2-devel librsync-devel wayland-devel wayland-protocols-devel <br> もし、パッケージ管理システムが提供しているlibRsyncライブラリが古い場合、libRsyncライブラリを手動でインストールする必要がある。<br> [https://github.com/librsync/librsync/releases libRsyncのGithub]にアクセスして、ソースコードをダウンロードする。<br> ダウンロードしたファイルを解凍する。<br> tar xf librsync-<バージョン>.tar.gz cd librsync-<バージョン>.tar.gz <br> libRsyncをビルドおよびインストールする。<br> mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=<libRsyncのインストールディレクトリ> -DCMAKE_BUILD_TYPE=Release .. make -j $(nproc) make install <br> [https://github.com/kovidgoyal/kitty/releases KittyのGithub]にアクセスして、Kittyのソースコードをダウンロードする。<br> ダウンロードしたファイルを解凍する。<br> tar xf kitty-<バージョン>-x86_64.txz cd kitty-<バージョン>-x86_64 <br> Kittyをビルドおよびインストールする。<br> export LD_LIBRARY_PATH="/<libRsyncのインストールディレクトリ>/lib64:$LD_LIBRARY_PATH" && \ export CFLAGS="-I/<libRsyncのインストールディレクトリ>/include $CFLAGS" && \ ./setup.py linux-package --prefix=<Kittyのインストールディレクトリ> # または export LD_LIBRARY_PATH="/<libRsyncのインストールディレクトリ>/lib64:$LD_LIBRARY_PATH" && \ export CFLAGS="-I/<libRsyncのインストールディレクトリ>/include $CFLAGS" && \ make -j $(nproc) <br> <code>make</code>コマンドを実行してビルドした場合、Kittyの実行ファイルは以下に示すパスに存在する。<br> /<Kittyのソースコードディレクトリ>/kitty/launcher/kitty <br> ==== 共通 ==== Kittyのデスクトップエントリファイルを作成する。<br> vi ~/.local/share/applications/Kitty.desktop <br> # ~/.local/share/applications/Kitty.desktopファイル [Desktop Entry] Version=1.0 Type=Application Name=kitty GenericName=Terminal emulator Comment=Fast, feature-rich, GPU based terminal TryExec=/<Kittyのインストールディレクトリ>/bin/kitty Exec=/<Kittyのインストールディレクトリ>/bin/kitty Icon=/<Kittyのインストールディレクトリ>/share/icons/hicolor/scalable/apps/kitty Categories=System;TerminalEmulator; <br> Kittyを使用したURLランチャーのデスクトップエントリファイルを作成する。<br> vi ~/.local/share/applications/Kitty-Open.desktop <br> # ~/.local/share/applications/Kitty-Open.desktopファイル [Desktop Entry] Version=1.0 Type=Application Name=kitty URL Launcher GenericName=Terminal emulator Comment=Open URLs with kitty TryExec=/<Kittyのインストールディレクトリ>/bin/kitty Exec=/<Kittyのインストールディレクトリ>/bin/kitty +open %U Icon=/<Kittyのインストールディレクトリ>/share/icons/hicolor/scalable/apps/kitty Categories=System;TerminalEmulator; NoDisplay=true MimeType=image/*;application/x-sh;application/x-shellscript;inode/directory;text/*;x-scheme-handler/kitty; <br> ==== エラー ==== SSH接続において、矢印キー、Backspace、Delete、Home / End等のキーが効かない場合がある。<br> <br> SSH接続の場合、~/.terminfo/xディレクトリ(Linux)や~/.terminfo/78ディレクトリ(Mac)を作成して、以下に示すシンボリックリンクを貼る。<br> mkdir -p ~/.terminfo/{78,x} ln -snf /<Kittyのインストールディレクトリ>/share/terminfo/x/xterm-kitty ~/.terminfo/x/.terminfo <br><br> == Alacritty == ==== Alacrittyのインストール ==== ビルドに必要な依存関係のライブラリをインストールする。<br> # CentOS sudo yum install cmake cargo freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel xcb-util-devel sudo yum group install "Development Tools" # SUSE sudo zypper install cmake cargo freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel <br> [https://github.com/alacritty/alacritty/releases AlacrittyのGithub]にアクセスして、ソースコードをダウンロードする。<br> ダウンロードしたファイルを解凍する。<br> tar xf alacritty-<バージョン>.tar.gz cd alacritty-<バージョン> <br> または、以下のコマンドを実行して、Alacrittyのソースコードをダウンロードする。<br> git clone https://github.com/alacritty/alacritty.git Alacritty cd Alacritty <br> Alacrittyをビルドする。<br> # X11環境の場合 cargo build --release --features=x11 # Wayland環境の場合 cargo build --release --features=wayland <br> ビルドが正常に終了した場合、プロジェクトディレクトリにtarget/release/alacrittyファイルが生成される。<br> <br> ==== タブ機能の有効化 ==== Alacrittyはタブ機能が存在しない。<br> そのため、タブ機能を有効化するには、tmuxを使用する必要がある。<br> <br> tmuxのビルドに必要な依存関係のライブラリをインストールする。<br> sudo zypper install make pkg-config bison ncurses-devel libevent-devel <br> まず、tmuxのソースコードをダウンロードする。<br> https://github.com/tmux/tmux/releases/download/3.2a/tmux-3.2a.tar.gz <br> ダウンロードしたファイルを解凍する。<Br> tar xf tmux-<バージョン>.tar gz cd tmux-<バージョン> <br> ビルド用ディレクトリを作成する。<br> mkdir build && cd build <br> tmuxをビルドおよびインストールする。<br> ../configure --prefix=<tmuxのインストールディレクトリ> make -j $(nproc) make install <br> tmuxの設定ファイル(~/.tmux.confファイル)を作成する。<br> vi ~/.tmux.conf <br> # ~/.tmux.confファイル # Set prefix key to c-f instead of default c-b unbind C-b set -g prefix C-f bind C-f send-prefix set-option -g default-shell <シェルの実行ファイルのパス 例. /usr/bin/zsh> # toogle last window by hitting again C-f bind-key C-f last-window # if multiple clients are attached to the same window, maximize it to the bigger one set-window-option -g aggressive-resize # Start windows and pane numbering with index 1 instead of 0 set -g base-index 1 setw -g pane-base-index 1 # re-number windows when one is closed set -g renumber-windows on # word separators for automatic word selection setw -g word-separators ' @"=()[]_-:,.' setw -ag word-separators "'" # Show times longer than supposed set -g display-panes-time 2000 # tmux messages are displayed for 4 seconds set -g display-time 4000 # {n}vim compability set-option -ga terminal-overrides ",xterm-256color:Tc" set -g default-terminal "screen-256color" # Split horiziontal and vertical splits, instead of % and ". We also open them in the same directory. # Because we use widescreens nowadays, opening a vertical split that takes half of the screen is not worth. For vertical we only open 100 lines width, for horizontal it's 20 columns. bind-key v split-window -h -l 100 -c '#{pane_current_path}' bind-key s split-window -v -l 30 -c '#{pane_current_path}' # Pressing Ctrl+Shift+Left (will move the current window to the left. Similarly right. No need to use the modifier (C-b). bind-key -n C-S-Left swap-window -t -1 bind-key -n C-S-Right swap-window -t +1 # Source file unbind r bind r source-file ~/.tmux.conf \; display "Reloaded!" # Use vim keybindings in copy mode setw -g mode-keys vi # Update default binding of `Enter` and `Space to also use copy-pipe unbind -T copy-mode-vi Enter unbind -T copy-mode-vi Space bind-key -T edit-mode-vi Up send-keys -X history-up bind-key -T edit-mode-vi Down send-keys -X history-down # setup 'v' to begin selection as in Vim bind-key -T copy-mode-vi 'v' send-keys -X begin-selection # copy text with `y` in copy mode bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel # copy text with mouse selection without pressing any key bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel # emacs key bindings in tmux command prompt (prefix + :) are better than vi keys, even for vim users set -g status-keys emacs # focus events enabled for terminals that support them set -g focus-events on # Sync panes (Send input to all panes in the window). When enabled, pane borders become red as an indication. bind C-s if -F '#{pane_synchronized}' \ 'setw synchronize-panes off; \ setw pane-active-border-style fg=colour63,bg=default; \ setw pane-border-format " #P "' \ 'setw synchronize-panes on; \ setw pane-active-border-style fg=red; \ setw pane-border-format " #P - Pane Synchronization ON "' # Faster command sequence set -s escape-time 0 # Have a very large history set -g history-limit 1000000 # Mouse mode on set -g mouse on # Set title set -g set-titles on set -g set-titles-string "#T" # Equally resize all panes bind-key = select-layout even-horizontal bind-key | select-layout even-vertical # Resize panes bind-key J resize-pane -D 10 bind-key K resize-pane -U 10 bind-key H resize-pane -L 10 bind-key L resize-pane -R 10 # Select panes # NOTE(arslan): See to prevent cycling https://github.com/tmux/tmux/issues/1158 bind-key j select-pane -D bind-key k select-pane -U bind-key h select-pane -L bind-key l select-pane -R # Disable confirm before killing bind-key x kill-pane # List of plugins # see this https://github.com/tmux-plugins/tpm to installation set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' <br> tmuxでタブ機能を有効化して、Alacrittyを起動する。<br> /<Alacrittyのインストールディレクトリ>/alacritty -e /<tmuxのインストールディレクトリ>/bin/tmux <br><br> __FORCETOC__ [[カテゴリ:CentOS]][[カテゴリ:SUSE]][[カテゴリ:Raspberry_Pi]]
インストール - ターミナル
に戻る。
案内
メインページ
最近の更新
おまかせ表示
MediaWiki についてのヘルプ
ツール
リンク元
関連ページの更新状況
特別ページ
ページ情報
We ask for
Donations
Collapse