February 28, 2018

Fix Brave Browser Sandbox in Debian/Ubuntu


icon
Brave is a super-quick privacy-focused ad-blocking modern web-browser.

Problem: Cannot run Brave web-browser
$ brave
[7970:7970:0228/075800.525306:FATAL:zygote_host_impl_linux.cc(126)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Aborted

Solution:
sudo su
echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/00-local-userns.conf
service procps restart
exit

Source: https://community.brave.com/t/how-to-solve-no-sandbox-error-on-debian-based-linux-distros/3363

Please consider my Brave affiliate links to support my Youtube publications:
Excuse Me While I Nerd
Thibodaux Area Aerials


~~
As always, Good Luck!

Please consider crypto tipping:
  

February 24, 2018

Lost or Stolen Mobile Device Location Services (Find My Device)

Lost or Stolen Mobile Device Location
(Modern Devices 2014 2015 2016 2017 2018)


In the event of lost or stolen devices, it is best to have your device prepared ahead of time.

Below are the "native" ways to do, but I will also present two other free services afterward.  Generally your device has to be powered on and have connectivity.  Some services offer a last seen location.

Android

To prepare your Android device, install "Device Manager" from the Google Play Store. Login with your Google account and approve location sharing if necessary. You may need to turn on Settings->Location Access+GPS+WiFi. If you have multiple Android devices, this app will also help locate your other devices.

In the event of a lost or stolen device, visit https://www.google.com/android/devicemanager and login with your Google account that was used to setup the device. Device Manager allows you to locate, ring, lock or erase your device. (You may have to "Setup Lock & Erase" First.)

iOS

To prepare your iPhone or iPad, go to Settings->iCloud. Login if necessary (use your Apple account) and pan down to "Find my iPhone" (or iPad) and turn it on. Also turn on "Send Last Location". You may need to turn on Settings->Privacy->Location Services also.

In the event of a lost or stolen device, visit https://www.icloud.com/#find to locate your device.

3rd Party

Now although the above certainly work, I personally don't want to be limited to only this.

I also recommend both Prey (https://preyproject.com/) and Lookout (https://www.lookout.com/).

Prey is a free location/anti-theft app for up to three devices including laptop computers. If lost or stolen, visit https://panel.preyproject.com/app where you can locate, lock, erase, send an alert, or sound an alarm. Prey may also be able to access the front facing camera.

Lookout is a free antivirus, backup, and device-location app with additional paid backup features. Once installed and configured, visit https://www.lookout.com/d/missingDevice to locate, lock, erase, or sound an alarm.

Plan B (https://faq.lookout.com/categories/20504137-plan-b) offered by Lookout.com may also help you locate your Android device if you have not configured any previous location services.

Good luck!

Please consider crypto tipping:
  

February 22, 2018

Custom Mime File Type Icon in XFCE Thunar


I wanted to associate a custom icon for my old .PSP files in XFCE, but had no clue how.  Thanks to https://unix.stackexchange.com/questions/23776/how-to-change-a-file-type-icon-in-xfce-thunar, I was able to do it easily.



Firstly create a custom icon, then save it into ~/.local/share/icons/.  (Alternatively, with sudo/root access try /usr/share/icons/. For example, mine was ~/.local/share/icons/pspimage.png.

Then create a new mime xml in your user’s ~/.local/share/mime/packages/. For example, mine was ~/.local/share/mime/packages/pspimage.xml. (Alternatively, for system-wide, try /usr/share/mime/packages/.)

Which contained:
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/octet-stream">
    <comment>PaintShop Pro Image</comment>
    <glob pattern="*.psp"/>
    <glob pattern="*.pspimage"/>
    <generic-icon name="pspimage"/>
    <icon name="pspimage"/>
  </mime-type>
</mime-info>

Then simply update your system: (Alternatively, as sudo/root, perform same as below in /usr/share/mime/packages/.)
cd ~/.local/share/mime && update-mime-database $PWD

Refresh your Thunar view and viola.



~~
As always, good luck!

Please consider crypto tipping:
  

February 20, 2018

2 Ways to Linux CommandLine Thesaurus Synonyms

icon

[How to] Linux CommandLine Thesaurus | Linux CommandLine Synonyms


I wanted to use my linux commandline to lookup synonyms (thesaurus) recently but didn’t know how.

After some searching I was able to find 2 alternatives that worked very differently, yet helped me tremendously on each account.

Method 1 - DICT

sudo apt install dict dictd dict-gcide dict-moby-thesaurus
sudo systemctl enable dictd
sudo systemctl start dictd
dict --help # or try 'man dict'
#dict -d moby-thesaurus YOURWORDHERE
alias thes='dict -d moby-thesaurus'
thes engineer

Method 2 - WordNet

sudo apt install wordnet
man wn | grep -B1 synon
#wn YOURWORDHERE -syns#, where # is n, v, a, or r
#wn YOURWORDHERE -simsv
wn # or try 'man wn'
wn engineer -synsn | grep -v ^$   #grep just strips empty lines from output
wn engineer -synsv | grep -v ^$

Script for both:

#!/bin/sh
if [ "$1" = "" ] ; then
   echo "usage: $0 WORD"
fi
wn $1 -synsn | grep -v ^$
wn $1 -synsv | grep -v ^$
wn $1 -synsa | grep -v ^$
wn $1 -synsr | grep -v ^$
dict -d moby-thesaurus $1



~~
As always, good luck!

Please consider crypto tipping:
  

February 09, 2018

[Solved] PulseAudio stopped working in Debian 9

icon

[Solved] PulseAudio stopped working in Debian 9 Stretch on Dell Optiplex 9020

After some recent updates, unknown when and unknown why, PulseAudio stopped working properly. Sometimes it would work and sometimes not, it was the fight of all fights.

Multitudes of resources that failed to resolve only aggravated my situation. My final solution came from multiple sources, some of which i have already forgotten, but i will link some that helped.

Specifically to my Dell Optimplex with built-in Intel HD 4000 graphics, HDMI Audio was always a problem to the extreme. It always got in the way. If found a resource that spoke about making an NVidia HDMI work, but in actually this resource helped me disable it. Please refer to: https://www.linuxquestions.org/questions/linux-hardware-18/no-hdmi-audio-in-linux-819172/

When I performed the command aplay -l, I found my Intel HDMI Audio to be card 0. I created/modified my /etc/modprobe.d/sound.conf to contain options snd-hda-intel probe_mask=0xfff2 as per the post. Maybe that doesn’t even do anything. But then I chose the best thing ever. The post said to sudo rmmod snd_hda_intel then sudo modprobe snd_hda_intel, but screw that, i just sudo rmmod snd_hda_intel without reinserting it. Afterward aplay -l did not show card 0, hells yeah!

PulseAudio still caused me super rage mode, it just didn’t work as expected if it worked at all. i had to rm -rf ~/.config/pulse/ and rm ~/.asoundrc multiple times. Mostly the daemon would not start under my user account, but ran much better as root after the above “fix”.

So i decided, I need to run pulseaudio as root always (really this is called running under “system”). I found the command needed to be sudo pulseaudio --system --daemonize --disallow-exit. Warning: official documents say do not do this for security reasons, but F**K, it’s a pile of S**T and fails to work, so i’m doing it.

When I ran this, it seemed to work, but then would flake out. It seemed pulseaudio wanted to re-launch under my useraccount occasionally, so I eventually found to modify /etc/client.conf to include autospawn = no.  Of course  I had to sudo killall pulseaudio multiple times too.

Now everything seemed to work, so I proceeded to make it autostart at reboot this way. I ran sudo crontab -e and inserted @reboot pulseaudio --system --daemonize --disallow-exit. I rebooted and GLORY.

Additional Notes:
I should note that I had to verify my user/groups were in order too with sudo usermod -a -G pulse,pulse-access,audio $(whoami). I also did it for the user pulse but i really think that was overkill. Regardless attempting pulseaudio as user was still B******T. Also note, that modifying group memberships requires a reboot. (There are ways to avoid reboot, but reboot is wisest.)
http://rivendell.tryphon.org/wiki/Debian_6_Installing_Pulse_Audio
https://unix.stackexchange.com/questions/338687/pulseaudio-as-system-wide-systemd-service
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/ ~~~

As always, good luck!









Coolest nerd tech ever:
 http://amzn.to/2BFbtM5

[SOLVED] NFS stopped mounting in Debian 9 Stretch

icon icon

NFS stopped mounting in Debian 9 Stretch

After some recent updates, unknown when and unknown why, NFS mounting to my Synology device stopped working.

Thanks to these resources, I re-configured it and it works at boot-up again.
https://wiki.manjaro.org/index.php?title=Fstab_-_Use_SystemD_automount
https://linoxide.com/file-system/example-linux-nfs-mount-entry-in-fstab-etcfstab/

My /etc/fstab now looks like this:
172.16.5.49:/volume1/data /mnt/synology nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,hard,intr,noatime 0 0

~~~

As always, good luck!









Coolest nerd tech ever:
 http://amzn.to/2BFbtM5