0

I'm running a VNC Server on a VPS.

I'm trying to automate some workflows, as I'd essentially need to (I don't even know if it is possible yet, but I'm doing a step by step) check if my VNC server is accessible, shut it down if not, open the browser on xfce, and then restore a firefox session.

As said, I still don't know how to manage this, but there is a recurrent problem I'm having when restarting my VNC Server.

I followed this setup to install VNC, and this command one time sudo apt install xdg-utils.

For running Firefox, I also had to run the following commands:

export DISPLAY=:1
xhost +local:

And, well, every time I restart my TightVNC server, I have to run those commands manually in order for everything to work.

I tried in many ways running them on services, but, it doesn't seem to work, while doing it manually after starting the VNC session and accessing does.

Is there any help or recommendation on this last thing you can help me try out? Making Firefox available to be open just by clicking xfce Web Browser without running those commands manually?

9
  • however, I've got a couple of questions; where exactly do you want to run that firefox? Where do you want it to display things? Commented Aug 19 at 17:37
  • I'd say it is a "I follow this tutorial/post + commands", and "I have to run these manually except one". I'll edit it right away. This is intended to run a KVM VPS, Ubuntu 24.04, 4GB RAM, 2 Cores, 50GB Disk. Right now I'm not trying to make it display stuff right away; final idea: open it as soon as the VNC server runs. Current goal/problem: when I start a VNC session, be able to open it on my VNC Client. Maybe I'm not properly understanding the "contexts of execution" of VNC, and that's why none of this is working. I hope that answer your questions. Commented Aug 19 at 17:46
  • hm, trying to follow you there. I'm really honestly not quite sure how this all fits together. Are you running your XFCE session such that it uses the vncserver? Commented Aug 19 at 17:50
  • Hm, I don't understand, sorry. What I can tell you is that I'm able to access XFCE through VNC and operate normally. I'm not sure if the display and xhost is attached to VNC, or I have to do a login with XFCE first. Commented Aug 19 at 17:54
  • 4
    ah I see! OK, no, then my best guess is due to Ubuntu for strange reasons having decided that they ship firefox as snap instead of as native app, which does not cooperate prettily with these kinds of setups (depending on how you start the xfce session). Serious questions, two of them: a) you sure you want to run firefox on the VPS, instead of just proxying your internet connection through that VPS and running firefox on your local machine? That'd be much easier. b) assuming that, no, you want a persistent session running on the VPS: how married are you to your VNC setup? There's alternatives: Commented Aug 19 at 18:06

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.