Ubuntu 24.04 xrdp gui task icon shows, but not clickable
Closed this issue · 7 comments
Hello,
I followed a lot of FAQs and many issues helps, but I can't fix it.
We are using Ubuntu 24.04 with xrdp for headless display manager.
emailproxy is installed in a venv and pip.
I installed all mentioned packages. read about 3 hours forum, issues etc.
But the emailproxy is running, no errors, Icon shows up, but than nothing. no menu or rightclick action.
The icon seems not correct either. it more like greyed out.
any one can help on that?
That looks a little bit like the icon, but clearly has display issues. Perhaps an issue in parsing its content.
Have you looked at the dependencies and setup section of the readme? There are a few Linux-specific previous issues here that may have a solution.
Apart from this, does the proxy work normally? If not, have you tried --no-gui mode?
Please could you enable --debug mode and post the proxy's log?
Hi, yes I checked all dependancies and setup.
checked for pystray and pywebview dependencies. the proxy's log looks good. no errors or missing libs.
with the --no-gui mode the same, but no icon. We need the gui for the MFA verification.
After starting emailproxy with: /home/otoboadmin/emailproxy-env/bin/emailproxy --debug --log-file /home/otoboadmin/emailproxy.log
I see this in the logs:
2025-04-01 13:30:14,851: Initialising Email OAuth 2.0 Proxy (version 2025-03-14) in debug mode from config file /home/otoboadmin/emailproxy.config
2025-04-01 13:30:14,852: Starting IMAP server at 10.74.64.7:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS)
2025-04-01 13:30:14,855: Starting SMTP server at 10.74.64.7:1587 (unsecured) proxying smtp.office365.com:587 (STARTTLS)
2025-04-01 13:30:14,855: Initialised Email OAuth 2.0 Proxy - listening for authentication requests. Connect your email client to begin
No problem as far. But the Icon looks like above in the screenshot.
The proxy uses pystray to build and display the icon. What happens if you try a basic pystray icon on its own? For example, what do you see with this sample from that project's usage page:
from pystray import Icon as icon, Menu as menu, MenuItem as item
from PIL import Image, ImageDraw
state = False
def create_image(width, height, color1, color2):
image = Image.new('RGB', (width, height), color1)
dc = ImageDraw.Draw(image)
dc.rectangle((width // 2, 0, width, height // 2), fill=color2)
dc.rectangle((0, height // 2, width // 2, height), fill=color2)
return image
def on_clicked(icon, item):
global state
state = not item.checked
icon = Icon('test name',
icon=create_image(64, 64, 'black', 'white'),
menu=menu(item('Checkable', on_clicked, checked=lambda item: state))).run()Update:
I installed python3-gi over APT.
Then I edited for the venv the pyvenv.cfg with:
echo "include-system-site-packages = true" > /home/otoboadmin/emailproxy-env/pyvenv.cfg
Now the test2.py works
(emailproxy-env) otoboadmin@atotobo:~$ python3 test2.py
Gtk-Message: 11:41:18.669: Failed to load module "xapp-gtk3-module"
Gtk-Message: 11:41:18.669: Failed to load module "appmenu-gtk-module"
But it does works with emailproxy. There the icon is still dead.
Update:
Found my problem.
I also have to install the emailproxy[gui] over pip install in the venv
This is now my work through:
apt install python3-gi gir1.2-girepository-2.0 appmenu-gtk3-module
python3 -m venv emailproxy-env
echo "include-system-site-packages = true" > /home/otoboadmin/emailproxy-env/pyvenv.cfg
source /home/otoboadmin/emailproxy-env/bin/activate
pip install pystray pillow pywebview timeago proxy_tools
pip install emailproxy[gui]
source /home/otoboadmin/emailproxy-env/bin/activate
/home/otoboadmin/emailproxy-env/bin/emailproxy --debug --log-file /home/otoboadmin/emailproxy.log
Now is the icon accessable.
For me its solved. is that something for the documentation? Or was I to nooby? ;-)
Thanks for following up – I'm glad this was resolved. The intent is that pip install emailproxy[gui] installs all dependencies, as explained in the readme. I'll link to this issue alongside the others already in the documentation in case others face the same problem.


