Ubuntu: How to Mount iso, Bin And Cue Files Directly From Nautilus - Об ОС *Nix - Системное администрирование - Каталог статей - Архив документации и мануалов для админов

Пятница, 31.10.2014, 21:25
Приветствую Вас Гость | RSS
Мой сайт
Главная
Регистрация
Вход
Форма входа

Меню сайта

Категории раздела
Об ОС Windows [113]
В категории размещаются статьи, касающщиеся операционных систем от Microsoft.
Об ОС *Nix [185]
В данной категории собраны статьи об ОС семейства Unix/Linux/FreeBSD/...
Справочные материалы [313]
Справка по всему разделу.
Виртуализация и Облака [41]
Networks & Routing [81]
DataBases [20]

Наш опрос
Оцените мой сайт
Всего ответов: 181

Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0

Главная » Статьи » Системное администрирование » Об ОС *Nix

Ubuntu: How to Mount iso, Bin And Cue Files Directly From Nautilus

Ubuntu: How to Mount iso, Bin And Cue Files Directly From Nautilus

nautilus-mount-logoWe have covered the easy way to mount iso images in Windows. This time round, we are going to cover the easy way to mount an iso, bin or cue file in Ubuntu without having to hit the terminal every time.

With the use of fuesiso and nautilus-actions, we can easily create an option in Nautilus to mount the CD images right from the context menu (mouse right click).

Here it goes:

First, install fuseiso and nautilus actions

sudo apt-get install fuseiso nautilus-actions
sudo usermod -a -G fuse username

Change the username to your login name

Logout and back in.

Download the userisomount.sh script to your home folder.

Copy it to /usr/local/bin/ folder and make it executable.

sudo mv ~/userisomount.sh /usr/local/bin/
sudo chown root:fuse /usr/local/bin/userisomount.sh
sudo chmod 754 /usr/local/bin/userisomount.sh

Download the Nautilus Actions Schemas for MOUNTING and UNMOUNTING disk images.

If you are using Ubuntu Jaunty, do the following:

1. Open the MOUNTING and UNMOUNTING schemas with gedit

2. Locate the line with the code <default>1.1</default>

3. Replace it with <default>2.0</default>

4. Save and close the files.

Open up Nautilus Actions Configuration (System->Preferences->Nautilus Actions Configuration). Import the two files into Nautilus Actions.

Save and close Nautilus Actions.

In your terminal, restart Nautilus

killall nautilus

You should be able to find a  Mount Disk Image on the context menu of your Nautilus now.

nautilus-context

To mount a iso, bin or cue file, simply right click and choose Mount Disk Image from the menu.



mount.schemas


<gconfschemafile>
<schemalist>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/label</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/label</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<default>Mount Disk Image</default>
<short>The label of the menu item</short>
<long>The label of the menu item that will appear in the Nautilus popup menu when the selection matches the appearance condition settings</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/tooltip</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/tooltip</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<default></default>
<short>The tooltip of the menu item</short>
<long>The tooltip of the menu item that will appear in the Nautilus statusbar when the user points to the Nautilus popup menu item with his/her mouse</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/icon</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/icon</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The icon of the menu item</short>
<long>The icon of the menu item that will appear next to the label in the Nautilus popup menu when the selection matches the appearance conditions settings</long>
</locale>
<default>gtk-cdrom</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/path</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/path</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The path of the command</short>
<long>The path of the command to start when the user select the menu item in the Nautilus popup menu</long>
</locale>
<default>/usr/local/bin/userisomount.sh</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/parameters</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/parameters</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The parameters of the command</short>
<long>The parameters of the command to start when the user selects the menu item in the Nautilus popup menu.

The parameters can contain some special tokens which are replaced by Nautilus information before starting the command:

