Category Archives: pc

Hide disable exclude specific mail account in thunderbird global inbox

I use Thunderbird’s unified inbox as it is a very convenient way to manage multiple accounts. Yet there was a management account where the inbox was a huge pile of messages that needed to stay there but that I didn’t want to show in there unless I specifically clicked on that account.

No other guide on the first page of google results gave info on it, but here’s how you do it.

Right-click on the Inbox master node under which all the accounts’ inboxes are listed, then click on Properties, then Choose the selected folders to search, and un-check the Inbox of the account you want to hide. Then click on Update.

There you go.

Cannot downgrade Xiaomi Router 3 firmware to development version

I bought a Mi Router 3 for the express purpose of installing Padavan firmware on it, but lo and behold, I could not for the life of me install the BIN file for the 2.11.20 development version of the firmware (see here and here) as, when choosing the BIN file from the browse file dialog of the router web interface, the popup just went numb, no action, no buttons, no upload activity. Tried many times it with Firefox Chrome and even Internet Explorer AND Edge, NOTHING!

Then, I found in a forum (can’t remember for the life of me where) that there is an alternative method do to it:

  1. Put the BIN file in an empty USB pendrive
  2. Turn off the router (unplug the power)
  3. Place the USB stick in the router
  4. Press the reset button on the back of the router, and while keeping it pressed plug in the power, and STILL keep the reset switch pressed
  5. Stay there like this for a while contemplating on the meaning of existence
  6. In my case I noticed that after a while (10-15 secconds maybe?) the front led was flashing in a different way than when it just booted up, so I figured I could finally leave the reset switch be
  7. I connected to 192.168.31.1 after a while when the front led became static blue and, go figure, the firmware had downgraded

lftp and source: Is a directory error

I was running lftp with the -f switch to launch the usual mirror command, working fine with a few ftp servers at first, but when I added another sync with a pure-ftpd server something stopped working as intended: the message

source: Is a directory

appeared and nothing more happened, only after I pressed Enter the script went on with the execution.

What helped me was this discussion.

so I changed my script, and instead of having

open host
user username password
mirror blahblah

I used

open -u username,password host
mirror blahblah

and everything was magically fine!

Why? NO IDEA. Who cares. Works now.

Windows 10 bluetooth not working on Asus UX51VZ and Centrino Advanced-N 6235

Long story short, my bluetooth mouse, a Logitech Mx Master 2S, disconnected out of the blue, first times I just had to turn off and on bluetooth on windows, once the bluetooth device was automatically disabled because “it caused problems” and I had to restart, finally it stopped working altogether, always telling me “try connecting your device again”. I tested it with every other bluetooth device I had handy, to no avail.

Wasted maybe half an hour, on my almost nonexisting free time schedule (AAARGH)

So finally I had the nice thought of checking, from device manager, if there were updated drivers for the chipset responsible for wireless (WiFI and Bluetooth), a Centrino Advanced-N 6235. I updated it since it automatically downloaded new drivers, restarted as I was asked, and even if wifi kept being shitty, the bluetooth mouse finally connected, as did my android phone.

Change user of transmission-daemon under Debian and Raspbian

UPDATE: Cristian commented adding a nice solution (which I didn’t personally test though, so it’s on you):

  1.  run chmod 775 on the download folder, with -R option (recursive on subfolders):
    sudo chmod -R ug+rw folderName
  2.  add your own user (the one you need to be able to access the downloaded files) to debian-transmission group, or any other group that the transmission daemon belongs to:
    sudo usermod -a -G groupName userName

And that would be all.

Or, this is the original article with the original solution.

I have a raspi3 running transmission daemon downloading to an external USB drive shared via Samba. I don’t want to keep using debian-transmission user with the daemon since just switching to my user account having the access rights to the external USB is much simpler.

I had it already nice and running before, but updating the daemon with apt-get messed everything (and lost all the running torrents as well) so I had to rediscover the procedure once again, and for posterity (and myself for future occasions) I’m writing it down here.

