You are not logged in.
Pages: 1
is there a way to make xfce open firefox saved sessions (.session) with firefox but still open .txt files with gedit? I can set .session files to open with firefox but then all text files also open in firefox
Offline
you first need to create a new mime type eg:
su -c "nano /usr/share/mime/packages/ffxsessionfile.xml"
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-firefoxsession">
<comment>Firefox Session </comment>
<magic priority="50">
<match value="search-string" type="string" offset="10:140"/>
</magic>
<glob pattern="*.session"/>
</mime-type>
</mime-info>
save and update the mime database:
su -c "update-mime-database /usr/share/mime"
launch xfce4-mime-settings> search for firefoxsession and select your prefered application
Last edited by sixsixfive (2015-02-05 22:47:07)
Offline
I get this error every time and am for sure using the correct password
cmcanulty@ubuntu1:~$ su -c "nano /usr/share/mime/packages/ffxsessionfile.xml"
Password:
su: Authentication failure
Offline
cmcanulty@ubuntu1:~$ su -c "nano /usr/share/mime/packages/ffxsessionfile.xml"
Password:
su: Authentication failure
if your distribution uses sudo(and you haven't set up a root password yet) you need to change the command eg
sudo nano /usr/share/mime/packages/ffxsessionfile.xml
Offline
still errors but different error
cmcanulty@ubuntu1:~$ sudo -c "nano /usr/share/mime/packages/ffxsessionfile.xml"
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] file ...
cmcanulty@ubuntu1:~$
Offline
you dont need the "-c" or the quotation marks - its only necessary if you use su
PS: just in case: nano is a simple texteditor you could also use mousepad, leafpad etc. to create the mimetype
Offline
another error now
cmcanulty@ubuntu1:~$ sudo gedit /usr/share/mime/packages/ffxsessionfile.xml
[sudo] password for cmcanulty:
(gedit:4373): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:4373): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Offline
hehe, gedit is probably the only editor that won't work
Offline
maybe I should give up, more errors
cmcanulty@ubuntu1:~$ sudo -c "nano /usr/share/mime/packages/ffxsessionfile.xml"
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] file ...
cmcanulty@ubuntu1:~$
Offline
you dont need the "-c" or the quotation marks - its only necessary if you use su
Offline
Pages: 1
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 560.9 KiB (Peak: 577.74 KiB) ]