File: xtermdos.sh

package info (click to toggle)
dosemu 1.4.0%2Bsvn.1999-2
  • links: PTS
  • area: contrib
  • in suites: squeeze
  • size: 15,552 kB
  • ctags: 22,600
  • sloc: ansic: 136,915; asm: 4,107; sh: 1,606; perl: 1,411; makefile: 974; tcl: 599; awk: 404; yacc: 300; lex: 157
file content (63 lines) | stat: -rw-r--r-- 2,782 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This script is made by Mark D. Rejhon to automatically bring up DOSEMU
# in an xterm (or one of its cousins: color_xterm, ansi_xterm, or rxvt).
# It automatically detects the IBM VGA font, and the best xterm to run,
# and then runs the xterm with the proper parameters required to run DOSEMU!
#
# Any improvements or comments, please Email to Mark Rejhon at this address:
# ag115@freenet.carleton.ca

# The following detects the existence of the VGA font.

if [ "$X11ROOTDIR" = "" ]; then
	X11ROOTDIR=/usr/X11
fi

if ! [ -r $X11ROOTDIR/lib/X11/fonts/misc/vga.pcf* ]; then
	echo "Hey...I could not find the IBM VGA font for xwindows!"
	echo "To install the VGA font, go into the DOSEMU source directory and type:"
	echo "sh xinstallvgafont"
	echo ""
	echo "Starting xdosemu with default font.  If not using the VGA font, you should use"
	echo "the latin character set instead of the PC character set in /etc/dosemu.conf."
	echo ""

	#Search for various xterm-related clients and choose the best or
	#fastest one to run.
	if [ -x $X11ROOTDIR/bin/ansi_xterm ]; then
		echo "Found ansi_xterm.  (Hopefully it's at least version 2.0!)"
		echo "Starting ansi_xterm 2.0 DOSEMU without IBM font..."
		ansi_xterm -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	elif [ -x $X11ROOTDIR/bin/rxvt ]; then
		echo "Found rxvt."
		echo "Starting regular rxvt DOSEMU without IBM font..."
		rxvt -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	elif [ -x $X11ROOTDIR/bin/xterm ]; then
		echo "Found xterm."
		echo "Starting regular xterm DOSEMU without IBM font..."
		xterm -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	else
		echo "ERROR: No xterm programs found in $X11ROOTDIR/bin"
        	echo "Perhaps you don't have Xwindows installed that way?" 
	        echo ""
	fi
else
	# The IBM font was found, now find the best xterm to start.
	if [ -x $X11ROOTDIR/bin/ansi_xterm ]; then
		echo "Found ansi_xterm.  (Hopefully it's at least version 2.0!)"
		echo "Congratulations for choosing the best xterm for DOSEMU."
		echo "Starting ansi_xterm DOSEMU with IBM font..."
		ansi_xterm -font vga -fb vga -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	elif [ -x $X11ROOTDIR/bin/rxvt ]; then
		echo "Found rxvt."
		echo "Starting regular rxvt DOSEMU with IBM font..."
		rxvt -font vga -fb vga -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	elif [ -x $X11ROOTDIR/bin/xterm ]; then
		echo "Found xterm."
		echo "Starting regular xterm DOSEMU with IBM font..."
		xterm -font vga -fb vga -geometry 80x25 -bg black -fg gray -T DOSEMU -n DOSEMU -e dos $*
	else
		echo "ERROR: No xterm programs found in $X11ROOTDIR/bin"
        	echo "Perhaps you don't have Xwindows installed on your system?" 
	        echo ""
	fi
fi