Skip to main content

User account menu

Show — User account menu Hide — User account menu
  • Log in
Home
The Hackish BSD Diary
tweax for *nix

Main navigation

Show — Main navigation Hide — Main navigation
  • Home

Setting up fancy prompt in Korn Shell (ksh)

Submitted by Fekete Zoltán on Thu, 01/25/2018 - 11:04

Put this line into your ~/.shrc:

export PS1="$(echo -e "\033[31m$(whoami)\033[00m@$(hostname -s): \$PWD $") "

Change coloring as you wish by tuning  \e[31m and \e[00m parts.

For color codes and further information see the link attached.

Tags

  • ksh
  • netbsd
  • prompt
  • Read more about Setting up fancy prompt in Korn Shell (ksh)
  • Log in to post comments

Sync master zone file with bind9 journal

Submitted by Fekete Zoltán on Fri, 01/05/2018 - 15:21

This command synchronizes all current setting with zone file, and also removes the journal (jnl) file:

# rndc sync -clean

 

Tags

  • bind9
  • zone
  • dns
  • domain
  • Read more about Sync master zone file with bind9 journal
  • Log in to post comments

List foreign keys of a referenced table in mysql or mariadb

Submitted by Fekete Zoltán on Mon, 12/18/2017 - 10:17
mysql> select constraint_name, table_name
       from information_schema.key_column_usage
       where referenced_table_name = '<TABLE_NAME>';

Tags

  • mysql
  • mariadb
  • foreign key
  • Read more about List foreign keys of a referenced table in mysql or mariadb
  • Log in to post comments

NetBSD letsencrypt certificate installation with certbot for Apache

Submitted by Fekete Zoltán on Sun, 12/17/2017 - 13:19
certbot client has a limited functionality on NetBSD. However you can use it fully functional following these steps:

Tags

  • netbsd
  • letsencrypt
  • certbot
  • apache
  • Read more about NetBSD letsencrypt certificate installation with certbot for Apache
  • Log in to post comments

Don't use poweroff on NetBSD

Submitted by Fekete Zoltán on Wed, 11/22/2017 - 08:17

poweroff command simply doesn't run shutdown scripts. It causes several dirty killing of running processes, etc.

Use always

# shutdown -p now

instead.

Tags

  • netbsd
  • shutdown
  • Read more about Don't use poweroff on NetBSD
  • Log in to post comments

SVN Id header

Submitted by Fekete Zoltán on Sun, 11/12/2017 - 11:08

Do it like this:

svn propset svn:keywords 'Id' <your_file_name>

propset can be abbreviated by ps or pset

Tags

  • svn
  • subversion
  • Id
  • Read more about SVN Id header
  • Log in to post comments

Apache umask setting

Submitted by Fekete Zoltán on Fri, 11/10/2017 - 10:51

You want to set your Apache web server to create files with controlled permissions. Do this with umask setting at the beginning of the rc script, which starts the service. In NetBSD:

/etc/rc.d/apache

 

Tags

  • apache
  • httpd
  • umask
  • permission
  • Read more about Apache umask setting
  • Log in to post comments

Xfce4 shutdown, reboot, suspend is disabled

Submitted by Fekete Zoltán on Fri, 10/20/2017 - 08:56
You push the logout menu, and the xfce-session-logout dialog appears. If the shutdown, reboot and suspend buttons are greyed out, check these:

Tags

  • xfce4
  • power
  • Read more about Xfce4 shutdown, reboot, suspend is disabled
  • Log in to post comments

NetBSD hdaudio jack detection

Submitted by Fekete Zoltán on Mon, 03/20/2017 - 11:20
If you have an Analog Devices AD1984A audio chip, and could not have headphones jack working, apply the the patch below, and recompile the kernel.

Tags

  • netbsd
  • sound
  • jack
  • hdaudio
  • Read more about NetBSD hdaudio jack detection
  • Log in to post comments

Control of xconsol appearance in xdm

Submitted by Fekete Zoltán on Fri, 02/17/2017 - 13:57

If you want to display or hide xconsole while running an xdm session, then:

1. look for Xsetup_0 file in your system

2. Find this line (or similar to this from NetBSD), and comment/uncomment regarding your needs:

xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail

 

Tags

  • xdm
  • Read more about Control of xconsol appearance in xdm
  • Log in to post comments

Pagination

  • First page « First
  • Previous page ‹ Previous
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Next page Next ›
  • Last page Last »
Subscribe to

Search

Footer menu

Show — Footer menu Hide — Footer menu
  • Contact
Powered by Drupal