%d: base folder of the selected file(s)
%f: the name of the selected file or the first one if many are selected
%m: space-separated list of the basenames of the selected file(s)/folder(s)
%M: space-separated list of the selected file(s)/folder(s), with their full paths
%u: GnomeVFS URI
%s: scheme of the GnomeVFS URI
%h: hostname of the GnomeVFS URI
%U: username of the :%s/GnomeVFS URI
%%: a percent sign</long>
</locale>
<default>mount %M</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/basenames</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/basenames</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of pattern to match the selected file(s)/folder(s)</short>
<long>A list of strings with joker '*' or '?' to match the name of the selected file(s)/folder(s). Each selected items must match at least one of the filename patterns for the action to appear</long>
</locale>
<default>[*.iso,*.nrg,*.bin,*.img,*.mdf]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/matchcase</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/matchcase</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the filename patterns have to be case sensitive, 'false' otherwise</short>
<long>If you need to match a filename in a case-sensitive manner, set this key to 'true'. If you also want, for example '*.jpg' to match 'photo.JPG', set 'false'</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/mimetypes</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/mimetypes</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of patterns to match the mimetypes of the selected file(s)</short>
<long>A list of strings with joker '*' or '?' to match the mimetypes of the selected file(s). Each selected items must match at least one of the mimetype patterns for the action to appear</long>
</locale>
<default>[*/*]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/isfile</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/isfile</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have files, 'false' otherwise</short>
<long>This setting is tied in with the 'isdir' setting. The valid combinations are:

isfile=TRUE and isdir=FALSE: the selection may hold only files
isfile=FALSE and isdir=TRUE: the selection may hold only folders
isfile=TRUE and isdir=TRUE': the selection may hold both files and folders
isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
</locale>
<default>true</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/isdir</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/isdir</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have folders, 'false' otherwise</short>
<long>This setting is tied in with the 'isfile' setting. The valid combinations are:

isfile=TRUE and isdir=FALSE: the selection may hold only files
isfile=FALSE and isdir=TRUE: the selection may hold only folders
isfile=TRUE and isdir=TRUE': the selection may hold both files and folders
isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/accept-multiple-files</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/accept-multiple-files</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have several items, 'false' otherwise</short>
<long>If you need one or more files or folders to be selected, set this key to 'true'. If you want just one file or folder, set 'false'</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/schemes</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/schemes</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of GnomeVFS schemes where the selected files should be located</short>
<long>Defines the list of valid GnomeVFS schemes to be matched against the selected items. The GnomeVFS scheme is the protocol used to access the files. The keyword to use is the one used in the GnomeVFS URI.

Examples of GnomeVFS URI include:
file:///tmp/foo.txt
sftp:///root@test.example.net/tmp/foo.txt

The most common schemes are:

'file': local files
'sftp': files accessed via SSH
'ftp': files accessed via FTP
'smb': files accessed via Samba (Windows share)
'dav': files accessed via WebDav

All GnomeVFS schemes used by Nautilus can be used here.</long>
</locale>
<default>[file]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/version</key>
<applyto>/apps/nautilus-actions/configurations/80b444cb-f091-44ba-83b4-51e214d966f1/version</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The version of the configuration format</short>
<long>The version of the configuration format that will be used to manage backward compatibility</long>
</locale>
<default>1.1</default>
</schema>
</schemalist>






umount.schemas




<gconfschemafile>
<schemalist>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/label</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/label</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<default>Umount Disk Image</default>
<short>The label of the menu item</short>
<long>The label of the menu item that will appear in the Nautilus popup menu when the selection matches the appearance condition settings</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/tooltip</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/tooltip</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<default></default>
<short>The tooltip of the menu item</short>
<long>The tooltip of the menu item that will appear in the Nautilus statusbar when the user points to the Nautilus popup menu item with his/her mouse</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/icon</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/icon</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The icon of the menu item</short>
<long>The icon of the menu item that will appear next to the label in the Nautilus popup menu when the selection matches the appearance conditions settings</long>
</locale>
<default>gtk-cdrom</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/path</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/path</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The path of the command</short>
<long>The path of the command to start when the user select the menu item in the Nautilus popup menu</long>
</locale>
<default>/usr/local/bin/userisomount.sh</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/parameters</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/parameters</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The parameters of the command</short>
<long>The parameters of the command to start when the user selects the menu item in the Nautilus popup menu.

The parameters can contain some special tokens which are replaced by Nautilus information before starting the command:

%d: base folder of the selected file(s)
%f: the name of the selected file or the first one if many are selected
%m: space-separated list of the basenames of the selected file(s)/folder(s)
%M: space-separated list of the selected file(s)/folder(s), with their full paths
%u: GnomeVFS URI
%s: scheme of the GnomeVFS URI
%h: hostname of the GnomeVFS URI
%U: username of the :%s/GnomeVFS URI
%%: a percent sign</long>
</locale>
<default>umount %M</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/basenames</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/basenames</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of pattern to match the selected file(s)/folder(s)</short>
<long>A list of strings with joker '*' or '?' to match the name of the selected file(s)/folder(s). Each selected items must match at least one of the filename patterns for the action to appear</long>
</locale>
<default>[*.iso.desktop,*.nrg.desktop,*.bin.desktop,*.img.desktop,*.mdf.desktop]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/matchcase</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/matchcase</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the filename patterns have to be case sensitive, 'false' otherwise</short>
<long>If you need to match a filename in a case-sensitive manner, set this key to 'true'. If you also want, for example '*.jpg' to match 'photo.JPG', set 'false'</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/mimetypes</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/mimetypes</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of patterns to match the mimetypes of the selected file(s)</short>
<long>A list of strings with joker '*' or '?' to match the mimetypes of the selected file(s). Each selected items must match at least one of the mimetype patterns for the action to appear</long>
</locale>
<default>[*/*]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/isfile</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/isfile</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have files, 'false' otherwise</short>
<long>This setting is tied in with the 'isdir' setting. The valid combinations are:

