Skip to content

Commit 04584ea

Browse files
committed
Use xdg-open (or open for MacOS) to open PDF & PS files by default
1 parent 4f7b6e5 commit 04584ea

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scapy/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import os,time,socket,sys
1313

1414
from scapy import VERSION, base_classes
15+
from scapy.consts import DARWIN
1516
from scapy.data import ETHER_TYPES, IP_PROTOS, TCP_SERVICES, UDP_SERVICES, \
1617
MANUFDB
1718
from scapy.error import log_scapy
@@ -60,8 +61,8 @@ def __set__(self, obj, val):
6061

6162

6263
class ProgPath(ConfClass):
63-
pdfreader = "acroread"
64-
psreader = "gv"
64+
pdfreader = "open" if DARWIN else "xdg-open"
65+
psreader = "open" if DARWIN else "xdg-open"
6566
dot = "dot"
6667
display = "display"
6768
tcpdump = "tcpdump"

0 commit comments

Comments
 (0)