Ubuntu'yu belirli bir programdaki dosyaları (ör. File.tex) belirli bir programla (örn. Emacs) açacak şekilde nasıl yapılandırabilirim?
Ubuntu'yu belirli bir programdaki dosyaları (ör. File.tex) belirli bir programla (örn. Emacs) açacak şekilde nasıl yapılandırabilirim?
Yanıtlar:
Nautilus'u çalıştırın , bu dosyalardan birine sağ tıklayın, içerik menüsünden "Özellikler" i seçin ve "Birlikte aç" seçeneğiyle tercihlerinizi ayarlayın.
Defaults.list dosyasını düzenlemek yerine, xdg-mime programını kullanmayı daha kolay buluyorum. PDF görüntüleyiciyi aramak, kerpiçini görmek ve KPDF'ye geçirmek:
$xdg-mime query default application/pdf
AdobeReader.desktop
$xdg-mime default kde-kpdf.desktop application/pdf
$xdg-mime query default application/pdf
kde-kpdf.desktop
Ve tercih ettiğiniz uygulama ile bir dosya açmak için xdg-open kullanabilirsiniz:
$xdg-open file.pdf
Manni'nin işaret ettiği gibi, dosyayı açmak için kullanılan programı değiştirmek için dosyadaki Özellikler sekmesini kullanabilirsiniz.
Düzenleme: Chris089 en göz at cevap . Aşağıda önerdiğim gibi dosyaları doğrudan düzenlemeyi tercih ederim. Mime tiplerinin ne olduğunu ve derneklerin nerede olduğunu bilmek hala yararlı olabilir, ancak dosyayı değiştirmek için aracı kullanırım.
Ancak, metin tabanlı bir çözüm istiyorsanız veya hatta dosya ilişkilendirmelerinin farklı türler için nasıl yapılandırıldığına bir göz atmak istiyorsanız:
$ cat ~ / .local / share / apps / defaults.list
[Varsayılan Uygulamalar]
application / vnd.google-earth.kml + xml = Google-googleearth.desktop
application / keyhole = Google-
googleearth.desktop uygulama / earthviewer = Google- googleearth.desktop
uygulama / vnd.google-earth.kmz = Google-googleearth.desktop
$ cat /usr/share/applications/defaults.list | grep ^ ses
ses / 3gpp = totem.desktop
ses / ac3 = totem.desktop
ses / AMR = totem.desktop
ses / AMR-WB = totem.desktop
ses / temel = totem.desktop
ses / midi = totem.desktop
ses / mp4 = totem.desktop
ses / mpeg = totem.desktop
ses / mpegurl = totem.desktop
ses / ogg = totem.desktop
ses / prs.sid = totem.desktop
ses / vnd.rn-realaudio = totem.desktop
ses / x-maymun = totem.desktop
ses / x-flac = totem.desktop
ses / x-gsm = totem.desktop
ses / x-it = totem.desktop
ses / x-m4a = totem.desktop
ses / x-matroska = totem.desktop
ses / x-mod = totem.desktop
ses / x-mp3 = totem.desktop
ses / x-mpeg = totem.desktop
ses / x-mpegurl = totem.desktop
ses / x-ms-asf = totem.desktop
ses / x -ms-asx = totem.desktop
ses / x-ms-wax = totem.desktop
ses / x-ms-wma = totem.desktop
ses / x-musepack = totem.desktop
ses / x-pn-aiff = totem.desktop
ses / x-pn-au = totem.desktop
ses / x-pn-realaudio = totem.desktop
ses / x-pn-realaudio-plugin = totem.desktop
ses / x-pn-wav = totem.desktop
ses / x- pn-windows-acm = totem.desktop
ses / x-realaudio = totem.desktop
ses / x-real-audio = totem.desktop
ses / x-sbc = totem.desktop
ses / x-scpls = totem.desktop
ses / x-speex = totem.desktop
ses / x-tta = totem.desktop
ses / x-wav = totem.desktop
ses / x-wavpack = totem.desktop
ses / x-vorbis = totem.desktop
ses / x-vorbis + ogg = totem.desktop
ses / x-xm = totem.desktop
İşte bir .desktop dosyası (çalıştırılabilir dosyanın yolunu kullanmak yerine) gereksinimini ve kullanımını ayrıntılarıyla gösteren Masaüstü Giriş Belirtimi belgesi.