isfile=TRUE and isdir=FALSE: the selection may hold only files
isfile=FALSE and isdir=TRUE: the selection may hold only folders
isfile=TRUE and isdir=TRUE': the selection may hold both files and folders
isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
</locale>
<default>true</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/isdir</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/isdir</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have folders, 'false' otherwise</short>
<long>This setting is tied in with the 'isfile' setting. The valid combinations are:

isfile=TRUE and isdir=FALSE: the selection may hold only files
isfile=FALSE and isdir=TRUE: the selection may hold only folders
isfile=TRUE and isdir=TRUE': the selection may hold both files and folders
isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/accept-multiple-files</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/accept-multiple-files</applyto>
<owner>nautilus-actions</owner>
<type>bool</type>
<locale name="C">
<short>'true' if the selection can have several items, 'false' otherwise</short>
<long>If you need one or more files or folders to be selected, set this key to 'true'. If you want just one file or folder, set 'false'</long>
</locale>
<default>false</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/schemes</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/schemes</applyto>
<owner>nautilus-actions</owner>
<type>list</type>
<list_type>string</list_type>
<locale name="C">
<short>The list of GnomeVFS schemes where the selected files should be located</short>
<long>Defines the list of valid GnomeVFS schemes to be matched against the selected items. The GnomeVFS scheme is the protocol used to access the files. The keyword to use is the one used in the GnomeVFS URI.

Examples of GnomeVFS URI include:
file:///tmp/foo.txt
sftp:///root@test.example.net/tmp/foo.txt

The most common schemes are:

'file': local files
'sftp': files accessed via SSH
'ftp': files accessed via FTP
'smb': files accessed via Samba (Windows share)
'dav': files accessed via WebDav

