Advertisement
inukaze

Linux Steam Web Protocol Fix

Jun 8th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. #Variables
  4. MIMESA="$HOME/.local/share/applications/mimeapps.list"
  5. MIMESL=$(cat $HOME/.local/share/applications/mimeapps.list | grep "x-scheme-handler/steam=steam.desktop")
  6. MIMESC="$HOME/.local/share/mime"
  7.  
  8. #Steam Desktop Entry
  9. echo '[Desktop Entry]
  10. Name=Steam
  11. Comment=Application for managing and playing games on Steam
  12. Comment[es]=Aplicación para administrar y ejecutar juegos en Steam
  13. Exec=/usr/bin/steam %U
  14. Icon=steam
  15. Terminal=false
  16. Type=Application
  17. Categories=Network;FileTransfer;Game;
  18. MimeType=x-scheme-handler/steam;
  19. Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;
  20.  
  21. [Desktop Action Store]
  22. Name=Store
  23. Name[es]=Tienda
  24. Exec=steam steam://store
  25.  
  26. [Desktop Action Community]
  27. Name=Community
  28. Name[es]=Comunidad
  29. Exec=steam steam://url/SteamIDControlPage
  30.  
  31. [Desktop Action Library]
  32. Name=Library
  33. Name[es]=Biblioteca
  34. Exec=steam steam://open/games
  35.  
  36. [Desktop Action Servers]
  37. Name=Servers
  38. Name[es]=Servidores
  39. Exec=steam steam://open/servers
  40.  
  41. [Desktop Action Screenshots]
  42. Name=Screenshots
  43. Name[es]=Capturas
  44. Exec=steam steam://open/screenshots
  45.  
  46. [Desktop Action News]
  47. Name=News
  48. Name[es]=Noticias
  49. Exec=steam steam://open/news
  50.  
  51. [Desktop Action Settings]
  52. Name=Settings
  53. Name[es]=Parámetros
  54. Exec=steam steam://open/settings
  55.  
  56. [Desktop Action BigPicture]
  57. Name=Big Picture
  58. Exec=steam steam://open/bigpicture
  59.  
  60. [Desktop Action Friends]
  61. Name=Friends
  62. Name[es]=Amigos
  63. Exec=steam steam://open/friends' | tee "$HOME/.local/share/applications/steam.desktop" &> /dev/null
  64.  
  65. #Let the all users read & execute that desktop entry
  66. chmod a+o+x "$HOME/.local/share/applications/steam.desktop
  67.  
  68. #Add the protocol handler to the user local settings
  69. sed -i '/\[Default Applications\]/a x-scheme-handler/steam=steam.desktop' "$MIMESA"
  70.  
  71. #Update the mime database
  72. update-mime-database $MIMESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement