Skip to content

Commit

Permalink
Forces use of gedit for text files via mailcap
Browse files Browse the repository at this point in the history
This may be a larger problem with the Debian 9 transition: xdg-open
when run via a terminal (rather than invoked via e.g. Nautilus
integration, or otherwise in a GUI desktop environment) does not
honor the mimetype handlers declared in the desktop files. For
text/plain, edited the mailcap file in order to address.
  • Loading branch information
Conor Schaefer committed Oct 1, 2018
1 parent 32f2c3e commit 9d37b3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dom0/sd-svs-files.sls
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
- mode: 644
- makedirs: True

# xdg-open falls back to run-mailcap on debian-9, so CLI invocations
# will not use gedit as intended. Let's force use of gedit via mailcap.
sd-svs-force-gedit-for-xdg-open:
file.prepend:
- name: /etc/mailcap
- text: "text/plain; gedit %s; test=test -x /usr/bin/gedit"

sudo update-mime-database /usr/local/share/mime:
cmd.run

Expand Down

0 comments on commit 9d37b3a

Please sign in to comment.