Tag Archives: ubuntu

Install wechat, chrome, etc. on Ubuntu 16.04

Install wechat

Click http://www.jb51.net/article/131179.htm The results don’t work.

It’s apt-get install electronic-wechat. It’s probably over 18 versions.

From %s https://github.com/eeeeeeeeeeeeeeeeeeek/electronic-wechat/releases Downloaded version, decrypted after

sudo gedit /usr/share/applications/ wechat.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=wechat
GenericName=wechat
Exec=/opt/wechat/electronic-wechat
Terminal=false opt/wechat/ wechat.jpg
Type=Application
Comment=wechat_web
Categories=Application;

Installed Google chrome

wget -q -O - http://dl-ssl.google.com/linux/linux_signing_key.pub sudo apt-key add - sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" &>&> /etc/apt/ sources.list .d/ google.list '
sudo apt-get update -y
sudo apt-get install google-chrome-stable y



127.0.1.1 host address in Debian (Ubuntu) hosts file

Sometimes the/etc/hosts file will see the address 127.0.1.1. What is this

127.0.0.1 this loopback address is very common, which is the loop/loopback address of the local interface. But sometimes 127.0.1.1 will appear in the/etc/hosts file. What is the address?This is also a local loop/loopback address.

The reason for this address is that some applications need a fully qualified domain name (FQDN). FQDN requires not only the host name but also the host domain name. Its expression is hostname.domainname

If your host has a static IP address, the FQDN name will be resolved to the static address, otherwise it will be resolved to the local loop address 127.0.1.1. So generally, you won’t see 127.0.1.1.

127.0.0.1 only corresponds to the host name, which is the main difference between the two, as follows

127.0.0.1 hostname
127.0.1.1 hostname.domainname

Of course, it is not necessary to use the 127.0.1.1 IP. Any IP in the 127.0.0.0/8 IP segment specified in RFC can be used. As long as there is no conflict, Debian chooses 127.0.1.1

View the host name
# host name
host name

View the FQDN name
# host name – FQDN
hostname.domainname

About the Ubuntu configuration file apache2 httpd.conf position

About the Ubuntu configuration file, strictly speaking, Apache in Ubuntu (or Apache under Linux?I don’t know what the configuration file is for other distributions of Apache

/Etc/apache2/apache2. Conf, Apache will automatically read the configuration information of this file at startup. Other configuration files, such as httpd.conf And so on are included through the include instruction. These include lines can be found in apache2.conf

Citation

# Include module configuration:

Include /etc/apache2/mods-enabled/*.load

Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:

Include /etc/apache2/ httpd.conf

# Include ports listing

Include /etc/apache2/ ports.conf

……

# Include generic snippets of statements

Include /etc/apache2/conf.d/

# Include the virtual host configurations:

Include /etc/apache2/sites-enabled/

Combined with the comments, you can clearly see the general function of each configuration file. Of course, you can put all the settings in apache2. Conf or httpd.conf Or any configuration file. Apache 2’s division is just a good habit.

The most important thing after installing Apache is to know where the root directory of Web documents is. For Ubuntu, the default is/var/www. How do you know?There is no DocumentRoot item in apache2. Conf, httpd.conf It’s empty again, so it must be in other files. After searching, we found that

/Etc/apache2/sites enabled/000 default

Citation

NameVirtualHost *

<VirtualHost *&>

ServerAdmin webmaster

@localhost

DocumentRoot /var/www/

Ubuntu Resolution Change xrandr Failed to get size of gamma for output default

1.Questions

Version information description: Ubuntu 16.04 lts

After installing Ubuntu, resolution and display do not match . The xrandr command cannot give relevant information. So we tried different methods.

2.Xrandr — addnewmode

This is the most frequently answered method on stackoverflow

gtf 1920 1080 60

1920×1080 resolution, 60Hz refresh rate

So you get a modeline:

"1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

Copy this line and run it

xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync

Add one more:

xrandr --addmode VGA1 "1920x1080_60.00"

Here, vga1 can be HDM and others (have no idea about this)

Finally:

xrandr --output VGA1 --mode "1920x1080_60.00"

But their own is to run xrandr can not give a response, there are errors. So it doesn’t work.

3.xorg.conf

1 sudo vim /etc/xorg.conf

Copy the following:

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync   28.0 - 70.0
        VertRefresh     56.0 - 75.0
EndSection


Section "Device"
        Identifier  "VMware SVGA"
        Driver      "vesa"
EndSection


Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes     "1920x1080_60.00"
        EndSubSection
EndSection

: WQ! (save)

Restart and it’s successful.

4.Postscript

You also see a way to change the grub startup file. But it didn’t work for me.