Cerca qui le cose strambe

2018-10-12

rumore di fondo con cuffie wireless DECT in ubuntu

se vi capita di sentire un forte rumore di fondo quando usate delle cuffie DECT con ubuntu...

potrebbe essere che dovete abbassare il volume del device che e` al 100% (mentre il generale non e` sopra il 20/30%)
nel caso potete seguire la procedura come spiegata meglio qui

  1. lanciate il comando in ascii graph
    alsamixer
  2. passate al device in questione
  3. abbassate il volume
  4. uscite
  5. per registrare il cambiamento lanciate
    sudo alsactl store
  6. non ho ancora verificato che al reboot successivo la modifica sia stata mantenuta... ma l'articolo che ho trovato e` di 4 mesi fa quindi mi auguro che abbiano gia` rilasciato la patch relativa :-)

2018-10-08

provide automatic keyboard and mouse input in X

Do you need programmatically schedule some keyboard and mouse input in linux?
Look no further
xdotool is the solution :-)
the installation is as easy as typing

sudo apt-get install xdotool

and assuming you need to do a (left) click on the mouse but only 10 seconds after you left your desk:

sleep 10 ; xdotool click 1

Bonus
obviously it also work if you have to send the commands in a RDP session :-)

2018-05-26

how to load a static html page in firefox new tabs

From some months in order to load a static page in new tabs Firefox requires a bit of configuration more in detail: created a file local-settings.js in mozillainst\defaults\pref folder (C:\Program Files (x86)\Mozilla Firefox\defaults\pref on my laptop) with this content
// local-settings.js.cfg needs to start with a comment line
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);
then created another file mozilla.cfg in mozillainst folder (C:\Program Files (x86)\Mozilla Firefox on my laptop) with this content
// mozilla.cfg needs to start with a comment line

var {classes:Cc,interfaces:Ci,utils:Cu} = Components; /* set new tab page */ try {

 var newTabURL = "file:///C:/some/path/to/an/htmlfile.html";
 aboutNewTabService = Cc["@mozilla.org/browser/aboutnewtab-service;1"].getService(Ci.nsIAboutNewTabService);
 aboutNewTabService.newTabURL = newTabURL;

} catch(e){Cu.reportError(e);} // report errors in the Browser Console
and finally close and reopen firefox for this change to take effect