richpri
June 14th, 2012, 04:34 PM
I am running UBUNTU 11.10 and Gnome 3 [not UNITY].
I am attempting to add a custom file association for a application called Rails. This application has nothing to do with "Ruby on rails".
Here are the steps I followed:
1. Placed this Overrides.xml file on /usr/share/mime/packages
<?xml version='1.0' encoding='utf-8'?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/rails">
<glob pattern="*.rails"/>
</mime-type>
</mime-info>
2. Executed update-mime-database /usr/share/mime
3. Placed this desktop file in /usr/share/applications/rails.desktop
[Desktop Entry]
Exec=/home/rich/Rails/rails.sh %U
Version=1.1
Name=Rails for 18xx
GenericName=Rails
X-GNOME-FullName=Rails for 18xx
Comment=This is the 18xx game software
Path=/home/rich/rails
Icon=/home/rich/rails/logo.png
StartupNotify=true
Terminal=false
Type=Application
4. Added this line to /usr/share/applications/defaults.list
application/rails=rails.desktop
5. Logged out and back in.
But when I select a .rails file nothing happens!
What am I doing wrong?
By the way the directory for /home/rich/Rails is
-rw-rw-r-- 1 rich rich 366721 2012-06-13 21:39 18xx.log
-rw-r--r-- 1 rich rich 745 2012-05-30 06:14 AUTHORS
drwxr-xr-x 9 rich rich 4096 2012-05-30 06:14 lib
-rw-r--r-- 1 rich rich 18009 2012-05-30 06:14 LICENSE
-rw-r--r-- 1 rich rich 3467059 2012-05-30 06:14 rails-1.7.5.jar
-rwxr-xr-x 1 rich rich 43 2012-05-30 06:14 rails.sh
-rw-r--r-- 1 rich rich 738 2012-05-30 06:14 README
-rw-r--r-- 1 rich rich 611 2012-05-30 06:14 readme.txt
and /home/rich/Rails/rails.sh contains
#!/bin/bash
java -jar ./rails-1.7.5.jar $1
I am attempting to add a custom file association for a application called Rails. This application has nothing to do with "Ruby on rails".
Here are the steps I followed:
1. Placed this Overrides.xml file on /usr/share/mime/packages
<?xml version='1.0' encoding='utf-8'?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/rails">
<glob pattern="*.rails"/>
</mime-type>
</mime-info>
2. Executed update-mime-database /usr/share/mime
3. Placed this desktop file in /usr/share/applications/rails.desktop
[Desktop Entry]
Exec=/home/rich/Rails/rails.sh %U
Version=1.1
Name=Rails for 18xx
GenericName=Rails
X-GNOME-FullName=Rails for 18xx
Comment=This is the 18xx game software
Path=/home/rich/rails
Icon=/home/rich/rails/logo.png
StartupNotify=true
Terminal=false
Type=Application
4. Added this line to /usr/share/applications/defaults.list
application/rails=rails.desktop
5. Logged out and back in.
But when I select a .rails file nothing happens!
What am I doing wrong?
By the way the directory for /home/rich/Rails is
-rw-rw-r-- 1 rich rich 366721 2012-06-13 21:39 18xx.log
-rw-r--r-- 1 rich rich 745 2012-05-30 06:14 AUTHORS
drwxr-xr-x 9 rich rich 4096 2012-05-30 06:14 lib
-rw-r--r-- 1 rich rich 18009 2012-05-30 06:14 LICENSE
-rw-r--r-- 1 rich rich 3467059 2012-05-30 06:14 rails-1.7.5.jar
-rwxr-xr-x 1 rich rich 43 2012-05-30 06:14 rails.sh
-rw-r--r-- 1 rich rich 738 2012-05-30 06:14 README
-rw-r--r-- 1 rich rich 611 2012-05-30 06:14 readme.txt
and /home/rich/Rails/rails.sh contains
#!/bin/bash
java -jar ./rails-1.7.5.jar $1