By the way all the missing torrents appeared again after I solved the issue.

So, here are the things you need to do:

  1. run sudo service transmission-daemon stop just in case
  2. edit /etc/init.d/transmission-daemon to have USER=username
  3. edit /lib/systemd/system/transmission-daemon.service to the same effect
  4. run sudo chown -R user:user /etc/transmission-daemon/
  5. run sudo chown -R user:user /var/lib/transmission-daemon/

Done.

 

According to a comment of this article, this might not work for you, so instead you might want to follow this guide instead:

https://askubuntu.com/questions/261252/how-do-i-change-the-user-transmission-runs-under/544185#544185

 

Create STL from DICOM with 3D Slicer

Pretty much a self reference post, based on Slicer v. 4.6.

  1. Open the relevant DICOM set.
  2. Open the Crop Volume module
  3. In “Input ROI” dropdown select Create new AnnotationROI
  4. In the slices view adjust the selection so only the interesting area is covered (if you cannot see the delimiters of the crop rectangle, then zoom out the slice view -dragging with right mouse button- until it’s visibile, then move/resize it panning the slice view -dragging with middle mouse button- and then finally rezoom until you are satisfied adjusting the selection)
  5. Click on the Crop! button and see how the slices are cropped to the set area
  6. Open the Editor module (you can select the GenericAnatomyColors palette)
  7. Click on the coloured rectangle on the Label: row, and choose your relevant structure (if you’re here you probably want bone)
  8. Click on ThresholdEffect button (third from last from the effect buttons)
  9. In the Threshold Range input area that just appeared set a starting value of 300 HU (Hounsfield Units) which usually is a good starting density value for bone
  10. You will see the relevant areas blinking in the slices images, and you can adjust the density range by using the small arrow buttons on the side of the lower value of the range
  11. When satisfied, click Apply
  12. Click on the MakeModelEffect button, first from last, and right after click Apply
  13. After a while (depengin on how large is the ROI and how complex is your structure) the rendered model will appear in the 3D view
  14. Click on the SAVE button in the top tools bar, and deselect every entity except the last one (usually named bone if you followed this tutorial), and then choose the STL format in the dropdown on the side (VTK format is selected by default), plus change to your needs the saving folder, and press the Save button
  15. Profit!

Share mysql and apache folders from windows XAMPP to linux XAMPP

This is a replica of the article by jultech from 2007 for posterity and data-replication purposes.

When dualbooting between windows (first OS installed) and linux, do this:

~ # mv /opt/lampp/var/mysql /opt/lampp/var/mysql.BACKUP
 ~ # ln -s /mnt/windisk/path/to/XAMPP/mysql/data/ /opt/lampp/var/mysql
 ~ # mv /opt/lampp/htdocs /opt/lampp/htdocs.BACKUP
 ~ # ln -s /mnt/windisk/path/to/XAMPP/htdocs /opt/lampp/htdocs

This creates a backup of the original XAMPP folders in linux, and them symlinks them to the windows disk mounts.

Restart XAMPP to have th configuration running.

Thank you jultech.

Fix mount: unknown filesystem type ‘isw_raid_member’

You may also get ‘linux_raid_member‘ instead of ‘isw_raid_member‘, usually it’s the same.

So you probably have run through other tutorials telling you not to mount directly but to mount the raid instead…. but you have no raid!

Maybe though, you HAD a raid back in time, and you removed it leaving the disks as separate storage, and in that case there would be “rogue” raid metadata on the disk that makes linux (mint in my case) think it is a raid, and get confused.

Thanks to Chris_F I finally solved it, you need to use dmraid (install it if it’s not on the system, via apt-get) to remove those orphan tags:

sudo dmraid -rE /dev/sdb

In my case, this instantly showed the disk in file manager.

Enable Dolby Digital Live Surround 5.1 in Far Cry 4 and Watchdogs

