Re: Use network printer from NetBSD

2020-06-25 Thread JingYuan Chen
How about using pdf2ps and netcat ?

pdf2ps urpdf.pdf - | netcat -w 1 printer_IP printer_port

On Fri, Jun 26, 2020, 10:03 AM Robert Nestor  wrote:

> On my old Brother HL-1270N I found I had to append a “\004” to the end of
> any file sent to the printer to get it to print.  This was true for plain
> text as well as Postscript files.  The printer has different internal
> “queues” for plain text and Postscript so I wrote a simple filter that
> convetred plain text files into Postscript using enscript  and sent
> everything to the POSTSCRIPT_P1 queue on the printer.
>
> I now use a newer Brother HL-3230CDW that has the same setups but i’ve
> discovered I don’t need to append anything to either type of files to get
> them to print and the printer is smart enough to handle both plain text and
> Postscript regardless of which internal queue the file is sent to, so I
> don’t need any special handling anymore.
>
> The printer on my local network is named “patches” at a fixed address of
> 192.168.1.2 and my /etc/printcap entry is:
>
> lp|patches:\
>  :sh:lp=:mx#0:rm=patches:rp=TEXT_P1:lf=/var/log/lpd-errs:\
>  :sd=/var/spool/output/lpd:
>
> Hope this helps,
> -bob


Re: library path is missing

2020-03-27 Thread JingYuan Chen
Hello Michael,

Thanks for your response !

The complete list is as follows :

# ldd oci8.so
oci8.so:
-lclntsh.10.1 => /usr/lib/oracle/10.2.0.5/client/lib/libclntsh.so.10.1
-lnnz10 => not found
-ldl.2 => not found
-lm.6 => not found
-lpthread.0 => not found
-lnsl.1 => not found
-lc.6 => not found
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
# export LD_LIBRARY_PATH="/emul/linux/lib64:/usr/lib/oracle/10.2.0.5/client/lib"
# ldd oci8.so
oci8.so:
-lclntsh.10.1 => /usr/lib/oracle/10.2.0.5/client/lib/libclntsh.so.10.1
-lnnz10 => /usr/lib/oracle/10.2.0.5/client/lib/libnnz10.so
-lc.6 => /emul/linux/lib64/libc.so.6
ld-linux-x86-64.so.2 => /emul/linux/lib64/ld-linux-x86-64.so.2
-ldl.2 => /emul/linux/lib64/libdl.so.2
-lm.6 => /emul/linux/lib64/libm.so.6
-lpthread.0 => /emul/linux/lib64/libpthread.so.0
-lnsl.1 => /emul/linux/lib64/libnsl.so.1
-lgcc_s.1 => /emul/linux/lib64/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
# /etc/rc.d/apache restart
[1]   Segmentation fault (core dumped) /sbin/sysctl -n ...
[1]   Segmentation fault (core dumped) /sbin/sysctl -q ...
[1]   Segmentation fault (core dumped) /sbin/sysctl -n ...
[1]   Segmentation fault (core dumped) /sbin/sysctl -q ...
Stopping apache.
Waiting for PIDS: 29225.
[1]   Segmentation fault (core dumped) /sbin/sysctl -n ...
[1]   Segmentation fault (core dumped) /sbin/sysctl -q ...
Starting apache.
[1]   Bad system call (core dumped) /usr/pkg/sbin/ht...
# unset LD_LIBRARY_PATH
# /etc/rc.d/apache start
Starting apache.
#


I installed apache via pkg_add. I think that it is NetBSD apache as
you mentioned above.
I will try to compile another apache manually and install it in /usr/local.
Although it is a waste of time to install apache with php module manually,
I hope that emulated linux apache could solve this problem.


Regards,
Phil

On Thu, Mar 26, 2020 at 4:55 PM Michael van Elst  wrote:
>
> phil@gmail.com (JingYuan Chen) writes:
>
> >I have compiled oci8 success with linux emulation. But I can not restart
> >apache with this module. Apache will crash.
>
> >I used ldd to check libraries it referred to and found that some library's
> >path are missing.
>
> You would need an ldd that understands the Linux emulation. Currently it
> doesn't.
>
>
> >Everything seems correct and great. But Apache can not load this module.
>
> Is that a Linux apache or a NetBSD apache ?
>
> If if is NetBSD, it cannot load modules that are linked against
> emulated libraries.
>
> If it is an emulated Linux apache and doesn't work, there are
> other problems. Maybe apache prints some error messages that
> give a hint.
>
> --
> --
> Michael van Elst
> Internet: mlel...@serpens.de
> "A potential Snark may lurk in every tree."


library path is missing

2020-03-26 Thread JingYuan Chen
Hello,

I have compiled oci8 success with linux emulation. But I can not restart
apache with this module. Apache will crash.

