made abaco's gui respect $font and made readweb respect most installations

This commit is contained in:
Matthew Veety 2016-04-25 17:49:31 -04:00
parent 1cf3c46669
commit 6d2635d5ba
2 changed files with 20 additions and 6 deletions

View file

@ -1,10 +1,15 @@
#!/bin/rc
# start abaco and its prerequisites
rfork n
# outside && bind /net.alt /net
rfork ne
if(~ $#1 0){
rimport '$cpu' /net
}
if not {
rimport $1 /net
shift
}
webfs
webcookies
echo useragent netscape 1.0 >/mnt/web/ctl
# probably not needed
# echo useragent netscape 1.0 >/mnt/web/ctl
exec /$cputype/bin/abaco $*

View file

@ -50,7 +50,7 @@ derror(Display *, char *s)
static void
usage(void)
{
fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [url...]\n",
fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [-f font] [url...]\n",
argv0);
exits("usage");
}
@ -61,6 +61,7 @@ threadmain(int argc, char *argv[])
Column *c;
char buf[256];
int i, ncol;
char *tfnt = nil;
rfork(RFENVG|RFNAMEG);
@ -80,6 +81,8 @@ threadmain(int argc, char *argv[])
case 't':
charset = EARGF(usage());
break;
case 'f':
tfnt = EARGF(usage());
default:
usage();
break;
@ -92,6 +95,12 @@ threadmain(int argc, char *argv[])
snarffd = open("/dev/snarf", OREAD|OCEXEC);
if(tfnt == nil){
tfnt = getenv("font");
if(tfnt != nil)
fontnames[0] = tfnt;
}
if(initdraw(derror, fontnames[0], "abaco") < 0)
sysfatal("can't open display: %r");
memimageinit();