Self reference, and also a heads up for those people looking into listening to 5.1 surround sound in Far Cry 4 and Watchdogs which usually play no sound when Dolby Digital is enabled.

This was tested and works in my configuration using a Sound Blaster USB Surround Pro X-Fi, and doesn’t involve any patch or hack, but a simple linear procedure; the first step is to download the latest drivers from Creative website (may ’14), and then, as the good sir melgu said on steamcommunity:

  • Open Creative Entertainment Console
  • Click on the Dolby Digital Live icon
  • Check the second box (a warning will appear, read it to undestand what it does, then accept clicking Yes)
  • Open Change Sound Card Settings from Windows Start Menu, and set the entry Speaker (Sound Blaster blahblah) as the default peripheral
  • Test your games

 

Power efficiency of ATX PSU, power adapters and UPS

This article goes hand in hand with my previous one, since the findings I report in here are those that led me to update the power source of my server.

When you buy a PC, usually the PSU is the last of the worries: the more Watts it’s got, the better, as it can handle all the power hungry hardware you plug to it. Also, usually, this is “just right”, as we use our main PC for just a few hours per day (as long as you make sure you either use suspend for short pauses, or hibernation for longer ones, so you don’t waste energy while you’re not actually using it).

When it comes to servers tho, that are made to run 24/7, power efficiency is of paramount importance, because, make your own calculations, a single watt, year-wise, will be going to cost you something. Using my estimates, and living in Italy, for each watt of consumption of any always-on electric appliance, I will pay, after a year, about 1.75€. Not much in itself, but try and multiply it by 100.

Also, the more power you use, the more you end up polluting the environment, and raising the earth temperature.

So, of the 100, 150 or 200W-whatever that your PC drains, how many do you think are really needed to run the PC, and how many go wasted in the form of heat? For each fan you need inside you PC, you are raising one notch the waste-index of the computer.

Giving for granted the waste of power that goes into the hardware itself, I am going to talk about what regards power supply units, the PSU boxes that nawadays are very nonchalantly sold in the range of 500W-1000W. Do yourself a favour and buy a wattmeter (kill-a-watt or whatever you call it) and measure the power absorbed by your home computer, it will surely be way lower than the maximum rating of the PSU it’s using; the more the real load is distant from half the nominal power of the PSU, the more you’re wasting in heat, since the efficiency of a PSU is a gaussian curve that has its peak (be it 70% in the old fashioned PSU’s, or up to 86% in the newest ones) at 50% the maximum load. In other words, if the hardware in your PC drains 100W, you should get a 200W PSU, even if nowadays it’s hard to find one, so it’s still better a recent 86+ 5ooW one.

For a simple comparison: my current server, before I did the complete switch described in my previous post, was equipped with a 350W PSU, the only one I had available, and it drained little more than 42W in idle. One day, I had too much free time in my hands and went scavenging for other PSU’s, so I had the chance to test it with a 250W PSU, and the drain lowered to 39W, while, with a very old, and supposedly very inefficient, 120W PSU, the drain went even lower at 37W. As soon as I bought and installed a PicoPSU, and connected it to a PSU brick rated 12V@3A that I had from an old external disk, I got a surprising 29W drain while in idle, a total saving of 13W off the 350W PSU. Translates to roughly 23€ savings in a year… the amount it costed me to buy the PicoPSU from the US. A break-even after a year is a good break-even, I say.

Uninterruptible power supplies are another source of waste, even if you would never suspect it: my car-battery modded UPS drained an additional 10W in idle; thinking about it, though, it makes sense, as with a UPS you’re doing an additional conversion, from 220V to 12V, or from 12V again to 220V (in the PC it goes even one more time from 220V back to 12V), which is intrinsically inefficient. In a year, 10W would mean 17€, more than what I paid for a 120W 12V fanless power adapter from China; I already had the car battery, so again a one-year break-even by exchanging the UPS with a plain AC/DC 12V adapter, good!