Compare commits
3 Commits
video
...
xdg-portal
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0df8de241e | ||
|
|
905a65b0cd | ||
|
|
29e0e2bd2e |
@@ -34,6 +34,11 @@ RUN apt-get purge -y pm-utils xscreensaver*
|
|||||||
RUN apt-get update && apt-get install -y vim less
|
RUN apt-get update && apt-get install -y vim less
|
||||||
RUN apt-get update && apt-get -y install lsb-release
|
RUN apt-get update && apt-get -y install lsb-release
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get -y install xdg-desktop-portal firefox-esr
|
||||||
|
COPY ./xdg-desktop-portal-gtk_1.2.0-1_amd64.deb /tmp
|
||||||
|
RUN apt-get install -y /tmp/xdg-*.deb
|
||||||
|
# RUN apt-get install -y xdg-desktop-portal-gtk
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
RUN mkdir -p $STARTUPDIR
|
RUN mkdir -p $STARTUPDIR
|
||||||
@@ -47,8 +52,12 @@ RUN dpkg -i /tmp/*.deb; apt-get -yf install
|
|||||||
|
|
||||||
### END CUSTOM STUFF ###
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN sed -i -e 's/about:home/postimages.org/' /usr/lib/firefox-esr/browser/defaults/preferences/firefox.js
|
||||||
|
RUN sed -i -e '/browser.startup.firstrunSkipsHomepage/d' /usr/lib/firefox-esr/browser/defaults/preferences/firefox.js
|
||||||
|
RUN echo 'pref("browser.startup.firstrunSkipsHomepage", false);' >> /usr/lib/firefox-esr/browser/defaults/preferences/firefox.js
|
||||||
RUN chown -R 1000:0 $HOME
|
RUN chown -R 1000:0 $HOME
|
||||||
USER 1000:ssl-cert
|
USER 1000:ssl-cert
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENV GTK_USE_PORTAL=1
|
||||||
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm l
|
|||||||
RUN apt-get purge -y pm-utils xscreensaver*
|
RUN apt-get purge -y pm-utils xscreensaver*
|
||||||
RUN apt-get update && apt-get install -y vim less
|
RUN apt-get update && apt-get install -y vim less
|
||||||
RUN apt-get update && apt-get -y install lsb-release
|
RUN apt-get update && apt-get -y install lsb-release
|
||||||
|
RUN apt-get update && apt-get -y install xdg-desktop-portal xdg-desktop-portal-gtk firefox
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
@@ -47,8 +48,12 @@ RUN dpkg -i /tmp/*.deb; apt-get -yf install
|
|||||||
|
|
||||||
### END CUSTOM STUFF ###
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN echo 'pref("browser.startup.firstrunSkipsHomepage", false);' >> /usr/lib/firefox/browser/defaults/preferences/syspref.js
|
||||||
|
RUN echo 'pref("browser.startup.homepage", "postimages.org");' >> /usr/lib/firefox/browser/defaults/preferences/syspref.js
|
||||||
|
|
||||||
RUN chown -R 1000:0 $HOME
|
RUN chown -R 1000:0 $HOME
|
||||||
USER 1000:ssl-cert
|
USER 1000:ssl-cert
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENV GTK_USE_PORTAL=1
|
||||||
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ detect_www_dir
|
|||||||
detect_cert_location
|
detect_cert_location
|
||||||
[ -n "$KASMVNC_VERBOSE_LOGGING" ] && verbose_logging_option="-log *:stderr:100"
|
[ -n "$KASMVNC_VERBOSE_LOGGING" ] && verbose_logging_option="-log *:stderr:100"
|
||||||
|
|
||||||
|
# dbus-daemon --session --address=systemd: --nofork --nopidfile --syslog-only &
|
||||||
|
|
||||||
echo -e "start vncserver with param: VNC_COL_DEPTH=$VNC_COL_DEPTH, VNC_RESOLUTION=$VNC_RESOLUTION\n..."
|
echo -e "start vncserver with param: VNC_COL_DEPTH=$VNC_COL_DEPTH, VNC_RESOLUTION=$VNC_RESOLUTION\n..."
|
||||||
vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -FrameRate=$MAX_FRAME_RATE -websocketPort $VNC_PORT $cert_option -sslOnly -interface 0.0.0.0 $VNCOPTIONS $package_www_dir_option $verbose_logging_option #&> $STARTUPDIR/no_vnc_startup.log
|
vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -FrameRate=$MAX_FRAME_RATE -websocketPort $VNC_PORT $cert_option -sslOnly -interface 0.0.0.0 $VNCOPTIONS $package_www_dir_option $verbose_logging_option #&> $STARTUPDIR/no_vnc_startup.log
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace rfb {
|
|||||||
int w, int h,
|
int w, int h,
|
||||||
const ScreenSet& layout);
|
const ScreenSet& layout);
|
||||||
virtual void setCursor(int width, int height, const Point& hotspot,
|
virtual void setCursor(int width, int height, const Point& hotspot,
|
||||||
const rdr::U8* data) = 0;
|
const rdr::U8* data, const bool resizing = false) = 0;
|
||||||
virtual void setPixelFormat(const PixelFormat& pf);
|
virtual void setPixelFormat(const PixelFormat& pf);
|
||||||
virtual void setName(const char* name);
|
virtual void setName(const char* name);
|
||||||
virtual void fence(rdr::U32 flags, unsigned len, const char data[]);
|
virtual void fence(rdr::U32 flags, unsigned len, const char data[]);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace rfb {
|
|||||||
// cursorData argument contains width*height rgba quadruplets with
|
// cursorData argument contains width*height rgba quadruplets with
|
||||||
// non-premultiplied alpha.
|
// non-premultiplied alpha.
|
||||||
virtual void setCursor(int width, int height, const Point& hotspot,
|
virtual void setCursor(int width, int height, const Point& hotspot,
|
||||||
const rdr::U8* cursorData) = 0;
|
const rdr::U8* cursorData, const bool resizing = false) = 0;
|
||||||
|
|
||||||
// setCursorPos() tells the server the current position of the cursor, and
|
// setCursorPos() tells the server the current position of the cursor, and
|
||||||
// whether the server initiated that change (e.g. through another X11
|
// whether the server initiated that change (e.g. through another X11
|
||||||
|
|||||||
@@ -579,7 +579,7 @@ void VNCServerST::add_copied(const Region& dest, const Point& delta)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VNCServerST::setCursor(int width, int height, const Point& newHotspot,
|
void VNCServerST::setCursor(int width, int height, const Point& newHotspot,
|
||||||
const rdr::U8* data)
|
const rdr::U8* data, const bool resizing)
|
||||||
{
|
{
|
||||||
delete cursor;
|
delete cursor;
|
||||||
cursor = new Cursor(width, height, newHotspot, data);
|
cursor = new Cursor(width, height, newHotspot, data);
|
||||||
@@ -587,6 +587,13 @@ void VNCServerST::setCursor(int width, int height, const Point& newHotspot,
|
|||||||
|
|
||||||
renderedCursorInvalid = true;
|
renderedCursorInvalid = true;
|
||||||
|
|
||||||
|
// If an app has an animated cursor on the resized edge, X internals
|
||||||
|
// will call for it to be rendered. Unlucky for us, the VNC screen
|
||||||
|
// is currently pointing to freed memory, and a cursor change
|
||||||
|
// would want to send a screen update. So, don't do that.
|
||||||
|
if (resizing)
|
||||||
|
return;
|
||||||
|
|
||||||
std::list<VNCSConnectionST*>::iterator ci, ci_next;
|
std::list<VNCSConnectionST*>::iterator ci, ci_next;
|
||||||
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
|
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
|
||||||
ci_next = ci; ci_next++;
|
ci_next = ci; ci_next++;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ namespace rfb {
|
|||||||
virtual void add_changed(const Region ®ion);
|
virtual void add_changed(const Region ®ion);
|
||||||
virtual void add_copied(const Region &dest, const Point &delta);
|
virtual void add_copied(const Region &dest, const Point &delta);
|
||||||
virtual void setCursor(int width, int height, const Point& hotspot,
|
virtual void setCursor(int width, int height, const Point& hotspot,
|
||||||
const rdr::U8* data);
|
const rdr::U8* data, const bool resizing = false);
|
||||||
virtual void setCursorPos(const Point& p, bool warped);
|
virtual void setCursorPos(const Point& p, bool warped);
|
||||||
virtual void setLEDState(unsigned state);
|
virtual void setLEDState(unsigned state);
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ XserverDesktop::XserverDesktop(int screenIndex_,
|
|||||||
: screenIndex(screenIndex_),
|
: screenIndex(screenIndex_),
|
||||||
server(0), listeners(listeners_),
|
server(0), listeners(listeners_),
|
||||||
directFbptr(true),
|
directFbptr(true),
|
||||||
queryConnectId(0), queryConnectTimer(this)
|
queryConnectId(0), queryConnectTimer(this), resizing(false)
|
||||||
{
|
{
|
||||||
format = pf;
|
format = pf;
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ void XserverDesktop::setCursor(int width, int height, int hotX, int hotY,
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
server->setCursor(width, height, Point(hotX, hotY), cursorData);
|
server->setCursor(width, height, Point(hotX, hotY), cursorData, resizing);
|
||||||
} catch (rdr::Exception& e) {
|
} catch (rdr::Exception& e) {
|
||||||
vlog.error("XserverDesktop::setCursor: %s",e.str());
|
vlog.error("XserverDesktop::setCursor: %s",e.str());
|
||||||
}
|
}
|
||||||
@@ -462,8 +462,11 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
|
|||||||
layout.print(buffer, sizeof(buffer));
|
layout.print(buffer, sizeof(buffer));
|
||||||
vlog.debug("%s", buffer);
|
vlog.debug("%s", buffer);
|
||||||
|
|
||||||
|
resizing = true;
|
||||||
vncSetGlueContext(screenIndex);
|
vncSetGlueContext(screenIndex);
|
||||||
return ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap);
|
const unsigned int ret = ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap);
|
||||||
|
resizing = false;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XserverDesktop::handleClipboardRequest()
|
void XserverDesktop::handleClipboardRequest()
|
||||||
|
|||||||
@@ -132,5 +132,7 @@ private:
|
|||||||
OutputIdMap outputIdMap;
|
OutputIdMap outputIdMap;
|
||||||
|
|
||||||
rfb::Point oldCursorPos;
|
rfb::Point oldCursorPos;
|
||||||
|
|
||||||
|
bool resizing;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user