s32. Enable shutdown option via policykit

To enable a given user account to shutdown and reboot in Mate or XFCE, add

# sudo nano /usr/local/etc/polkit-1/rules.d/51.restart-shutdown.rules

polkit.addRule(function (action, subject) {
  if ((action.id == "org.freedesktop.consolekit.system.restart" ||
      action.id == "org.freedesktop.consolekit.system.stop")
      && subject.isInGroup("priyadarshan")) {
    return polkit.Result.YES;
  }
});

# In case of laptop with working suspen/resume

polkit.addRule(function (action, subject) {
		   if (action.id == "org.freedesktop.consolekit.system.suspend"
      && subject.isInGroup("priyadarshan")) {
    return polkit.Result.YES;
  }
});


[s32.Read

Store spaces and guidelines

The Store can be seen as 7 spaces/datasets:

  1. audio (both speech and music)
  2. disciple (anything related to disciples’ activities)
  3. local (anything in the process of being worked upon)
  4. picture (photographs, art, etc)
  5. song (scores and abc text files)
  6. text (writings)
  7. video

Note: The name «picture» is preferred over to «photograph»

Note: It is better use name of category as singular.… Read

Service logbook

2018-01 and 2018-02

  • January and February need to be dedicated to outside work to repay EUR 2000 loan for extra expenses in November:
    • extra RAM, extra MB, extra storage for 2 server builds (EUR 440+360+480=EUR 1280)
    • unplanned trip expense late October (EUR 844)

2017-12

  • Building, testing and OS install of new Store server, de.vsm.in

2017-11

  • Building, testing and OS install of new Store server, gb.vsm.in
    • note: vsm stands for «virtual store machinery»
  • Finalise Store structure and Samba shares
  • Vasudeva Server Workshop, Salzburg

2017-10

  • 6-day trip (extra expense: EUR 844)
  • Move to new place (1 week)
  • First draft of STORE core framework.
Read

gnome-keyring blocking ssh access

I had to connect to our servers to perform daily maintenance, but suddendly I was getting error:

ssh arc
[...]

Received disconnect from zzz.zzz.zzz.zzz port 1234:2: Too many authentication failures

# and also

sign_and_send_pubkey: signing failed: agent refused operation

I was able to login using password, with:

ssh -p 1234 -i ~/.ssh/id_rsa_id.pub -o PubkeyAuthentication=no  root@$IP

But I was unable to use our keys.… Read

Maintenance tasks @arc-de

To do:

  • Update OS to FreeBSD-RELEASE 11.1
  • Update packages, especially Samba
  • Tweak PF Firewall
  • Add blacklistd, and include in firewall rules
  • Install backup software
  • Start backup (possibly complete)
  • Setup the KVM Spider Duo
  • Check backup is running fine
  • If needed, tweak backup procedure
  • Perform log archiving and rotation
  • See if there are any other maintenance chores left

Notes

I will need a small monitor to hook up to the server and US keyboard.

Read

Display total number of posts in WP

Display total number of posts in WordPress by shortcode [ published-posts-count ]

Add to your theme’s functions.php

// Display the total number of published posts using the shortcode [ published-posts-count ]

function customprefix_total_number_published_posts($atts) {
    return wp_count_posts('post')->publish;
}

add_shortcode('published-posts-count',
	      'customprefix_total_number_published_posts');

For pages use [ published-pages-count ]:

// Display the total number of published pages using the shortcode [ published-pages-count ]
function customprefix_total_number_published_pages($atts) {
    return wp_count_posts('page')->publish;
}

add_shortcode('published-pages-count',
	      'customprefix_total_number_published_pages');
Read

FreeBSD and Bhyve

As of 27th May 2016, bhyve UEFI now supports a frame buffer device which is accessible using VNC: https://svnweb.freebsd.org/base?view=revision&revision=300829

Good tool to manage bhyve: https://github.com/churchers/vm-bhyve

Windows install: https://people.freebsd.org/~grehan/bhyve_uefi/windows_install.txt

Interesting article: http://justinholcomb.me/blog/2016/05/28/bhyve-uefi-gop-support.htmlRead

Incarnations

Prominent animal incarnation: Lion

Incarnations:

  • First human incarnation: Head hunter (Borneo)
  • Witch doctor (Africa)
  • Lakshmana
  • Arjuna
  • Gorakshanath
  • Akbar (15 October 1525 – 27 October 1605)
  • Japan, with name Takashi
  • Wales incarnation
  • Canadian pianist
  • China farmer
  • Russian
  • Thomas Jefferson
  • Bengali spiritual Master (ashram in Himalayas)
  • Last incarnation
Read

Favourite foods

Some of the favourite foods:

  • Sicilian pizza
  • Grilled cheese sandwich on wonder bread (white)
  • Eggplant parmigiana
  • Vegetarian sushi
  • Toasted coconut donut
  • Ice cream sandwich
  • Coffee nip candy
  • Vienna finger cookies
  • Vanilla wafers
  • Potato knish
  • Japanese crackers
  • Potato chips
  • «Mexican» pizza

Fruit:

  • Mango
  • Lychee
  • White grapes
Read