Ubuntu 18.04 Netease cloud music start installation method

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/a3551736/article/details/80748469

Welcome to my personal blog site http://ljmeng.site

This article focuses on

No password, enter the command terminal musicto open Netease cloud music, and the terminal shut down automatically

Netease cloud music installation

NetEase cloud official website to download the installation package can be installed

Netease cloud music open after installation method

ubuntu 18.04, Netease cloud music v1.1.0
2019-03-10 Update: Updates the startup script, no longer need to sudo permissions and password

The first encounter this problem go directly to the new scheme, without looking old plan

Older programs

Own programs without a password, Netease cloud music open terminal, and the terminal automatically close
1. ~/.bashrcAdd (Music can be replaced with any command you want) end of the line
alias music='. ~/.music.sh' of two points and a space intermediate Note

2. ~/Create a file .music.shdocument reads as follows

#!/bin/bash
echo "password" | sudo -S netease-cloud-music &
sleep 0.1
exit

password changed your password, the file name .misuc.shcan be changed to a different file name
after this setup is complete, open the terminal and type music to open Netease cloud music, and the terminal will automatically shut down .

The new program

Reference from Gangster find without sudo permissions and passwords can be executed.

For the students used the old plan, run the following command

# 修改文件所属用户和组以及权限
sudo chmod -R ${USER}:${USER} ~/.config/netease-cloud-music
sudo chmod -R ${USER}:${USER} ~/.cache/netease-cloud-music

sudo chmod 755 -R ~/.config/netease-cloud-music
sudo chmod 755 -R ~/.cache/netease-cloud-music

# 目录~/.config/netease-cloud-music和~/.cache/netease-cloud-music
# 分别为网易云音乐的配置和缓存文件
# 若不更改权限会造成网易云音乐无法自动登录以及设置丢失问题

Formal steps are as follows:

1. The same is the official website to download and install

2. In the ~/new .music.shscript, which reads as follows:

#!/bin/bash
unset SESSION_MANAGER && netease-cloud-music & #后台运行网易云
disown #使网易云音乐进程不会随终端关闭而结束
exit 0 #自动关闭终端,若不想自动关闭终端可删除该行

3. Set a convenient alias command, the ~/.bashrcadd the following

alias music='. ~/.music.sh'
# 注意在“.”后有一个空格 
# 脚本名.music.sh和命令别名music可自行更换成其他名字

4. restart the computer, or the current command input terminal source ~/.bashrccommencement of step 3 in the alias

5. Enter the command musiccan be started Netease cloud music. While the terminal is automatically turned off

After setting Netease cloud music you can play happily in the Ubuntu 18.04 hh

Welcome to my personal blog site

Guess you like

Origin blog.csdn.net/a3551736/article/details/80748469