Skip to content

Commit c38cab2

Browse files
authored
Merge pull request #398 from trycua/feat/kasm-firefox
2 parents 796835b + 03b23a3 commit c38cab2

File tree

6 files changed

+578
-2
lines changed

6 files changed

+578
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ Join our [Discord community](https://discord.com/invite/mVnXXpdE85) to discuss i
188188

189189
Cua is open-sourced under the MIT License - see the [LICENSE](LICENSE) file for details.
190190

191-
The base image `kasmweb/core-ubuntu-jammy` is maintained by [Kasm Technologies](https://github.com/kasmtech/workspaces-core-images) and distributed under the Apache License 2.0. Usage of that image is subject to its own license terms.
191+
Portions of this project, specifically components adapted from Kasm Technologies Inc., are also licensed under the MIT License. See [libs/kasm/LICENSE](libs/kasm/LICENSE) for details.
192192

193-
Microsoft's OmniParser, which is used in this project, is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0) - see the [OmniParser LICENSE](https://github.com/microsoft/OmniParser/blob/master/LICENSE) file for details.
193+
Microsoft's OmniParser, which is used in this project, is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0). See the [OmniParser LICENSE](https://github.com/microsoft/OmniParser/blob/master/LICENSE) for details.
194194

195195
### Third-Party Licenses and Optional Components
196196

libs/kasm/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ gnome-screenshot wmctrl ffmpeg socat xclip
1818

1919
RUN pip install cua-computer-server
2020

21+
# Install Firefox
22+
ENV DEBIAN_FRONTEND=noninteractive \
23+
INST_DIR=$STARTUPDIR/install
24+
COPY ./src/ $INST_DIR
25+
RUN bash ${INST_DIR}/ubuntu/install/firefox/install_firefox.sh
26+
2127
# Disable SSL requirement
2228
RUN sed -i 's/require_ssl: true/require_ssl: false/g' /usr/share/kasmvnc/kasmvnc_defaults.yaml
2329
RUN sed -i 's/-sslOnly//g' /dockerstartup/vnc_startup.sh

libs/kasm/LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# LICENSE
2+
3+
MIT License
4+
5+
Copyright (c) 2025 Cua AI, Inc.
6+
Portions Copyright (c) 2022 Kasm Technologies Inc.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
START_COMMAND="firefox"
4+
PGREP="firefox"
5+
export MAXIMIZE="true"
6+
export MAXIMIZE_NAME="Mozilla Firefox"
7+
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
8+
DEFAULT_ARGS=""
9+
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
10+
11+
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
12+
eval set -- "$options"
13+
14+
while [[ $1 != -- ]]; do
15+
case $1 in
16+
-g|--go) GO='true'; shift 1;;
17+
-a|--assign) ASSIGN='true'; shift 1;;
18+
-u|--url) OPT_URL=$2; shift 2;;
19+
*) echo "bad option: $1" >&2; exit 1;;
20+
esac
21+
done
22+
shift
23+
24+
# Process non-option arguments.
25+
for arg; do
26+
echo "arg! $arg"
27+
done
28+
29+
FORCE=$2
30+
31+
# run with vgl if GPU is available
32+
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "${KASM_EGL_CARD}" ] && [ ! -z "${KASM_RENDERD}" ] && [ -O "${KASM_RENDERD}" ] && [ -O "${KASM_EGL_CARD}" ] ; then
33+
START_COMMAND="/opt/VirtualGL/bin/vglrun -d ${KASM_EGL_CARD} $START_COMMAND"
34+
fi
35+
36+
kasm_exec() {
37+
if [ -n "$OPT_URL" ] ; then
38+
URL=$OPT_URL
39+
elif [ -n "$1" ] ; then
40+
URL=$1
41+
fi
42+
43+
# Since we are execing into a container that already has the browser running from startup,
44+
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
45+
if [ -n "$URL" ] ; then
46+
/usr/bin/filter_ready
47+
/usr/bin/desktop_ready
48+
bash ${MAXIMIZE_SCRIPT} &
49+
$START_COMMAND $ARGS $OPT_URL
50+
else
51+
echo "No URL specified for exec command. Doing nothing."
52+
fi
53+
}
54+
55+
kasm_startup() {
56+
if [ -n "$KASM_URL" ] ; then
57+
URL=$KASM_URL
58+
elif [ -z "$URL" ] ; then
59+
URL=$LAUNCH_URL
60+
fi
61+
62+
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
63+
64+
echo "Entering process startup loop"
65+
set +x
66+
while true
67+
do
68+
if ! pgrep -x $PGREP > /dev/null
69+
then
70+
/usr/bin/filter_ready
71+
/usr/bin/desktop_ready
72+
set +e
73+
bash ${MAXIMIZE_SCRIPT} &
74+
$START_COMMAND $ARGS $URL
75+
set -e
76+
fi
77+
sleep 1
78+
done
79+
set -x
80+
81+
fi
82+
83+
}
84+
85+
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
86+
kasm_exec
87+
else
88+
kasm_startup
89+
fi
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Name=Firefox Web Browser
4+
Name[ar]=متصفح الويب فَيَرفُكْس
5+
Name[ast]=Restolador web Firefox
6+
Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার
7+
Name[ca]=Navegador web Firefox
8+
Name[cs]=Firefox Webový prohlížeč
9+
Name[da]=Firefox - internetbrowser
10+
Name[el]=Περιηγητής Firefox
11+
Name[es]=Navegador web Firefox
12+
Name[et]=Firefoxi veebibrauser
13+
Name[fa]=مرورگر اینترنتی Firefox
14+
Name[fi]=Firefox-selain
15+
Name[fr]=Navigateur Web Firefox
16+
Name[gl]=Navegador web Firefox
17+
Name[he]=דפדפן האינטרנט Firefox
18+
Name[hr]=Firefox web preglednik
19+
Name[hu]=Firefox webböngésző
20+
Name[it]=Firefox Browser Web
21+
Name[ja]=Firefox ウェブ・ブラウザ
22+
Name[ko]=Firefox 웹 브라우저
23+
Name[ku]=Geroka torê Firefox
24+
Name[lt]=Firefox interneto naršyklė
25+
Name[nb]=Firefox Nettleser
26+
Name[nl]=Firefox webbrowser
27+
Name[nn]=Firefox Nettlesar
28+
Name[no]=Firefox Nettleser
29+
Name[pl]=Przeglądarka WWW Firefox
30+
Name[pt]=Firefox Navegador Web
31+
Name[pt_BR]=Navegador Web Firefox
32+
Name[ro]=Firefox – Navigator Internet
33+
Name[ru]=Веб-браузер Firefox
34+
Name[sk]=Firefox - internetový prehliadač
35+
Name[sl]=Firefox spletni brskalnik
36+
Name[sv]=Firefox webbläsare
37+
Name[tr]=Firefox Web Tarayıcısı
38+
Name[ug]=Firefox توركۆرگۈ
39+
Name[uk]=Веб-браузер Firefox
40+
Name[vi]=Trình duyệt web Firefox
41+
Name[zh_CN]=Firefox 网络浏览器
42+
Name[zh_TW]=Firefox 網路瀏覽器
43+
Comment=Browse the World Wide Web
44+
Comment[ar]=تصفح الشبكة العنكبوتية العالمية
45+
Comment[ast]=Restola pela Rede
46+
Comment[bn]=ইন্টারনেট ব্রাউজ করুন
47+
Comment[ca]=Navegueu per la web
48+
Comment[cs]=Prohlížení stránek World Wide Webu
49+
Comment[da]=Surf på internettet
50+
Comment[de]=Im Internet surfen
51+
Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
52+
Comment[es]=Navegue por la web
53+
Comment[et]=Lehitse veebi
54+
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
55+
Comment[fi]=Selaa Internetin WWW-sivuja
56+
Comment[fr]=Naviguer sur le Web
57+
Comment[gl]=Navegar pola rede
58+
Comment[he]=גלישה ברחבי האינטרנט
59+
Comment[hr]=Pretražite web
60+
Comment[hu]=A világháló böngészése
61+
Comment[it]=Esplora il web
62+
Comment[ja]=ウェブを閲覧します
63+
Comment[ko]=웹을 돌아 다닙니다
64+
Comment[ku]=Li torê bigere
65+
Comment[lt]=Naršykite internete
66+
Comment[nb]=Surf på nettet
67+
Comment[nl]=Verken het internet
68+
Comment[nn]=Surf på nettet
69+
Comment[no]=Surf på nettet
70+
Comment[pl]=Przeglądanie stron WWW
71+
Comment[pt]=Navegue na Internet
72+
Comment[pt_BR]=Navegue na Internet
73+
Comment[ro]=Navigați pe Internet
74+
Comment[ru]=Доступ в Интернет
75+
Comment[sk]=Prehliadanie internetu
76+
Comment[sl]=Brskajte po spletu
77+
Comment[sv]=Surfa på webben
78+
Comment[tr]=İnternet'te Gezinin
79+
Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
80+
Comment[uk]=Перегляд сторінок Інтернету
81+
Comment[vi]=Để duyệt các trang web
82+
Comment[zh_CN]=浏览互联网
83+
Comment[zh_TW]=瀏覽網際網路
84+
GenericName=Web Browser
85+
GenericName[ar]=متصفح ويب
86+
GenericName[ast]=Restolador Web
87+
GenericName[bn]=ওয়েব ব্রাউজার
88+
GenericName[ca]=Navegador web
89+
GenericName[cs]=Webový prohlížeč
90+
GenericName[da]=Webbrowser
91+
GenericName[el]=Περιηγητής διαδικτύου
92+
GenericName[es]=Navegador web
93+
GenericName[et]=Veebibrauser
94+
GenericName[fa]=مرورگر اینترنتی
95+
GenericName[fi]=WWW-selain
96+
GenericName[fr]=Navigateur Web
97+
GenericName[gl]=Navegador Web
98+
GenericName[he]=דפדפן אינטרנט
99+
GenericName[hr]=Web preglednik
100+
GenericName[hu]=Webböngésző
101+
GenericName[it]=Browser web
102+
GenericName[ja]=ウェブ・ブラウザ
103+
GenericName[ko]=웹 브라우저
104+
GenericName[ku]=Geroka torê
105+
GenericName[lt]=Interneto naršyklė
106+
GenericName[nb]=Nettleser
107+
GenericName[nl]=Webbrowser
108+
GenericName[nn]=Nettlesar
109+
GenericName[no]=Nettleser
110+
GenericName[pl]=Przeglądarka WWW
111+
GenericName[pt]=Navegador Web
112+
GenericName[pt_BR]=Navegador Web
113+
GenericName[ro]=Navigator Internet
114+
GenericName[ru]=Веб-браузер
115+
GenericName[sk]=Internetový prehliadač
116+
GenericName[sl]=Spletni brskalnik
117+
GenericName[sv]=Webbläsare
118+
GenericName[tr]=Web Tarayıcı
119+
GenericName[ug]=توركۆرگۈ
120+
GenericName[uk]=Веб-браузер
121+
GenericName[vi]=Trình duyệt Web
122+
GenericName[zh_CN]=网络浏览器
123+
GenericName[zh_TW]=網路瀏覽器
124+
Keywords=Internet;WWW;Browser;Web;Explorer
125+
Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب
126+
Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador
127+
Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer
128+
Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer
129+
Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet
130+
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
131+
Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ
132+
Keywords[es]=Explorador;Internet;WWW
133+
Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa
134+
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
135+
Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה;
136+
Keywords[hr]=Internet;WWW;preglednik;Web
137+
Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer
138+
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
139+
Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk
140+
Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ
141+
Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside
142+
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online
143+
Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador
144+
Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador
145+
Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис
146+
Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer
147+
Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet
148+
Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara
149+
Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд
150+
Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web
151+
Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站;
152+
Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐
153+
Exec=firefox %u
154+
Terminal=false
155+
X-MultipleArgs=false
156+
Type=Application
157+
Icon=/usr/lib/firefox/browser/chrome/icons/default/default128.png
158+
Categories=GNOME;GTK;Network;WebBrowser;
159+
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
160+
StartupNotify=true
161+
Actions=NewWindow;NewPrivateWindow;
162+
163+
[Desktop Action NewWindow]
164+
Name=Open a New Window
165+
Name[ar]=افتح نافذة جديدة
166+
Name[ast]=Abrir una ventana nueva
167+
Name[bn]=Abrir una ventana nueva
168+
Name[ca]=Obre una finestra nova
169+
Name[cs]=Otevřít nové okno
170+
Name[da]=Åbn et nyt vindue
171+
Name[de]=Ein neues Fenster öffnen
172+
Name[el]=Άνοιγμα νέου παραθύρου
173+
Name[es]=Abrir una ventana nueva
174+
Name[fi]=Avaa uusi ikkuna
175+
Name[fr]=Ouvrir une nouvelle fenêtre
176+
Name[gl]=Abrir unha nova xanela
177+
Name[he]=פתיחת חלון חדש
178+
Name[hr]=Otvori novi prozor
179+
Name[hu]=Új ablak nyitása
180+
Name[it]=Apri una nuova finestra
181+
Name[ja]=新しいウィンドウを開く
182+
Name[ko]=새 창 열기
183+
Name[ku]=Paceyeke nû veke
184+
Name[lt]=Atverti naują langą
185+
Name[nb]=Åpne et nytt vindu
186+
Name[nl]=Nieuw venster openen
187+
Name[pt]=Abrir nova janela
188+
Name[pt_BR]=Abrir nova janela
189+
Name[ro]=Deschide o fereastră nouă
190+
Name[ru]=Новое окно
191+
Name[sk]=Otvoriť nové okno
192+
Name[sl]=Odpri novo okno
193+
Name[sv]=Öppna ett nytt fönster
194+
Name[tr]=Yeni pencere aç
195+
Name[ug]=يېڭى كۆزنەك ئېچىش
196+
Name[uk]=Відкрити нове вікно
197+
Name[vi]=Mở cửa sổ mới
198+
Name[zh_CN]=新建窗口
199+
Name[zh_TW]=開啟新視窗
200+
Exec=firefox -new-window
201+
OnlyShowIn=Unity;
202+
203+
[Desktop Action NewPrivateWindow]
204+
Name=Open a New Private Window
205+
Name[ar]=افتح نافذة جديدة للتصفح الخاص
206+
Name[ca]=Obre una finestra nova en mode d'incògnit
207+
Name[de]=Ein neues privates Fenster öffnen
208+
Name[es]=Abrir una ventana privada nueva
209+
Name[fi]=Avaa uusi yksityinen ikkuna
210+
Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée
211+
Name[he]=פתיחת חלון גלישה פרטית חדש
212+
Name[hu]=Új privát ablak nyitása
213+
Name[it]=Apri una nuova finestra anonima
214+
Name[nb]=Åpne et nytt privat vindu
215+
Name[ru]=Новое приватное окно
216+
Name[sl]=Odpri novo okno zasebnega brskanja
217+
Name[tr]=Yeni bir pencere aç
218+
Name[uk]=Відкрити нове вікно у потайливому режимі
219+
Name[zh_TW]=開啟新隱私瀏覽視窗
220+
Exec=firefox -private-window
221+
OnlyShowIn=Unity;

0 commit comments

Comments
 (0)