Solve the problem of installing VLC and sound on the CentOS7.4KDE desktop

1. Install VLC

1. Download the source

https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/e/epel-release-7-11.noarch.rpm

http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

 

2. Installation source

yum -y localinstall epel-release-7-11.noarch.rpm

yum -y localinstall  nux-dextop-release-0-1.el7.nux.noarch.rpm

 

3. Install vlc

yum -y install vlc

 

Second, solve the root user can not open VLC

It gets the owner of the program, and if it's root, it can't run.
The function used in the program is geteuid(). geteuid is get essensial user id to get the effective user id. Each user has an id, the root user id is 0, and the common user id is more than 1000.
After knowing the principle, you can come up with a solution, which is to replace geteuid with getppid. getppid is to get the parent process id of this process. Since it is an independent process, its parent process is the init process (the first process after startup). The process id is 1 and can never be 0.

 

1. First query the location of the program
which vlc
/usr/bin/vlc

2. Modify
vim /usr/bin/vlc #Display garbled characters, but don’t be afraid, just search for geteuid (only one),
enter /geteuid, enter i to enter the input mode, Change geteuid to getppid, then ESC, enter wq, save and exit

 

3. Solve the problem that the CentsOS7.4kde desktop has no sound when plugged into the headset vlc player

1. Confirm whether there is sound in the system, if there is no sound in the system, please open Phonon to set

 

2. Confirm that the audio settings of the vlc are correct

 "Audio" --> "Audio Device" --> "Built-in Device XXXX" (select the device you set above)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325423940&siteId=291194637