Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home - Blog

sudo with no password on Ubuntu

Posted by admin |

In the /etc/sudoers file:

For a single user :


For a group :

%supergroup  ALL=(ALL) NOPASSWD:ALL


Apr 25, 2017 04:42

"File not found" on Linux could be trying to run 32 bit executable on 64 bit system or vice versa

Posted by admin |

The file is clearly there, you ls it, view it and everything. but when you try to run, it's reported as not being there. You could be on the wrong sub architecture like 64 bit when the execiutable is 32 or vice versa: perl - Getting "Not found" message when running a 32-bit binary on a 64-bit system - Unix & Linux Stack Exchange


In my case it seemed to be running a 64 bit executable on a system that had a bit of an identity crisis as to what it were, byte-wise.

Apr 21, 2017 05:55

Powering a 2-pole 3.5mm (1/8") connected electret microphone with a Xenyx 302USB

Posted by admin |

Update 2017-08-27: This solution does work! But you can't have dirty power with mains hum in it. If you are running on a laptop and you hear hum, try disconnecting the laptop from the charger.

Click to view full-size image…
Size: 51.1 kB

Click to view full-size image…
Size: 156.4 kB

There is a 3,5mm (1.8") microphone jack at the top right of the Xenyx 302USB.

It seems to be wired the same as in SoundBlaster sound cards, and have a 4V voltage for driving electret condenser microphones:

        / \ 
       |   |   Tip - Audio signal
        \ / 
       |   |   Ring - Bias voltage for microphone (+4V)
       |   |
       |   |   Sleeve - Ground
       |   | 
     |       |

Schematics adapted from: Powering microphones

However my electret microphone seems to be wired like this:

        / \
       |   |   Tip - Audio and bias voltage (+3V)
        \ /
       |   |  
       |   |
       |   |
       |   |   Sleeve - Ground
       |   |
     |       |

I think it runs on 3V so 4V is close enough I guess.

So I am using a wiring block to make the ground not extend to the ring, and have the signal + voltage on both the ring and the tip, going into the mixer:

        / \ 
       |   |   Tip - Audio and bias voltage (+4V)
        \ / 
       |   |   Ring - Audio and bias voltage (+4V)
       |   |
       |   |   Sleeve - Ground
       |   | 
     |       |

Source quote for the voltage:

The 302USB does not have the higher voltage phantom power used in older mixers. It does have the 14 volt on the XLR and the 4 volt on the 1/8' (3.5 ) bias for electert mics. This is not something you can turn off but is not a problem unless you are using equipment that is not isolated or balanced and then you can get noise from cable movements, inserting plugs with the volume up. Hope this helps. Questions And Answers: Can I use this preamp without phantom power? and if so, how?

Apr 14, 2017 04:30

Ubuntu Linux on Aspire V15 Nitro - first impressions

Posted by admin |

It works with Ubuntu 16.04LTS, 16.10 and 17.04 and with  Fedora Linux with the following caveat:

Furthermore, this is not a bug, but the M2 SSD does not support encryption (Opal encryption) which surprised me a bit.

Apr 12, 2017 04:50

Let's just call them superstitious

Posted by admin |

Yesterday, as I walked home from my work at Vasagatan, I saw hundreds of people walking on Västerbron bridge making their way home, after the attack at #Drottninggatan. My heart goes out to those hurt and killed by the terrorists.

In ancient Rome, before Christianity and before Islam, there was an expression for people who think they are gods or who think they could manipulate gods to do their bidding: They were not seen as religious, but superstitious (superstitio).

Imagine if we could deny the "religious" label to people who do not respect the right to life or the UN declaration of human rights. We simply deny them the protection and respect we extend to others to worship in freedom. Criminals will not longer be able to hide behind a perversion of piety.

People who preach hate are just recruiters for criminal organizations and networks and should be treated as such. Insofar as their ramblings can be interpreted as threats or incitement to violence, they should be prosecuted to the fullest extent of the law, without any regard to hurting religious feelings, since this is not religion.

We are entering an age where small groups can do a lot of damage; a sect of a couple of thousand tops were close to wiping out many many people in Japan some years ago. Three times. The freedom of communication we have now will in the future mandate a lot more physical protection. And we need to communicate more in person:

If any people are close enough to hurt you, you need to communicate with them, engage them. We must reach the people who have Internet fueled make-believe communities in their heads.

Theirs is a path of bitterness, hate and delusion, their perceived self-worth oscillating between the extremes of self-hatred and self-aggrandizement.
Our path is one of love, joy and freedom, knowing in our hearts without hesitation the true value and power of humans. We will prevail.

Apr 08, 2017 06:40

Thoughts on U2F

Posted by admin |

U2F is an authentication standard pushed by among others, Google. It is used for two factor authentication, where a USB dongle or NFC is used to cryptographically sign a response to a request from the party that requires you to authenticate. Here are my thoughts so far. I basically think it's good but I piled on more on the bad side below:

The good:

  • Cryptographically signing a response is really smart and potentially very secure. It is similar to how Bitcoin works. It is more secure, if the device signing has its own display so you can verify what it outputs. Otherwise you may just think you are signing something, and in fact your nefarious computer is in fact signing with something else.

The bad

  • It needs to communicate with a computer, and this is for obvious reasons done over a standard interface, such as USB. Which interface is a little bit over-expressive in its communication abilities. Which means that secure computers disable USB access. And now you have nowhere to stick your dongle.
  • A popular security measure now is sandboxing and virtualization, such as with Qubes OS. If you are using a dongle, you now need to route the USB port to that virtual machine.
  • Currently only Chrome supports it, but that may change. My Linux Firefox refuses, in spite of extension and udev rules. I may have done something wrong but then again, there you go.
  • Many sites and services seem happy with OTP, and are not in the process of switching over: USB Dongle Auth List
Apr 06, 2017 12:05

Using a virtual machine for Ardour/Jack on a pulseaudio host OS (Linux)

Posted by admin |

KVM works, VirtualBox doesn't in my tests.

Ardour and Jack do not play well with PulseAudio. On my Ubuntu 16.04 it kills Pulseaudio and that is a bit awkward. So I decided to install Ardour on a virtual machine, and I wanted to test the performance. So I installed Ubuntu Studio on VirtualBox and KVM too see which one gives me best performance for audio editing. In VirtualBox it seemed to work internally, but alas, no sound reached the host system, regardless of configuration Kvm/Qemu worked on the first try!

Host operating system is Ubuntu 16.04LTS

Guest operating system is Ubuntu studio 16.04

Virtual machine is KVM/QEMU

Using the virtual machine manager

You may want to share files between the host machine and the Ubuntu Studio VM. In that case: Mount a volume into the virtual machine like this:

Setting up KVM shared directory in ubuntu 14.04 | Pascal d'Hermilly's tech Blog


Make a mount filesystem with driver Default in kvm, mode passthrough, enter "/commonshare" for target path.

Try in clientmachine

sudo mount -t 9p -o trans=virtio,version=9p2000.L /commonshare /mnt/commonshare

Then enter in /etc/fstab

/commonshare /mnt/commonshare 9p trans=virtio,version=9p2000.L,access=any 0 0


Apr 02, 2017 07:45 | Comments (2)

Audio compression on Linux

Posted by admin |

Just some notes:

sox has compression. I am toying with this one, basically lifted from the man page. At least it looks a bit complex:

sox audio-in.wav soxied.wav gain -28 mcompand "0.005,0.1 -47,-60,-34,-55,-17,-33,0,-10" 100 "0.003,0.05 -47,-60,-34,-55,-17,-33,0,-10" 400 "0.000625,0.0125 -47,-60,-34,-50,-15,-33,0,-10" 1600 "0.0001,0.025 -47,-60,-34,-50,-31,-31,-0,-30" 6400 "0,0.025 -38,-60,-28,-28,-0,-25" gain 15 highpass 22 highpass 22 sinc -n 255 -b 16 -17500  gain 9 lowpass -1 17801



Mar 31, 2017 04:41

Audio compression tools for screencasts on Linux

Posted by admin |

Summary: Use ardour - the digital audio workstation with the Calf Studio Gear - GNU/Linux Audio Plug-Ins and the JACK Audio Connection Kit system.

See other options on Linux than Ardour, such as ffmpeg, sox and Audacity below, with examples.

Ardour, Jack and the Calf plugins are all in the Ubuntu repositories if you are using Ubuntu.

However PulseAudio in Ubuntu does not play well with Ardour, and you would probably prefer a Linux distribution that natively uses Jack instead, and not PulseAudio. The problems with PulseAudio and Jack together are listed here:

JACK Audio Connection Kit|How use PulseAudio and JACK?

One option is to use the Ubuntu Studio Linux distribution directly on your computer, or in a virtual machine for Ardour/Jack on a pulseaudio host OS (Linux) . The latter works surprisingly well; I'm using it!

Ardour's plugin system is just gorgeous. Above two of the "Calf" series plugins in the foreground: An equalizer and a compressor. Effects can be stacked and signals routed in different ways. If you use Ardour 5 in Ubuntu studio, there are hundreds of effects plugins to choose from.

Apply the compressor twice. The effect was better I felt when using a moderate compression twice instead of a stronger once, as mentioned here:

"If you want to heavily compress a voice recording without making it sound too unnatural, use two or three compressors in series. This will sound better than using drastic settings on a single compressor"

That page has a lof of other useful advice as well.

Before you compress

Clipping is accentuated by compression in my limited experience. So if you record with clipping it may be a good idea to re-record. It's better to redo a recording until the suond is good, than try to fix it afterwards. Gigo.

Other choices

  • Audacity has and can use a set of effects plugins
  • ffmpeg has and can use a set of effects plugins
  • sox has a set of effects

But after having seen Ardour, who cares? :D Although sox and ffmpeg can be used from scripts, it must be said.

Audacity example

Here are the settings that worked for me, in Audacity's compress effect:

Threshold: -16dB first time (I think), -13dB second time

Noise floor: -30dB

Ratio: 2.5:1

Attack time: lowest (0.10 secs)

Release time: 1.0 secs first time, 2.2 secs second time

Sox example

sox has compression. I am toying with this one, basically lifted from the man page. At least it looks a bit complex:

sox audio-in.wav soxied.wav gain -28 mcompand "0.005,0.1 -47,-60,-34,-55,-17,-33,0,-10" 100 "0.003,0.05 -47,-60,-34,-55,-17,-33,0,-10" 400 "0.000625,0.0125 -47,-60,-34,-50,-15,-33,0,-10" 1600 "0.0001,0.025 -47,-60,-34,-50,-31,-31,-0,-30" 6400 "0,0.025 -38,-60,-28,-28,-0,-25" gain 15 highpass 22 highpass 22 sinc -n 255 -b 16 -17500  gain 9 lowpass -1 17801

ffmpeg example

ffmpeg -i screncast-audio.wav -vf "compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6" comptest.wav





Mar 31, 2017 11:35

Rotate an upside down video with the aid of ffmpeg

Posted by admin |

Tested by me:

ffmpeg -i -vf "transpose=2,transpose=2"  -c:a copy -t 10

See: rotation - Rotating videos with FFmpeg - Stack Overflow

If only rotating metadata:

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
Mar 27, 2017 02:35