I used ldd to check libraries it referred to and found that some library's
path are missing. So that I set LD_LIBRARY_PATH environment variable and
make sure that it can refer to correct libraries. As follows :

# ldd oci8.so
oci8.so:
-lclntsh.10.1 => /usr/lib/oracle/
10.2.0.5/client/lib/libclntsh.so.10.1
-lnnz10 => not found
-ldl.2 => not found
-lm.6 => not found
-lpthread.0 => not found
-lnsl.1 => not found
-lc.6 => not found
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
# export LD_LIBRARY_PATH="/emul/linux/lib64:/usr/lib/oracle/
10.2.0.5/client/lib"
# ldd oci8.so
oci8.so:
-lclntsh.10.1 => /usr/lib/oracle/
10.2.0.5/client/lib/libclntsh.so.10.1
-lnnz10 => /usr/lib/oracle/10.2.0.5/client/lib/libnnz10.so
-lc.6 => /emul/linux/lib64/libc.so.6
ld-linux-x86-64.so.2 => /emul/linux/lib64/ld-linux-x86-64.so.2
-ldl.2 => /emul/linux/lib64/libdl.so.2
-lm.6 => /emul/linux/lib64/libm.so.6
-lpthread.0 => /emul/linux/lib64/libpthread.so.0
-lnsl.1 => /emul/linux/lib64/libnsl.so.1
-lgcc_s.1 => /emul/linux/lib64/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12

Everything seems correct and great. But Apache can not load this module.

I remember that there is a tool called ldconfig in linux. After installing
new library, I will use it to refresh system library's path. Should I
install it to solve my problem in NetBSD?

Any advice will be greatly appreciated.


Regards,

Chingyuan


Re: Can not Download NetBSD 8.0 i386 USB Install Image

2019-02-01 Thread JingYuan Chen
I have downloaded it from ftp.netbsd.org and reported this problem to
NetBSD's web site.

Thank you !

On Thu, Jan 31, 2019 at 11:23 PM Martin Husemann  wrote:
>
> On Thu, Jan 31, 2019 at 11:28:11PM +0800, JingYuan Chen wrote:
> > The URL is as follows :
> > https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/images/NetBSD-8.0-i386-install.img.gz
>
> Indeed something is wrong - notifying admins...
>
> Slightly unrelated: I would strongly suggest to use 8.0_STABLE instead,
> you can use this URL:
>
> http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-8/latest/images/NetBSD-8.0_STABLE-i386-install.img.gz
>
> (and this actually works)
>
> Martin


Re: Can not Download NetBSD 8.0 i386 USB Install Image

2019-01-31 Thread JingYuan Chen
AhhI forgot to describe more detail about my problem.
I used Firefox to download i386 USB install image form NetBSD's download page.

The URL is as follows :
https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/images/NetBSD-8.0-i386-install.img.gz

After clicking the link, firefox shows that the source file can not be
read. So that I try to download
 i386 ISO image. But the error message is the same.

