unveil_enable_directories_in_firefox-esr.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/ksh
  2. file=/etc/firefox-esr/unveil.content
  3. if [ ! -f "$file" ]; then
  4. # Copy firefox default config files to /etc/firefox
  5. doas mkdir -p /etc/firefox-esr
  6. # Add directories to unveil.content
  7. {
  8. echo ""
  9. echo "# access to home directories"
  10. echo "~/unnamed/ rwc"
  11. echo "~/pictures/ rwc"
  12. echo "~/Documentos/ rwc"
  13. echo "~/Sync/ rwc"
  14. echo "~/games/ rwc"
  15. echo "~/isos/ rwc"
  16. echo "~/music/ rwc"
  17. } | doas tee -a "$file"
  18. fi
  19. file=/etc/firefox-esr/unveil.main
  20. if [ ! -f "$file" ]; then
  21. # Copy firefox default config files to /etc/firefox
  22. doas mkdir -p /etc/firefox-esr
  23. # Add directories to unveil.main
  24. {
  25. echo ""
  26. echo "# access to home directories"
  27. echo "~/unnamed/ rwc"
  28. echo "~/pictures/ rwc"
  29. echo "~/Documentos/ rwc"
  30. echo "~/Sync/ rwc"
  31. echo "~/games/ rwc"
  32. echo "~/isos/ rwc"
  33. echo "~/music/ rwc"
  34. } | doas tee -a "$file"
  35. fi
  36. file=$HOME/.config/gtk-3.0/bookmarks
  37. if [ ! -f "$file" ]; then
  38. username=$(echo $USER)
  39. {
  40. echo "file:///home/$username/unnamed"
  41. echo "file:///home/$username/pictures"
  42. echo "file:///home/$username/Documentos"
  43. echo "file:///home/$username/Sync"
  44. echo "file:///home/$username/games"
  45. echo "file:///home/$username/isos"
  46. echo "file:///home/$username/music"
  47. echo "file:///home/$username/videos"
  48. } >>$file
  49. fi