安装 Teamspeak 并创建 TeamSpeak3 .desktop 文件

安装 Teamspeak 并创建 TeamSpeak3 .desktop 文件

我对 Ubuntu 还很陌生,我想创建桌面启动器。

我的 TeamSpeak3.desktop 中有这个

[Desktop Entry]
Name=TeamSpeak 3
Comment=TeamSpeak 3 VoIP Communicator
Exec=/opt/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Terminal=false
Type=Application
Categories=Network;Application;
Icon=/opt/TeamSpeak3-Client-linux_amd64/styles/default/logo-128x128.png

~/.local/share/applications/TeamSpeak3.desktop 我的启动器中看不到它,当我双击它时,它只会打开文本文件。我甚至让它可执行 chmod +x TeamSpeak3.desktop

drwx------ 15 hung hung     4096 srp 16 12:29 .
drwxr-xr-x  3 root root     4096 pro  9 19:22 ..
-rw-------  1 hung hung   174627 srp 16 12:29 CHANGELOG
-rwx------  1 hung hung   227136 srp 16 12:29 error_report
drwx------  2 hung hung     4096 srp 16 12:29 gfx
drwx------  3 hung hung     4096 srp 16 12:29 html
drwx------  2 hung hung     4096 srp 16 12:29 iconengines
drwx------  2 hung hung     4096 srp 16 12:29 imageformats
-rwx------  1 hung hung   334520 srp 16 12:29 libc++abi.so.1
-rwx------  1 hung hung  1934744 srp 16 12:29 libcrypto.so.1.0.0
-rwx------  1 hung hung   746960 srp 16 12:29 libc++.so.1
-rwx------  1 hung hung  5842312 srp 16 12:29 libQt5Core.so.5
-rwx------  1 hung hung   484832 srp 16 12:29 libQt5DBus.so.5
-rwx------  1 hung hung  5683224 srp 16 12:29 libQt5Gui.so.5
-rwx------  1 hung hung  1335584 srp 16 12:29 libQt5Network.so.5
-rwx------  1 hung hung   290008 srp 16 12:29 libQt5Positioning.so.5
-rwx------  1 hung hung  3829280 srp 16 12:29 libQt5Qml.so.5
-rwx------  1 hung hung  3831288 srp 16 12:29 libQt5Quick.so.5
-rwx------  1 hung hung   234552 srp 16 12:29 libQt5Sql.so.5
-rwx------  1 hung hung   331232 srp 16 12:29 libQt5Svg.so.5
-rwx------  1 hung hung   117104 srp 16 12:29 libQt5WebChannel.so.5
-rwx------  1 hung hung 67570152 srp 16 12:29 libQt5WebEngineCore.so.5
-rwx------  1 hung hung   208344 srp 16 12:29 libQt5WebEngineWidgets.so.5
-rwx------  1 hung hung  6439120 srp 16 12:29 libQt5Widgets.so.5
-rwx------  1 hung hung  1334528 srp 16 12:29 libQt5XcbQpa.so.5
-rwx------  1 hung hung   180248 srp 16 12:29 libquazip.so
-rwx------  1 hung hung    22936 srp 16 12:29 libsnappy.so.1
-rwx------  1 hung hung   111888 srp 16 12:29 libsrtp.so.0
-rwx------  1 hung hung   383072 srp 16 12:29 libssl.so.1.0.0
-rwx------  1 hung hung    51080 srp 16 12:29 libudev.so.0
-rw-------  1 hung hung     4340 srp 16 12:29 openglblacklist.json
-rwx------  1 hung hung   260232 srp 16 12:29 package_inst
drwx------  2 hung hung     4096 srp 16 12:29 platforms
-rw-------  1 hung hung       26 srp 16 12:29 qt.conf
drwx------  2 hung hung     4096 srp 16 12:29 qtwebengine_locales
-rwx------  1 hung hung    19720 srp 16 12:29 QtWebEngineProcess
drwx------  2 hung hung     4096 srp 16 12:29 resources
drwx------  6 hung hung     4096 srp 16 12:29 sound
drwx------  2 hung hung     4096 srp 16 12:29 soundbackends
drwx------  2 hung hung     4096 srp 16 12:29 sqldrivers
drwx------  3 hung hung     4096 srp 16 12:29 styles
drwx------  2 hung hung     4096 srp 16 12:29 translations
-rwx------  1 hung hung 18987008 srp 16 12:29 ts3client_linux_amd64
-rwx------  1 hung hung     1364 srp 16 12:29 ts3client_runscript.sh
-rwx------  1 hung hung  2206064 srp 16 12:29 update
drwx------  2 hung hung     4096 srp 16 12:29 xcbglintegrations

答案1

好的,您的整个设置中都有一些错误,像这样,它实际上无法工作,所以我将为您完成整个安装过程,以便您可以从错误的地方继续。

  1. 下载TeamSpeak3-Client-linux_amd64-3.1.6.runTeamspeak 网站
  2. 使用以下命令运行TeamSpeak3-Client-linux_amd64-3.1.6.run文件:

    chmod 755 TeamSpeak3-Client-linux_amd64-3.1.6.run
    ./TeamSpeak3-Client-linux_amd64-3.1.6.run
    
  3. 将整个新目录移动/opt

    sudo mv TeamSpeak3-Client-linux_amd64 /opt/
    
  4. 更改移动副本的所有权并递归更改文件权限:

    sudo chown -Rv root:root /opt/TeamSpeak3-Client-linux_amd64
    sudo chmod -Rv 755 /opt/TeamSpeak3-Client-linux_amd64
    
  5. 下载一些 Teamspeak 的漂亮图标,因为提供的看起来不太好,只需在 Google 上搜索teamspeak ico png并下载一个,然后将其移动到/opt/TeamSpeak3-Client-linux_amd64并适当命名;我在这里选择简单teamspeak-icon.png
  6. 创建您的.desktop文件/usr/share/applications(您可以将整个代码块复制并粘贴到终端):

    sudo su &&
    cat > /usr/share/applications/teamspeak.desktop << EOF
    [Desktop Entry]
    Name=TeamSpeak 3
    Comment=TeamSpeak 3 VoIP Communicator
    Exec=/opt/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
    Terminal=false
    Type=Application
    Categories=Network;Application;
    Icon=/opt/TeamSpeak3-Client-linux_amd64/teamspeak-icon.png
    EOF
    exit
    

这样你就可以获得一个可以为系统上每个用户服务的 Teamspeak 客户端。

相关内容