How to change default desktop environment in Debian

sudo update-alternatives –config x-session-manager
There are 2 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

Selection    Path                    Priority   Status
————————————————————
* 0            /usr/bin/gnome-session   50        auto mode
1            /usr/bin/gnome-session   50        manual mode
2            /usr/bin/mate-session    30        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/mate-session to provide /usr/bin/x-session-manager (x-session-manager) in manual mode

Source: http://crunchbang.org/forums/viewtopic.php?id=37543

Posted in Linux, Uncategorized | Tagged , , , , , | 2 Comments

Compile & Install virt-manager 1.4 on Ubuntu 16.04 and Linux Mint 18

The latest virt-manager supports configuring VMs for OpenGL passthrough for 3D acceleration in virtual machines plus a SPICE console that can make good use of that, which I have been waiting A LOOONG TIME for!

Unfortunately, the default package on the latest Ubuntu stable release is 1.3, and I couldn’t find any available PPA or pre-compiled packages for it, so I had to compile it myself.

Here is what I have done (I have installed QEMU & KVM as well):

sudo apt-get build-dep virt-manager
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils python-libvirt libgtk-3-dev libvirt-glib-1.0 gir1.2-gtk-vnc-2.0 gir1.2-spice-client-gtk-3.0 libosinfo-1.0 python-ipaddr gir1.2-vte-2.91 python-libxml2 python-requests libvirt-glib-1.0-dev
wget https://virt-manager.org/download/sources/virt-manager/virt-manager-1.4.0.tar.gz
tar -xvzf virt-manager-1.4.0.tar.gz
cd virt-manager-1.4.0/
sudo python setup.py install

Don’t forget to log out and then back in, since your user have been added to the libvirtd group.

And there you go:

Screenshot from 2016-08-14 23-28-11

Sources:

These instructions work perfectly on Linux Mint 18 as well.

Enjoy!

Posted in Linux, Ubuntu | Tagged , , , , , | 3 Comments

Multi-hop SSH Connection

The case is as follows:

You have a server, let’s name it “server2” that you need to SSH to, but unfortunately this server is not directly accessible, as you can SSH to it only through another server, let’s call it “server1”.

Normally, what you will do is connect via SSH to “server1” first, then connect to “server2”. This is really annoying; having to run two commands to access a single server and having to wait for their completion.

All you have to do is the following command to be able to access “server2” using a single command:

ssh -A -t user@server1 ssh -A -t user@server2

But, there is only one prerequisite to this, which needs to be done once and for all, that is the password-less login using the Private-Public key authentication (ssh-keygen, ssh-copy-id …etc)

Source: http://sshmenu.sourceforge.net/articles/transparent-mulithop.html

Posted in Linux, Uncategorized | Tagged , , , | Leave a comment

Get to know your nearest AWS Location

Very useful to get the lowest network delay:

http://turnkeylinux.github.io/aws-datacenters/

Posted in Cloud, Uncategorized | Tagged , , , | 1 Comment

The Fastest Way to Download a Website Offline

One Word & One Command:

HTTrack, that’s the word

To install it on Ubuntu:

sudo apt install httrack

Then, to run it:

httrack http://www.xyz.com --max-rate=1000000000 --sockets=50 --disable-security-limits --display

–max-rate is the download rate where 1000 = 1 KB/sec, so I am using a 1 GB/sec limit!

–sockets is the number of simultaneous connections

–disable-security-limits to bypass the security limits of httrack which limits the download rate to 25 KB/s and 4 active connections, use with caution, might cause you trouble for bandwidth abuse, use it at your own risk!

UPDATE: This still takes a long time depending on the available bandwidth and website size, so you’d better keep it running inside a “screen”, as follows:

screen -S $website_name -d -m httrack $website_name --max-rate=1000000000 --sockets=50 --disable-security-limits --display

where $website_name is – obviously – your website’s address 😉

Posted in Linux, Uncategorized | Tagged , , , | Leave a comment