There may be something wrong with amd64 ISO image. I had downloaded
amd64 ISO image last Sunday.
But I can not download it now. Firefox responds File not found. :(

Is there something wrong with cdn.netbsd.org ???

On Thu, Jan 31, 2019 at 6:51 PM Benny Siegert  wrote:
>
> On Thu, Jan 31, 2019 at 8:20 AM JingYuan Chen  wrote:
> > I want to download NetBSD 8.0 i386 Install Image. But the source file
> > can not be read. Is there something wrong with it?
>
> Could you provide more details please? Which download URL did you use?
> Which file could not be read? What is the error message?
>
> --
> Benny


Can not Download NetBSD 8.0 i386 USB Install Image

2019-01-30 Thread JingYuan Chen
Hello,

I want to download NetBSD 8.0 i386 Install Image. But the source file
can not be read. Is there something wrong with it?


Regards,
Chingyuan


Re: 7.0.1 AMD64 Install Problem - laptop TOSHIBA Satellite L840

2016-09-03 Thread JingYuan Chen
Hello Leonardo,

NetBSD-7 daily snapshot (201609021830) can boot my laptop. It can load
Radeon module successfully.

Will it be fixed in 7.0.2 or 8.0 ?


Regards,
Chingyuan

On Thu, Sep 1, 2016 at 8:44 PM, Leonardo Taccari <l...@netbsd.org> wrote:

> Hello JingYuan,
>
> JingYuan Chen writes:
> > [...]
> > I found that there are a bug report #49964 with my situation. According
> to
> > it's fix section, I can use userconf to disable Radeon module. I execute
> > 'userconf list' to get the current list. But the result is empty.
> >
> > I wonder that I can install NetBSD in my laptop or not. If it can be
> > installed, I worried that installing xorg is another problem to me.
> >
> > Any suggestions are appreciated.
> > [...]
> Can you please try a netbsd-7 daily snapshot?
> You can download it from e.g.:
>
>  http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-7/
>
> From a quick look to PR kern/49964 and CHANGES files it seem that
> the fix was pull-up'ed only in netbsd-7 (but not netbsd-7-0) so NetBSD
> 7.0.1 probably still exposes the same problem.
>
>
> Please let us know if it will fix the problem you see!
>


7.0.1 AMD64 Install Problem - laptop TOSHIBA Satellite L840

2016-09-01 Thread JingYuan Chen
Hello,

I want to install NetBSD 7.0.1 AMD64 on my laptop. But I encountered a
problem as attachment. I tried to boot with different options. However, the
install process crashed again.

I found that there are a bug report #49964 with my situation. According to
it's fix section, I can use userconf to disable Radeon module. I execute
'userconf list' to get the current list. But the result is empty.

I wonder that I can install NetBSD in my laptop or not. If it can be
installed, I worried that installing xorg is another problem to me.

Any suggestions are appreciated.

Regards,
Chingyuan


Re: Activate usb wifi adapter success or not ?

2014-12-23 Thread JingYuan Chen
Hello Greg  Ed,

Thank you for response quickly !

Greg, you point out the things I forgot to check. There is a built-in
Ethernet Adapter, fxp0, in my laptop. I use it to complete NetBSD's install
process. It was assigned a default gateway, 192.168.1.1, and has a start
script as ifconfig.fxp0 in /etc. However, my access point's IP is also
192.168.1.1. For avoiding confuse, I delete /etc/ifconfig.fxp0 and comment
default gateway in /etc/rc.conf. Then reboot my laptop again. Great ! I can
surf Internet via my usb wifi adapter.

Ed, you give me a new thought about saving USB port for something else. My
laptop has PCMCIA device. But it had never been used. Although it is ten
years old, I don't want to lose it. This is my first laptop. I use it to
learn Linux and take some projects as freelancer. Actually, I want to do
something with it. But I have no idea now.



Regards,
ChingYuan

On Tue, Dec 23, 2014 at 5:59 AM, Ed edwar...@gmx.us wrote:

 On Mon, 22 Dec 2014 16:40:46 +0800
 JingYuan Chen phil@gmail.com wrote:

  Hello,
 
  I have installed NetBSD 6.1.5 in my old laptop, Compaq Presario 2800.
  Everything works properly but usb wifi adapter, 3COM 3CRUSB10075, can not
  connect to Internet. This adapter's driver, zyd, was loaded by NetBSD at
  boot time and assigned as zyd0.
 
  After starting wpa_supplicant manually, it shows that it is associated
 with
  my AP. However, I find that this adapter's status is active , not
  associated, in ifconfig. I try to use parameter -d and -f to get
  wpa_supplicant's log. But there is no error with WPA's authorization.
 
  I try to use dhclient with zyd0 and it gets an IP address successfully.
 So,
  I think that it works with my AP. But sometimes it returns zyd0 : xfer
 too
  short (length=22). What is the meaning of this ? Actually, I can not
 ping
  my AP from zyd0. I have to flush route table and add default gateway with
  interface zyd0. Then I can ping my AP. But I still can not surf Internet.
 
  I wonder whether I activate this adapter successfully or not. Is there
  anything I missed ?
 
  Any advice would be appreciated.

 this Howto from the wiki may help?
 worked for me.
 http://wiki.netbsd.org/tutorials/how_to_use_wpa_supplicant/

 May be interested in using wireless pccard instead and save the USB port
 for something else:-)
 I just picked up a used netgear wg511t pccard for my ten year old pentium
 m laptop for $8.00 from ebay

 the ath driver supports it, however, watch out for the caveats mentioned
 on the ath man page

 --
 Ed edwar...@gmx.us



Activate usb wifi adapter success or not ?

2014-12-22 Thread JingYuan Chen
Hello,

I have installed NetBSD 6.1.5 in my old laptop, Compaq Presario 2800.
Everything works properly but usb wifi adapter, 3COM 3CRUSB10075, can not
connect to Internet. This adapter's driver, zyd, was loaded by NetBSD at
boot time and assigned as zyd0.

After starting wpa_supplicant manually, it shows that it is associated with
my AP. However, I find that this adapter's status is active , not
associated, in ifconfig. I try to use parameter -d and -f to get
wpa_supplicant's log. But there is no error with WPA's authorization.

I try to use dhclient with zyd0 and it gets an IP address successfully. So,
I think that it works with my AP. But sometimes it returns zyd0 : xfer too
short (length=22). What is the meaning of this ? Actually, I can not ping
my AP from zyd0. I have to flush route table and add default gateway with
interface zyd0. Then I can ping my AP. But I still can not surf Internet.

I wonder whether I activate this adapter successfully or not. Is there
anything I missed ?

Any advice would be appreciated.



Regards,
ChingYuan