Monday, June 8, 2020
Thursday, May 7, 2020
How to install GUI in Ubuntu
Introduction
By default, Ubuntu Server does not include a Graphical User Interface (GUI). A GUI takes up system resources (memory and processor) that are used for server-oriented tasks. However, certain tasks and applications are more manageable and work better in a GUI environment.
Prerequisites
- A server running Ubuntu Linux Server
- Access to a user account with sudo or root privileges
- The apt-get package manager, included by default
# sudo apt-get update && sudo apt-get upgrade
# sudo apt-get install tasksel
# tasksel
Conclusion
There are many GUI desktops available for Ubuntu Server. Most can be installed using the apt-get package manager or the tasksel tool, as detailed in this guide.
If you’ve worked extensively with conventional operating systems, it can be challenging to have to work in a command-line interface. Fortunately, Ubuntu – like many Linux systems – is open-source, thus there are many GUIs available.
How to Install KVM in Ubuntu
KVM (Kernel-based Virtual Machine) is an open source full virtualization solution for Linux like systems, KVM provides virtualization functionality using the virtualization extensions like Intel VT or AMD-V. Whenever we install KVM on any linux box then it turns it into the hyervisor by loading the kernel modules like kvm-intel.ko( for intel based machines) and kvm-amd.ko ( for amd based machines).
KVM allows us to install and run multiple virtual machines (Windows & Linux). We can create and manage KVM based virtual machines either via virt-manager graphical user interface or virt-install & virsh cli commands.
In this article we will discuss how to install and configure KVM hypervisor on Ubuntu server.
Login to your server and perform the following steps:-
Step 1:- Pre-installation checklist
Check that your CPU supports hardware virtualization
To run KVM, you need a processor that supports hardware virtualization. Intel and AMD both have developed extensions for their processors, deemed respectively Intel VT-x (code name Vanderpool) and AMD-V (code name Pacifica). To see if your processor supports one of these, you can review the output from this command:
egrep -c '(vmx|svm)' /proc/cpuinfo
If 0 it means that your CPU doesn't support hardware virtualization.
If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
By default, if you booted into XEN kernel it will not display svm or vmx flag using the grep command. To see if it is enabled or not from xen, enter:
cat /sys/hypervisor/properties/capabilities
You must see hvm flags in the output.
Alternatively, you may execute:
kvm-ok
which may provide an output like this:
INFO: /dev/kvm exists KVM acceleration can be used
If you see :
INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used
You can still run virtual machines, but it'll be much slower without the KVM extensions.
NOTE: You may see a message like "KVM acceleration can/can NOT be used". This is misleading and only means if KVM is *currently* available (i.e. "turned on"), *not* if it is supported.
Use a 64 bit kernel (if possible)
Running a 64 bit kernel on the host operating system is recommended but not required.
To serve more than 2GB of RAM for your VMs, you must use a 64-bit kernel (see 32bit_and_64bit). On a 32-bit kernel install, you'll be limited to 2GB RAM at maximum for a given VM.
- Also, a 64-bit system can host both 32-bit and 64-bit guests. A 32-bit system can only host 32-bit guests.
To see if your processor is 64-bit, you can run this command:
egrep -c ' lm ' /proc/cpuinfo
If 0 is printed, it means that your CPU is not 64-bit.
If 1 or higher, it is. Note: lm stands for Long Mode which equates to a 64-bit CPU.
Now see if your running kernel is 64-bit, just issue the following command:
uname -m
x86_64 indicates a running 64-bit kernel. If you use see i386, i486, i586 or i686, you're running a 32-bit kernel.
Note: x86_64 is synonymous with amd64.
Step 2:- Installation of KVM
Tuesday, May 5, 2020
How to Install Windows on Ubuntu?
Linux-to-Windows-with-QEMU
Requirements
echo $(egrep '^flags.*(vmx|svm)' /proc/cpuinfo | wc -l)Optional
How to Run the Script
sudo -smkdir /media/script && mount -t tmpfs -o size=1m tmpfs /media/scriptwget -P /media/script https://raw.githubusercontent.com/mediabots/Linux-to-Windows-with-QEMU/master/mediabots_Linux-to-Windows.shchmod +x /media/script/*/media/script/mediabots_Linux-to-Windows.shHow to install XRDP on Ubuntu?
Introduction
Installation
Simple setup with no user logged into console
sudo apt-get -y install xrdp
sudo nano /etc/xrdp/xrdp.ini
encrypt_level=high
sudo ufw allow 3389/tcp
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
polkit.addRule(function(action, subject) {
if ((action.id == “org.freedesktop.color-manager.create-device” || action.id == “org.freedesktop.color-manager.create-profile” || action.id == “org.freedesktop.color-manager.delete-device” || action.id == “org.freedesktop.color-manager.delete-profile” || action.id == “org.freedesktop.color-manager.modify-device” || action.id == “org.freedesktop.color-manager.modify-profile”) && subject.isInGroup(“{group}”))
{
return polkit.Result.YES;
}
});
sudo /etc/init.d/xrdp restart
How to install VNC on Ubuntu
http://www.chiark.greenend.
Follow these commands:
$ sudo apt update
$ sudo apt install xfce4 xfce4-goodies
$ sudo apt install tightvncserver
$ vncserver
$ vncserver -kill :1
$ mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
$ nano ~/.vnc/xstartup
(paste the following in the xstartup file and write out)
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
(Ctrl+O+Enter button to save)
(Ctrl+X button to Exit)
$ sudo chmod +x ~/.vnc/xstartup
$ vncserver
$ sudo nano /etc/systemd/system/vncserver@.service
(paste the following in the window and write out)
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=yourname
Group=yourname
WorkingDirectory=/home/yourname
PIDFile=/home/yourname/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
(Ctrl+O+Enter button to save)
(Ctrl+X button to Exit)
$ sudo systemctl daemon-reload
$ sudo systemctl enable vncserver@1.service
$ vncserver -kill :1
$ sudo systemctl start vncserver@1
$ sudo systemctl status vncserver@1
Tuesday, April 14, 2020
All About RDP
All About Remote Desktop Protocol (RDP)
Remote Desktop Protocol (RDP) is developed by Microsoft. It is a proprietary protocol which gives users a graphical interface to connect to another desktop/Laptop over a secure network connection.Clients exist for most versions of Microsoft Windows (including Windows Mobile), Linux, UNIX, macOS, iOS, Android, and other operating systems. RDP servers are built into Windows operating systems; an RDP server for UNIX and OS X also exists. By default, the server listens on TCP port 3389[1] and UDP port 3389.
Microsoft currently refers to their official RDP client software as Remote Desktop Connection, formerly "Terminal Services Client".
The protocol is an extension of the ITU-T T.128 application sharing protocol. Microsoft makes some specifications public on their website.
Uses of RDP:-
RDP is mainly used for remote management and for the remote access to virtual computers,Applications and for a RDP terminal server.
RDP helps network administrators in remotely diagnosing and resolving problems individual subscribers encounter.
Windows operating system supports almost every version of RDP.
Now RDP for Apple macOS is also available in the online market.
Even the open source version is also available.
Features and functions:-
RDP can support up to 64,000 independent channels for data transmission.Data can be encrypted using 128-bit keys, and the bandwidth reduction feature optimizes the data transfer rate in low-speed connections.
Features:-
RDP includes the following features and capabilities:Encryption
RDP uses RSA Security's RC4 cipher, a stream cipher designed to efficiently encrypt small amounts of data. RC4 is designed for secure communications over networks. Administrators can choose to encrypt data by using a 56- or 128-bit key.Bandwidth reduction features
RDP supports various mechanisms to reduce the amount of data transmitted over a network connection. Mechanisms include data compression, persistent caching of bitmaps, and caching of glyphs and fragments in RAM. The persistent bitmap cache can provide a substantial improvement in performance over low-bandwidth connections, especially when running applications that make extensive use of large bitmaps.Roaming disconnect
A user can manually disconnect from a remote desktop session without logging off. The user is automatically reconnected to their disconnected session when he or she logs back onto the system, either from the same device or a different device. When a user's session is unexpectedly terminated by a network or client failure, the user is disconnected but not logged off.Clipboard mapping
Users can delete, copy, and paste text and graphics between applications running on the local computer and those running in a remote desktop session, and between sessions.Print redirection
Applications running within a remote desktop session can print to a printer attached to the client device.Virtual channels
By using RDP virtual channel architecture, existing applications can be augmented and new applications can be developed to add features that require communications between the client device and an application running in a remote desktop session.Remote control
Computer support staff can view and control a remote desktop session. Sharing input and display graphics between two remote desktop sessions gives a support person the ability to diagnose and resolve problems remotely.Network load balancing
RDP takes advantage of network load balancing (NLB), where available.In addition, RDP contains the following features:
- Support for 24-bit color.
- Improved performance over low-speed dial-up connections through reduced bandwidth.
- Smart Card authentication through Remote Desktop Services.
- Keyboard hooking: The ability to direct special Windows key combinations, in full-screen mode, to the local computer or to a remote computer.
- Sound, drive, port, and network printer redirection: Sounds that occur on the remote computer can be heard on the client computer running the RDP client, and local client drives will be visible to the remote desktop session.
How the remote desktop protocol works
The RDP protocol is designed to provide remote access through port 3389.An RDP-enabled application or service packages the data that is to be transmitted, and the Microsoft Communications Service directs the data to an RDP channel.
From there, the operating system encrypts the RDP data and adds it to a frame so that it can be transmitted.
The Terminal Server Device Redirector Driver handles all RDP protocol activity.
This driver is made up of subcomponents such as the RDP driver (Wdtshare.sys), which handles user interfaces, transfers, encryption, compression and framing.
The transport driver (Tdtcp.sys) is responsible for packaging the protocol in such a way that allows it to be sent across a TCP/IP network.
Security
The protocol has presented some security issues in the past. However, Early versions contained a vulnerability that allowed an RDP session to fall victim to a man-in-the-middle attack, through which the attacker could gain unauthorized access.Newer versions of RDP are far more secure.
More recent Windows operating systems contain a mechanism for specifying which users are allowed to access the system through an RDP session.
There is also an option to prevent anyone from remotely accessing the system unless they are using network-level authentication.
Microsoft provides a number of security related features you can use to increase the security of a remote desktop connection.
You can limit the number of users able to connect, set an account lockout policy, require passwords, encrypt data transmission, change the port the client computer "listens" on and set up an IP address "White List."
A periodic check of the Microsoft Event Viewer will provide a report containing failed login attempts and account lockouts.
The Event Viewer is accessible from the Control Panel "System and Maintenance Administrative Tools" section.
Process
When you begin a remote desktop session, the client computer sends a signal via a standard "listening" port 3389 over the Internet to the host computer asking for permission to connect and log on.The host computer responds by asking for your logon credentials, which it verifies against a list of Remote Desktop Users using an internal authentication process.
Once you log on, display data and keyboard strokes transmit from the host to the client computer, allowing you to view and work with the host computer as if you were sitting directly in front of it.
One thing to keep in mind is that Remote Desktop allows only one connection. If someone attempts to use the host computer, your remote connection will automatically terminate.
Considerations
If you are connecting a home computer to a computer on a business network, firewall issues may require an additional step before the computers can connect and communicate. Establishing a Virtual Private Network (VPN) is one way to accomplish this.Another way is to use a Terminal Services Gateway server.
Both methods require set up by either a network administrator or member of the technical support staff.
-
All About Remote Desktop Protocol (RDP) Remote Desktop Protocol (RDP) is developed by Microsoft. It is a proprietary protocol which give...
-
Linux-to-Windows-with-QEMU For detailed reading visit www.kwikserver.com A Shell Script to Auto install Windows Server on your Linux Sys...
-
Introduction xrdp is a Remote Desktop Protocol (RDP) Server, allowing RDP clients to be presented an X windows desktop to the user. ...
