HDS/Neoware ViewStation Stuff
I picked up a 20MB unit for $100; it's got just 8 bits worth of display, but is tiny and has been a useful member of my "computing family."
/etc/zshrc stuff for setting up DISPLAY
if [ -z "$DISPLAY"> ]; then LOGINADDR="`/usr/local/bin/loginhost`"> if [ ! $LOGINADDR = "0.0.0.0"> ]; then export DISPLAY="$LOGINADDR:0.0"> fi fi
See also sources to loginhost.c:
/*********************************************************************-*-C-*- * * loginhost - Copyright (C) 1997 Pat Thoyts * * Searches through utmp (5) for the controlling terminal and returns the * login hostname entry. We might need some checks for validity and to ensure * we don't screw up when we are at the console. * * This is for use setting the DISPLAY envar properly at login. * ***************************************************************************/ #include <sys/types.h> #include <unistd.h> #include <utmp.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #ifndef UTMP_FILE # define UTMP_FILE "/var/run/utmp"> #endif char* getipaddr(unsigned long addr); int main ( int argc, char** argv ) { struct utmp utmp; int fd = 0, size = 0; char* my_tty; my_tty = ttyname(0); my_tty += 5; fd = open(UTMP_FILE, O_RDONLY); if (fd == -1) { fprintf(stderr, "Oops. Failed to open %s\n">, UTMP_FILE); exit(1); } size = read(fd, , sizeof(struct utmp)); do { if ( utmp.ut_type == USER_PROCESS && strncmp(utmp.ut_line, my_tty, UT_LINESIZE + 1) == 0) { printf("%s">, getipaddr(utmp.ut_addr)); } size = read(fd, , sizeof(struct utmp)); } while ( size == sizeof(struct utmp) ); close(fd); return 0; } char* getipaddr(unsigned long addr) { typedef union { unsigned long ul; unsigned char uc[5]; } ad_t; ad_t ad = {0}; char* ans = NULL; ad = addr; ans = (char*)malloc(sizeof(char) * 255); if (ans == NULL) exit(1); sprintf(ans, "%d.%d.%d.%d">, (int)ad.uc[0], (int)ad.uc[1], (int)ad.uc[2], (int)ad.uc[3]); return ans;
On Hosting NCD X Terminals using Linux
References: <5vj9rn$1730@lightning.asahi-net.or.jp> NNTP-Posting-Host: satchmo.cs.colostate.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 |
In article <5vj9rn$1730@lightning.asahi-net.or.jp>, awilcock@chat.carleton.ca (Andrew Wilcock) writes:
" Anyone know how to hook up an ncd19 to a linux box, is it possible "
yes.
" or is NCDWare needed on the linux server"
probably.
When the NCD powers up, it goes to the network to boot its system, (NCDWare) unless it has the software in ROM. This means that you have to have a server on the network to feed it NCDWare. The NCD Xterm can use TFTP, NFS or several other methods to contact its boot server. Linux can easily be configured to act as a boot server using TFTP or NFS. The linux box can also act as font server, etc.
Is this the kind of thing you are looking for? First time setup can be a chore. More info available upon request.