mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 11:27:32 -03:00
add user flags and temp profile
This commit is contained in:
parent
bb075583c2
commit
04ac4a3855
5 changed files with 133 additions and 44 deletions
|
@ -115,7 +115,7 @@ Icon=@@PACKAGE@@
|
|||
Type=Application
|
||||
Categories=Network;WebBrowser;
|
||||
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
|
||||
Actions=new-window;new-private-window;content-shell;safe-mode;dark-mode;
|
||||
Actions=new-window;new-private-window;temp-profile;content-shell;safe-mode;dark-mode;
|
||||
|
||||
[Desktop Action new-window]
|
||||
Name=New Window
|
||||
|
@ -171,18 +171,6 @@ Name[zh_CN]=新建窗口
|
|||
Name[zh_TW]=開新視窗
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@
|
||||
|
||||
[Desktop Action content-shell]
|
||||
Name=Open Thorium Shell
|
||||
Exec=/usr/bin/thorium-shell %U
|
||||
|
||||
[Desktop Action safe-mode]
|
||||
Name=Open in Safe Mode
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --no-experiments %U
|
||||
|
||||
[Desktop Action dark-mode]
|
||||
Name=Open in Dark Mode
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --force-dark-mode %U
|
||||
|
||||
[Desktop Action new-private-window]
|
||||
Name=New Incognito Window
|
||||
Name[ar]=نافذة جديدة للتصفح المتخفي
|
||||
|
@ -234,3 +222,53 @@ Name[vi]=Cửa sổ ẩn danh mới
|
|||
Name[zh_CN]=新建隐身窗口
|
||||
Name[zh_TW]=新增無痕式視窗
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --incognito
|
||||
|
||||
[Desktop Action temp-profile]
|
||||
Name=Open New Window with a temporary profile
|
||||
Name[ast]=Abrir una ventana nueva con perfil temporal
|
||||
Name[bg]=Отваряне на Нов прозорец с временен профил
|
||||
Name[bn]=সাময়িক প্রোফাইল সহ একটি নতুন উইন্ডো খুলুন
|
||||
Name[bs]=Otvori novi prozor pomoću privremenog profila
|
||||
Name[ca]=Obre una finestra nova amb un perfil temporal
|
||||
Name[ca@valencia]=Obri una finestra nova amb un perfil temporal
|
||||
Name[de]=Ein neues Fenster mit einem temporären Profil öffnen
|
||||
Name[en_AU]=Open a New Window with a temporary profile
|
||||
Name[eo]=Malfermi novan fenestron portempe
|
||||
Name[es]=Abrir una ventana nueva con perfil temporal
|
||||
Name[et]=Ava uus aken ajutise profiiliga
|
||||
Name[eu]=Ireki leiho berria behin-behineko profil batekin
|
||||
Name[fi]=Avaa uusi ikkuna käyttäen väliaikaista profiilia
|
||||
Name[fr]=Ouvrir une nouvelle fenêtre avec un profil temporaire
|
||||
Name[gl]=Abrir unha nova xanela con perfil temporal
|
||||
Name[he]=פתיחת חלון חדש עם פרופיל זמני
|
||||
Name[hy]=Բացել նոր պատուհան ժամանակավոր հատկագրով
|
||||
Name[ia]=Aperi un nove fenestra con un profilo provisori
|
||||
Name[it]=Apri una nuova finestra con un profilo temporaneo
|
||||
Name[ja]=一時プロファイルで新しいウィンドウを開く
|
||||
Name[ka]=ახალი ფანჯრის გახსნა დროებით პროფილში
|
||||
Name[kw]=Egery fenester noweth gen profil dres prys
|
||||
Name[ms]=Buka Tetingkap Baru dengan profil sementara
|
||||
Name[nb]=Åpne et nytt vindu med en midlertidig profil
|
||||
Name[nl]=Nieuw venster openen met een tijdelijk profiel
|
||||
Name[pt_BR]=Abrir uma nova janela com um perfil temporário
|
||||
Name[ro]=Deschide o fereastră nouă cu un profil temporar
|
||||
Name[ru]=Открыть новое окно с временным профилем
|
||||
Name[sl]=Odpri novo okno z začasnim profilom
|
||||
Name[sv]=Öppna ett nytt fönster med temporär profil
|
||||
Name[ug]=ۋاقىتلىق سەپلىمە ھۆججەت بىلەن يېڭى كۆزنەك ئاچ
|
||||
Name[vi]=Mở cửa sổ mới với hồ sơ tạm
|
||||
Name[zh_CN]=以临时配置文件打开新窗口
|
||||
Name[zh_TW]=以暫時性個人身分開啟新視窗
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --temp-profile
|
||||
|
||||
[Desktop Action content-shell]
|
||||
Name=Open Thorium Shell
|
||||
Exec=/usr/bin/thorium-shell %U
|
||||
|
||||
[Desktop Action safe-mode]
|
||||
Name=Open in Safe Mode
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --no-experiments %U
|
||||
|
||||
[Desktop Action dark-mode]
|
||||
Name=Open in Dark Mode
|
||||
Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@ --force-dark-mode %U
|
||||
|
|
|
@ -34,6 +34,11 @@ else
|
|||
fi
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
# Clean up old crash reports (see https://bugs.debian.org/1015931)
|
||||
# after 30 days.
|
||||
find "$HOME/.config/thorium/Crash Reports/pending/" -mtime +30 \
|
||||
\( -name "*.meta" -o -name "*.dmp" \) -exec rm \{\} \;
|
||||
|
||||
# APPNAME for GTK.
|
||||
APPNAME=thorium
|
||||
|
||||
|
@ -47,17 +52,60 @@ TITLE="Thorium Browser"
|
|||
export CHROME_DESKTOP="thorium-browser-unstable.desktop"
|
||||
|
||||
# Set CHROME_VERSION_EXTRA text, which is displayed in the About dialog on chrome://help
|
||||
DIST=`cat /etc/debian_version`
|
||||
export CHROME_VERSION_EXTRA="@@CHANNEL@@, built on Ubuntu 22.04, running on $DIST"
|
||||
# DIST=`cat /etc/debian_version`
|
||||
export CHROME_VERSION_EXTRA="@@CHANNEL@@, built on Linux"
|
||||
|
||||
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
|
||||
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_THORIUM
|
||||
|
||||
# Set config home.
|
||||
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
|
||||
|
||||
usage () {
|
||||
echo "thorium-browser [-h|--help] [--temp-profile] [options] [URL]"
|
||||
echo
|
||||
echo " -h or --help This help screen"
|
||||
echo " --temp-profile Start with a new and temporary profile"
|
||||
echo
|
||||
echo " Other supported options are:"
|
||||
MANWIDTH=80 man thorium-browser-unstable | sed -e '1,/OPTIONS/d; /ENVIRONMENT/,$d'
|
||||
echo " See 'man thorium-browser-unstable' for more details"
|
||||
}
|
||||
|
||||
want_temp_profile=0
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-h | --help | -help )
|
||||
usage
|
||||
exit 0 ;;
|
||||
--temp-profile )
|
||||
want_temp_profile=1
|
||||
shift ;;
|
||||
-- ) # Stop option prcessing
|
||||
shift
|
||||
break ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Allow users to override command-line options with a file.
|
||||
if [[ -f $XDG_CONFIG_HOME/thorium-flags.conf ]]; then
|
||||
CHROME_USER_FLAGS="$(cat $XDG_CONFIG_HOME/thorium-flags.conf)"
|
||||
fi
|
||||
|
||||
# Sanitize std{in,out,err} because they'll be shared with untrusted child
|
||||
# processes (http://crbug.com/376567).
|
||||
exec < /dev/null
|
||||
exec > >(exec cat)
|
||||
exec 2> >(exec cat >&2)
|
||||
|
||||
if [ $want_temp_profile -eq 1 ] ; then
|
||||
TEMP_PROFILE=`mktemp -d`
|
||||
echo "Using temporary profile: $TEMP_PROFILE"
|
||||
CHROME_USER_FLAGS="$CHROME_USER_FLAGS --user-data-dir=$TEMP_PROFILE"
|
||||
fi
|
||||
|
||||
# Launch Thorium
|
||||
# Note: exec -a below is a bashism.
|
||||
exec -a "$0" "$HERE/@@PROGNAME@@" "--enable-experimental-web-platform-features" "--new-canvas-2d-api" "$@"
|
||||
exec -a "$0" "$HERE/@@PROGNAME@@" "--enable-experimental-web-platform-features" "--new-canvas-2d-api" "$CHROME_USER_FLAGS" "$@"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2022 Alex313031. -->
|
||||
|
||||
<!-- Copyright (c) 2023 Alex313031. -->
|
||||
<!--
|
||||
Strings for the management disclosure panel
|
||||
|
||||
|
@ -22,16 +21,16 @@
|
|||
</message>
|
||||
</if>
|
||||
|
||||
<!-- Subtitles of the ChromeOS version of the management page -->
|
||||
<!-- Subtitles of the ThoriumOS version of the management page -->
|
||||
<if expr="chromeos_ash">
|
||||
<message name="IDS_MANAGEMENT_SUBTITLE_MANAGED" desc="Title of chrome://management page, shows when device is managed by an unknown manager">
|
||||
Your <ph name="DEVICE_NAME">$1<ex>Chromebook</ex></ph> is managed
|
||||
Your <ph name="DEVICE_NAME">$1<ex>Thoriumbook</ex></ph> is managed
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_SUBTITLE_MANAGED_BY" desc="Title of chrome://management page, shows when device managed by a known manager. MANAGER can be a domain or an email address.">
|
||||
Your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> is managed by <ph name="MANAGER">$2<ex>example.com</ex></ph>
|
||||
Your <ph name="DEVICE_TYPE">$1<ex>Thoriumbook</ex></ph> is managed by <ph name="MANAGER">$2<ex>example.com</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_NOT_MANAGED_SUBTITLE" desc="Message indicating that the device is not managed">
|
||||
Your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> is not managed
|
||||
Your <ph name="DEVICE_TYPE">$1<ex>Thoriumbook</ex></ph> is not managed
|
||||
</message>
|
||||
</if>
|
||||
|
||||
|
@ -61,25 +60,28 @@
|
|||
<!-- Browser managed status section -->
|
||||
<if expr="not chromeos_ash">
|
||||
<if expr="_google_chrome">
|
||||
<message name="IDS_MANAGEMENT_BROWSER_NOTICE" desc="Message shown when the (Google-branded) Chrome browser is managed, it indicates what the administrator can do on the browser.">
|
||||
Your administrator can change your browser setup remotely. Activity on this device may also be managed outside of Chrome. <ph name="BEGIN_LINK"><a target="_blank" href="$1"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
<message name="IDS_MANAGEMENT_BROWSER_NOTICE" desc="Message shown when the (Google-branded) Thorium browser is managed, it indicates what the administrator can do on the browser.">
|
||||
Your administrator can change your browser setup remotely. Activity on this device may also be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1" aria-label="$2"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_NOT_MANAGED_NOTICE" desc="Message indicating that the (Google-branded) Chrome browser is not managed">
|
||||
This browser is not managed by a company or other organization. Activity on this device may be managed outside of Chrome. <ph name="BEGIN_LINK"><a target="_blank" href="$1"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
<message name="IDS_MANAGEMENT_NOT_MANAGED_NOTICE" desc="Message indicating that the (Google-branded) Thorium browser is not managed">
|
||||
This browser is not managed by a company or other organization. Activity on this device may be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1" aria-label="$2"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not _google_chrome">
|
||||
<message name="IDS_MANAGEMENT_BROWSER_NOTICE" desc="Message shown when the (non-Google-branded) Chromium browser is managed, it indicates what the administrator can do on the browser.">
|
||||
Your administrator can change your browser setup remotely. Activity on this device may also be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
<message name="IDS_MANAGEMENT_BROWSER_NOTICE" desc="Message shown when the (non-Google-branded) Thorium browser is managed, it indicates what the administrator can do on the browser.">
|
||||
Your administrator can change your browser setup remotely. Activity on this device may also be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1" aria-label="$2"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_NOT_MANAGED_NOTICE" desc="Message indicating that the (non-Google-branded) Chromium browser is not managed">
|
||||
This browser is not managed by a company or other organization. Activity on this device may be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
<message name="IDS_MANAGEMENT_NOT_MANAGED_NOTICE" desc="Message indicating that the (non-Google-branded) Thorium browser is not managed">
|
||||
This browser is not managed by a company or other organization. Activity on this device may be managed outside of Thorium. <ph name="BEGIN_LINK"><a target="_blank" href="$1" aria-label="$2"></ph>Learn more<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_MANAGEMENT_LEARN_MORE_ACCCESSIBILITY_TEXT" desc="Accessibility text for a 'Learn more' link that links to a help article about how the browser is managed.">
|
||||
Learn more about how your browser is managed
|
||||
</message>
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<!-- ChromeOS managed status section -->
|
||||
<!-- ThoriumOS managed status section -->
|
||||
<if expr="is_chromeos">
|
||||
<message name="IDS_MANAGEMENT_DEVICE_NOT_MANAGED" desc="Message indicating that the device and account are not managed">
|
||||
This device and account are not managed by a company or other organization.
|
||||
|
@ -165,7 +167,7 @@
|
|||
<message name="IDS_MANAGEMENT_REPORT_LOGIN_LOGOUT" desc="Message stating that administrators can see device Login and Logout events.">
|
||||
Device access actions such as logins (including failed login reasons), logouts, locks, and unlocks
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_REPORT_CRD_SESSIONS" desc="Message stating that administrators can see Chrome Remote Desktop events.">
|
||||
<message name="IDS_MANAGEMENT_REPORT_CRD_SESSIONS" desc="Message stating that administrators can see Thorium Remote Desktop events.">
|
||||
Chrome Remote Desktop history, including timestamps, hosts and client session ids
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_CROSTINI" desc="Message stating that administrators can see Crostini usage">
|
||||
|
@ -184,9 +186,9 @@
|
|||
Your administrator has allowed <ph name="APP_NAME">$1<ex>Plugin VM</ex></ph> to collect diagnostics data to improve the product experience. See <ph name="BEGIN_LINK"><a target="_blank" href="https://www.parallels.com/pcep"></ph>https://www.parallels.com/pcep<ph name="END_LINK"></a></ph> for more information.
|
||||
</message>
|
||||
|
||||
<!-- ChromeOS update required end-of-life reached section -->
|
||||
<!-- ThoriumOS update required end-of-life reached section -->
|
||||
<message name="IDS_MANAGEMENT_UPDATE_REQUIRED_EOL_MESSAGE" desc="Message indicating that the device needs to be returned back before the deadline because the device has reached end-of-life and an update is required as per policy.">
|
||||
<ph name="ENROLLMENT_DOMAIN">$1<ex>example.com</ex></ph> requires you to back up your data and return this <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>.
|
||||
<ph name="ENROLLMENT_DOMAIN">$1<ex>example.com</ex></ph> requires you to back up your data and return this <ph name="DEVICE_TYPE">$2<ex>Thoriumbook</ex></ph>.
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_UPDATE_REQUIRED_EOL_ADMIN_MESSAGE_TITLE" desc="Message indicating return instructions from the device administrator because the device cannot be updated as it has reached its end of life.">
|
||||
Instructions from your device administrator:
|
||||
|
@ -237,7 +239,7 @@
|
|||
Your device name and network address
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_EXTENSION_REPORT_USERNAME" desc="Message explaining that an extension currently reports the user's username" formatter_data="android_java">
|
||||
Your device username and Chrome username
|
||||
Your device username and Thorium username
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_EXTENSION_REPORT_VERSION" desc="Message explaining that an extension currently reports the user's browser and machine version" formatter_data="android_java">
|
||||
Version information about your device and browser
|
||||
|
@ -252,15 +254,15 @@
|
|||
Performance data and crash reports
|
||||
</message>
|
||||
|
||||
<!-- Strings related to Chrome Enterprise Connectors -->
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION" desc="Title of the Chrome Enterprise Connectors section of the page">
|
||||
Chrome Enterprise Connectors
|
||||
<!-- Strings related to Thorium Enterprise Connectors -->
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION" desc="Title of the Thorium Enterprise Connectors section of the page">
|
||||
Thorium Enterprise Connectors
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION_DESCRIPTION" desc="Description of the Chrome Enterprise Connectors section of the page">
|
||||
Your administrator has turned on Chrome Enterprise Connectors on your browser. These connectors have access to some of your data.
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION_DESCRIPTION" desc="Description of the Thorium Enterprise Connectors section of the page">
|
||||
Your administrator has turned on Thorium Enterprise Connectors on your browser. These connectors have access to some of your data.
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION_DESCRIPTION_BY" desc="Description of the Chrome Enterprise Connectors section of the page">
|
||||
<ph name="ENROLLMENT_DOMAIN">$1<ex>example.com</ex></ph> has turned on Chrome Enterprise Connectors on your browser. These connectors have access to some of your data.
|
||||
<message name="IDS_MANAGEMENT_THREAT_PROTECTION_DESCRIPTION_BY" desc="Description of the Thorium Enterprise Connectors section of the page">
|
||||
<ph name="ENROLLMENT_DOMAIN">$1<ex>example.com</ex></ph> has turned on Thorium Enterprise Connectors on your browser. These connectors have access to some of your data.
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_CONNECTORS_EVENT" desc="Title of a column of the Connectors table showing the event that triggers a Connector">
|
||||
Event
|
||||
|
@ -305,7 +307,7 @@
|
|||
Files you copy or move are sent to Google Cloud or third parties for analysis. For example, they might be scanned for sensitive data or malware.
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_ENTERPRISE_REPORTING_VISIBLE_DATA" desc="Description of the visible data for the Connectors reporting feature">
|
||||
When security events are flagged by Chrome, relevant data about the events is sent to your administrator. This can include URLs of pages you visit in Chrome, file names or metadata, and the username that you use to sign in to web based applications, your device and Chrome.
|
||||
When security events are flagged by Thorium, relevant data about the events is sent to your administrator. This can include URLs of pages you visit in Thorium, file names or metadata, and the username that you use to sign in to web based applications, your device and Thorium.
|
||||
</message>
|
||||
<message name="IDS_MANAGEMENT_PAGE_VISITED_VISIBLE_DATA" desc="Description of the visible data for the real time URL check feature.">
|
||||
URLs of pages you visit are sent to Google Cloud or third parties for analysis. For example, they might be scanned to detect unsafe websites.
|
||||
|
|
|
@ -3303,6 +3303,7 @@ bool VaapiWrapper::CreateSurfaces(
|
|||
DCHECK(va_surfaces->empty());
|
||||
|
||||
va_surfaces->resize(num_surfaces);
|
||||
VASurfaceAttrib attribute;
|
||||
|
||||
if (GetImplementationType() != VAImplementation::kNVIDIAVDPAU) {
|
||||
// Nvidia's VAAPI-VDPAU driver doesn't support this attribute
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
/opt/chromium.org/thorium/thorium_shell --no-default-browser-check --enable-experimental-web-platform-features --new-canvas-2d-api --enable-clear-hevc-for-testing $@
|
||||
/opt/chromium.org/thorium/thorium_shell --enable-experimental-web-platform-features --new-canvas-2d-api --enable-clear-hevc-for-testing $@
|
||||
|
|
Loading…
Reference in a new issue