All GnomeVFS schemes used by Nautilus can be used here.</long>
</locale>
<default>[file]</default>
</schema>
<schema>
<key>/schemas/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/version</key>
<applyto>/apps/nautilus-actions/configurations/5398640c-aacf-496b-9a2f-ce2a9fd74116/version</applyto>
<owner>nautilus-actions</owner>
<type>string</type>
<locale name="C">
<short>The version of the configuration format</short>
<long>The version of the configuration format that will be used to manage backward compatibility</long>
</locale>
<default>1.1</default>
</schema>
</schemalist>





userisomount.sh


#! /bin/bash

MOUNTDIR="$HOME/.mymounts"
USEICON="gnome-dev-removable"

case "$1" in
mount)
FILE=`basename "$2"`
MOUNTPOINT="$MOUNTDIR/$FILE"

#Create the mountpoint and any parent directories necessary
mkdir -p "$MOUNTPOINT"

#Mount the file at the mountpoint
fuseiso "$2" "$MOUNTPOINT"

#Create a .desktop entry file on the user's desktop
#that points to the mounted filesystem
#specify the name of the icon if you wish to change it
echo -e "\
[Desktop Entry]\n\
Encoding=UTF-8\n\
Name=$FILE\n\
Comment=$FILE mounted at $MOUNTPOINT\n\
Type=Link\n\
Icon=$USEICON\n\
URL=$MOUNTPOINT"\
> $HOME/Desktop/$FILE.desktop

#Create a gtk bookmark so that the mount appears in the
#places panel and menu.
echo "file://$MOUNTPOINT" >> $HOME/.gtk-bookmarks
;;
umount | unmount)
FILE=`basename "$2" .desktop`
MOUNTPOINT="$MOUNTDIR/$FILE"

#Unmount the file system
fusermount -u "$MOUNTPOINT"

#Remove the gtk bookmark
sed -i "\,file://$MOUNTPOINT,d" $HOME/.gtk-bookmarks

#Remove the mountpoint
rmdir "$MOUNTPOINT"

#Remove the desktop icon
rm $HOME/Desktop/$FILE.desktop
;;
clean)
#if any mountpoints exist in the mount directory
if find $MOUNTDIR/* -maxdepth 0 > /dev/null
then
#For each mountpoint in the mount directory
for MOUNTS in $MOUNTDIR/*
do
FILE=`basename "$MOUNTS"`

#Unmount the filesystem if it's mounted
fusermount -u "$MOUNTS"

#Remove the bookmark if it exists
sed -i "\,file://$MOUNTS,d" $HOME/.gtk-bookmarks

#Remove the mountpoint
rmdir "$MOUNTS"

#Remove the desktop icon if it exists
if [ -e $HOME/Desktop/$FILE.desktop ]
then
rm $HOME/Desktop/$FILE.desktop
fi
done
fi
;;
*)
echo "Syntax:"
echo " Mount a filesystem image: "
echo " ./userisomount.sh mount filename"
echo " Unmount a filesystem image: "
echo " ./userisomount.sh umount ~/Desktop/filename.desktop"
echo " Clean up mounts, eg. after a system restart or crash:"
echo " ./userisomount.sh clean"
echo
echo "The script is intended to be called using the nautilus-actions plugin"
echo "for mounting and unmounting .iso, .img, .bin, .mdf, and .nrg disk images"
echo "from within the gnome desktop environment."
echo
echo "The clean option should be made to run on startup to clean-up any"
echo "changes left over after a system restart."
;;
esac



</gconfschemafile>



</gconfschemafile>





Источник: http://maketecheasier.com/mount-iso-bin-and-cue-files-from-nautilus/2009/05/23
Категория: Об ОС *Nix | Добавил: admin (24.10.2011)
Просмотров: 3101 | Теги: Ubuntu, ISO, Mount, CUE | Рейтинг: 0.0/0
Всего комментариев: 0
Имя *:
Email:
Код *:
Поиск

Друзья сайта
  • Создать сайт
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz
  • Все проекты компании


  • Copyright MyCorp © 2014
    Бесплатный хостинг uCoz