DEV Community

kaede
kaede

Posted on

Ubuntu ファイルマネージャーのサイドバーから Musics などを削除する

問題

Image description

全く使わない Starred, Desktop, Music, Vidoes,

これらがファイルマネージャーこと Files アプリの貴重な
サイドバーを専有していて邪魔。

GUI 操作では引っ込められない。

解決策

https://askubuntu.com/a/433646

Editing ~/.config/user-dirs.dirs 
and removing Pirtures/Music/Videos 
seems to remove them from the Places as well.
Enter fullscreen mode Exit fullscreen mode

このファイルから削除すればいけるらしい。

開いてみる。

vi ~/.config/user-dirs.dirs 

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
Enter fullscreen mode Exit fullscreen mode

~/.config/user-dirs.dirs を開く。

DESKTOP や DOCUMENT の実際の場所との関連付けのようだ?
とりあえず影響がなさそうな Music の行を消してみる。

これだけでは Files からは消えなかった

https://askubuntu.com/a/452322

このあと、~/.config/user-dirs.conf を作成し

enable=false を書き込んで再ログインする。

Image description

すると邪魔だった Music が消えた!やった!

Top comments (0)