Как отключить консоль VT при запуске Ubuntu 20.04 на сервере Wayland

Благодаря советам от cas я смог создать этот рабочий процесс для решения проблемы с bash-скриптом. Это не идеально, потому что было бы лучше, если бы он сделал шаг для более быстрой работы (. Я бы хотел, чтобы у rsync была такая возможность ). Сценарий будет искать под текущей папкой файлы с помощью find, создавать список исключений, а затем использовать rsync из базового тома для перемещения всех остальных папок в папку для мусора, сохраняя полный путь под ним, чтобы любые ошибки можно было восстановить без разрушения.

Ссылка на текущее состояние, если это решение находится в ветке git dev-https://github.com/firehawkvfx/openfirehawk-houdini-tools/blob/dev/scripts/modules/trashcan.sh

#!/bin/bash

# trash everything below the current path that does not have a.protect file in
# the folder.  it should normally only be run from the folder such as
# 'job/seq/shot/cache' to trash all data below this path.

# see opmenu and firehawk_submit.py for tools to add protect files based on
# a top net tree for any given hip file.

argument="$1"

echo ""
ARGS=''

if [[ -z $argument ]] ; then
  echo "DRY RUN. To move files to trash, use argument -m after reviewing the exclude_list.txt and you are sure it lists everything you wish to protect from being moved to the trash."
  echo ""
  ARGS1='--remove-source-files'
  ARGS2='--dry-run'
else
  case $argument in
    -m|--move)
      echo "MOVING FILES TO TRASH."
      echo ""
      ARGS1='--remove-source-files'
      ARGS2=''
      ;;
    *)
      raise_error "Unknown argument: ${argument}"
      return
      ;;
  esac
fi

current_dir=$(pwd)
echo "current dir $current_dir"
base_dir=$(pwd | cut -d/ -f1-2)
echo "base_dir $base_dir"


source=$(realpath --relative-to=$base_dir $current_dir)/
echo "source $source"
target=trash/
echo "target $target"

# ensure trash exists at base dir.
mkdir -p $base_dir/$target
echo ""
echo "Build exclude_list.txt contents with directories containing.protect files"
find. -name.protect -print0 |
    while IFS= read -r -d '' line; do
        path=$(realpath --relative-to=. "$line")
        dirname $path
    done > exclude_list.txt

path_to_list=$(realpath --relative-to=. exclude_list.txt)
echo $path_to_list >> exclude_list.txt

cat exclude_list.txt

cd $base_dir

# run this command from the drive root, eg /prod.
rsync -a $ARGS1 --prune-empty-dirs --inplace --relative --exclude-from="$current_dir/exclude_list.txt" --include='*' --include='*/' $source $target $ARGS2 -v
cd $current_dir

0
09.09.2021, 18:25
1 ответ

В Gnome Wayland вы можете отменить привязку клавиш для переключения виртуального терминала, установив эти свойства dconf:

dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-1 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-2 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-3 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-4 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-5 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-6 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-7 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-8 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-9 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-10 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-11 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-12 "['']"
1
03.12.2021, 08:39

Теги

Похожие вопросы