HP Ink Tank Wireless 410 Printer on OpenBSD 6.7

Recently i have successfully printing a test page from my HP printer on my OpenBSD 6.7 laptop after reading and practicing an article on website of mp-5 text editor (see it on my other post). I use following step.

1. add required packages using pkg_add cups gtk+3-cups hpcups hplip.

2. edit /etc/rc.conf.local as follow on pkg_scripts section.

3. restart openbsd. Continue reading HP Ink Tank Wireless 410 Printer on OpenBSD 6.7

Minimum Profit : A Programmer Text Editor

Minimum Profit is a text editor for programmer available to download from https://triptico.com/software/mp.html. I accidentally found this software from article related to OpenBSD and the author is the creator of this mp editor. The downloads are available in source and windows executable (Wow).

I managed to compile mp 5.38 on debian 10 using ncursesw driver which is already available on my laptop. Compilation step as follow.

Continue reading Minimum Profit : A Programmer Text Editor

Upgrade OpenBSD 6.6 to 6.7

This is my first time upgrading OpenBSD. Usually i do full reinstall but it just too time wasting, so i tried these step.

  1. sysupgrade
  2. pkg_add -u

sysupgrade will update your OpenBSD by rebooting and download installation package from internet (i think). Then pkg_add -u will update all of installed program (take a long time). Its a successful upgrade. Thanks to OpenBSD developer who make it so seamless and work beautifully. Great work.

Playing with Emacs – Open file, edit, save file.

Emacs is an editor, but not just it. Thats what i read on internet. Emacs like in a battle with Vim, another editor. I have play with vi so many years ago, but with emacsĀ  it is just recently i learned to use it basic function.

Install it on ubuntu we can choose GUI or terminal version. I like the terminal version because it will be handy during my engagement with VM/Cloud which only can use terminal to manage it.

Open Emacs by typing on terminal emacs and press enter, it will show a welcome page like below.

We can move cursor to a hyperlink and press enter to go to particular subject, like tutorial or manual. Tutorial can also accessed using key combination C-h t, which mean press Ctrl and hold then press h, release keys, then press t. C is Ctrl and M is Meta (Alt/Esc).

Continue reading Playing with Emacs – Open file, edit, save file.

Sinatra Ruby web app server on NetBSD 9

To host sinatra ruby web application on NetBSD 9 we need to install apache http server, ruby, and passenger.

To install ruby 2.6, login as root and do pkgin install ruby. This will automatically install ruby version 2.6. After installed, install sinatra and your other gems using gem install sinatra.

Next is to install apache http server. On terminal execute pkgin install apache. Copy rc.d script from /usr/pkg/share/examples/rc.d/apache to /etc/rc.d folder (this step just following after install message). Edit /etc/rc.conf and add a line containing apache=YES to enable auto start of apache on system start up.

Install passenger module to apache by executing pkgin install ap24-ruby26-passenger. After install edit /usr/pkg/etc/httpd/httpd.conf and add as follow.

LoadModule passenger_module lib/httpd/mod_passenger.so
<IfModule mod_passenger.c>
  PassengerRoot /usr/pkg/lib/ruby/vendor_ruby/2.6.0/phusion_passenger/locations.ini
  PassengerRuby /usr/pkg/bin/ruby26
</IfModule>

Create text file with ed

Unix alike system have ed for editing text file which is i feel strange at first. I learned some time ago to create small text file out of curiosity.

Lets try by creating a text file containing 3 lines.

  1. type ed on terminal
  2. type a then enter (a is append command in ed)
  3. type your text file content.
  4. To end input mode type . then enter on a line.
  5. Type w filename.txt then enter to save to a file.
  6. Type q to quit from ed.

Here we will show in a terminal.