[tbb-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40924: Customize the remoting name.

richard (@richard) git at gitlab.torproject.org
Thu Aug 17 18:30:30 UTC 2023



richard pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
1e151f80 by Pier Angelo Vendrame at 2023-08-17T18:15:47+00:00
Bug 40924: Customize the remoting name.

Firefox uses the remote name also as GTK's prgname, which is then shown
in some UI elements like GNOME's Alt-Tab.
We used to customize it with --class and --name on Linux, but these
options are lost when restarting the browser after an update.

On other platforms it should not have evident consequences.

- - - - -


4 changed files:

- projects/browser/RelativeLink/start-browser
- projects/browser/RelativeLink/start-browser.desktop
- projects/firefox/mozconfig
- rbm.conf


Changes:

=====================================
projects/browser/RelativeLink/start-browser
=====================================
@@ -365,23 +365,18 @@ cd "${HOME}"
 
 if [ "$show_usage" -eq 1 ]; then
     # Display Firefox help, then our help
-    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
-        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" --help 2>/dev/null
+    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] --help 2>/dev/null
     print_usage
 elif [ "$detach" -eq 1 ] ; then
-    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
-        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null &
-    disown "$!"
+    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] "${@}" > "$logfile" 2>&1 </dev/null &
+        disown "$!"
 elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then
-    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
-        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" 2>&1 </dev/null | \
+    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] "${@}" 2>&1 </dev/null | \
         tee "$logfile"
 elif [ "$show_output" -eq 1 ]; then
-    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
-        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" < /dev/null
+    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] "${@}" < /dev/null
 else
-    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
-        --class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null
+    [% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] "${@}" > "$logfile" 2>&1 </dev/null
 fi
 
 exit $?


=====================================
projects/browser/RelativeLink/start-browser.desktop
=====================================
@@ -31,4 +31,4 @@ Categories=Network;WebBrowser;Security;
 Exec=sh -c '"$(dirname "$*")"/Browser/start-[% c("var/project-name") %]  --detach || ([ ! -x "$(dirname "$*")"/Browser/start-[% c("var/project-name") %] ] && "$(dirname "$*")"/start-[% c("var/project-name") %] --detach)' dummy %k
 X-[% c("var/ProjectName") %]-ExecShell=./Browser/start-[% c("var/project-name") %] --detach
 Icon=web-browser
-StartupWMClass=[% c("var/Project_Name") %]
+StartupWMClass=[% c("var/Project_Name_Channel") %]


=====================================
projects/firefox/mozconfig
=====================================
@@ -74,6 +74,8 @@ ac_add_options --[% IF c("var/updater_enabled") %]enable[% ELSE %]disable[% END
 
 mk_add_options MOZ_PARALLEL_BUILD=[% c("num_procs") %]
 
+export MOZ_APP_REMOTINGNAME="[% c('var/Project_Name_Channel') %]"
+
 export MOZ_INCLUDE_SOURCE_INFO=1
 export MOZ_SOURCE_REPO="[% c('var/gitlab_project') %]"
 export MOZ_SOURCE_CHANGESET=[% c("var/git_commit") %]


=====================================
rbm.conf
=====================================
@@ -107,6 +107,7 @@ var:
     [% SET step = c("step") -%]
     [% c(step, { filename => 'f', output_dir => '/out', norec => {} }) %]
 
+  Project_Name_Channel: '[% c("var/Project_Name") %] [% c("var/channel") FILTER ucfirst %]'
   exe_name: firefox
   locale_ja: ja
   locales:
@@ -230,6 +231,7 @@ targets:
     var:
       release: 1
       channel: release
+      Project_Name_Channel: '[% c("var/Project_Name") %]'
   alpha:
     var:
       alpha: 1



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1e151f802295c33b6ecd3859d8e079fc5c36e1d0

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1e151f802295c33b6ecd3859d8e079fc5c36e1d0
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230817/1256f202/attachment-0001.htm>


More information about the tbb-commits mailing list