Remotely start session on display :0 - remote-desktop

I am working remotely and had to restart. I can start a vnc session and log into that. But for some reason the program I'm trying to use gives a GLX error when I try to start it. (I'm using xfce4).
I've circumvented this problem in the past by using an x11vnc session into my display :0. To do this, I open a regular vnc session, and type in a terminal
x11vnc --display :0 --forever
Then I close the vnc session, and log into the x11vnc session.
But this isn't working now because, since I had to restart, I think I don't really have a display :0 running because I have not logged into a desktop session on site.
The question is: is there any way I effectively log into a desktop session remotely, so it would be as if I had logged into my computer on site, and can then use x11vnc as I described above.
(Caveat: I'm not an expert in all these things, so I may have used some incorrect terminology. But I think the question is clear).
Thanks!
============== added ================
Maybe a clarification would be the following. Can I trick the computer into thinking that I am sitting right in front of it? Can I start a session remotely such that when I next sit down in front of the computer it will appear that I have already logged in? I'm certain this would solve my problem. No other combination of VNCing seems to work.
============== More ======================
I just restarted (remotely), ssh'd in, and typed
x11vnc --display :0
This is what I got
** If NO ONE is logged into an X session yet, but there is a greeter login
program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
to find and use the raw display manager MIT-MAGIC-COOKIE file.
Some examples for various display managers:
gdm: -auth /var/gdm/:0.Xauth
-auth /var/lib/gdm/:0.Xauth
kdm: -auth /var/lib/kdm/A:0-crWk72
-auth /var/run/xauth/A:0-crWk72
xdm: -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
dtlogin: -auth /var/dt/A:0-UgaaXa
but none of those options worked. I also tried the other suggestions, such as using -auth guess.

Display :0 is always running, assuming you have an X session running and your computer has booted up. The command x11vnc --display :0 --forever opens a VNC listening port on your machine that you can connect to with a VNC client.
Your initial vnc connection where you run the x11vnc command is not really necessary if you use SSH (a remote shell). If you install SSHD, and connect via ssh username#hostname you can run the command x11vnc --display :0 --forever from there, eliminating the need for the initial VNC connection.
If you don't have sshd running, you may be out of luck unless some sort of screen sharing is running. To see if there's any way to remote into your computer, run a port scan with NMAP.

Use tightvncserver. If you have apt, you can run sudo apt-get install tightvncserver to get it.
To Run the Server: tightvncserver, it will prompt for a password to use to authenticate VNC connections.
You should see a message New 'X' desktop is HOSTNAME:1. You now you have two X displays running. You can connect to the VNC Server on port 5901, since tightvncserver defaults to incrementing from port 5900.
This second X display (:1) is separate from display :0, so to someone standing at your remote computer, they will just see the login screen. This will last until the next reboot, though there are ways to have this command execute on startup.
Keep in mind, although tightvncserver will prompt for a password, and will use that password for authentication, VNC has been known to have vulnerabilities. So, if security of your computer is an issue, it's safer to tunnel the connection via ssh and firewall port 5901 from any connections except localhost.

Related

Azure Active Directory Server 2016 Group Policy Startup Applications (Chrome) not loading on client workstations

Hi I'm trying to implement a Group Policy in our domain that forces Google Chrome to be added to client startup applications. I've added a GPO and added the key:
Computer Configuration > Administrative Templates > System > Logon > Run These Programs at User Logon
In the "Items to run at logon" I've added the path to chrome.exe (with quotes) like so:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
I've then linked to the Object in our Domain's User and Computer OUs.
I've also pushed the update out to clients and confirmed they have updated GP.
However Chrome does not start when users boot into their laptops.
I'm hoping someone can shine a light on what I've done wrong/what I've forgotten to do - any help much appreciated!
Summarize the comment link as a reply to close this issue.
Per duenni1's comment it looks like the most successful way people are reporting is to use the startup folder instead of the logon group policy. "In my opinion the correct solution: use GPP to manage shortcuts in startup menu folder. Simply create a startup shortcuts."
Could throw it in this directory:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
This will launch the program when they login, we do this to force users into our IM client
https://community.spiceworks.com/topic/1369848-run-these-programs-at-user-logon
If you really want this method to work, I'd start troubleshooting here:
1) is there already a GPO in place that will perform Run These Programs at user logon? That may be the winning GPO
GPO Run these programs at user logon not taking effect
2) According to the official docs, no error is a path issue ( I think your usage of quotes is correct but out of curiosity I'd be curious if removing the quotes has a change).
NOTE: If the program does not run, make sure the path is correct. The program does not run (and no error message is displayed) if the path is not found.

Use XDebug on a multi-user environment

I'm developing on a shared local server with some other people. This server has one Apache/PHP instance, but then it has multiple "sites-available" (VirtualHost) for different people.
I would like to get XDebug working so every one of us can use it independently. The problem is that if we enable XDebug and, for example, my IDE is connected to the server and I set a breakpoint, it'll stop if other person is browsing the page, even if it's in his/her own VirtualHost.
Any hints on how to properly set this up?
Edit:
Forgot to mention that the webserver is running in Docker.
This is the current configuration of XDebug:
# automatically start debugger on every request
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
# send all debug requests to 127.0.0.1
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal
#log all xdebug requests to see is it working correctly
xdebug.remote_log=/var/log/debug.log
Thanks.
This should not happen at all, unless you have xdebug.remote_autostart turned on, and have hard coded xdebug.remote_host (instead of using xdebug.remote_connect_back). You don't want to hard code xdebug.remote_host in a multi-user environment really.
Debugging sessions are only initialised when the XDEBUG_SESSION_START is detected (which is what the browser extension will set, or when that is added to the GET/POST parameters)--and continued requests.
There is also no such concept as:
my IDE is connected to the server
Upon every request, Xdebug (if set to trigger with the cookie) will connect to the IDE. And it uses the xdebug.remote_host setting, or the inferred IP address if xdebug.remote_connect_back is enabled to connect to. And the end of the request, that connection is severed. You can use xdebug.remote_log=/tmp/xdebug.log to create a log file, which will indicate when connections are being made, and whether they work.

Monaca Localkit Launch Error

When I try to launch the Monaca Localkit application, it shows "Unable to start HTTP server. Maybe the port is occupied. Please change the port and restart the program."
Then, I have changed my port setting many times, but it still shows the same message.
My default port setting is 8001. And I checked whether other application is using this port by netstat command. But no application is using.
I tried to re-install Monaca Localkit application too. But the result is the same as before.
How can I fix this problem? Please give me an advise.
It means that another program is using that port, maybe another instance of localkit? If yes, terminate the program to free the port. You should also check if your firewall allows communications through port 8001.
If you want just to change port, you can open Localkit and go, from the menu bar, to Monaca Localkit -> Preferences and change Listening Port.

Newbie trying to sideload on Glass XE22 - getting "offline" in adb

I am trying to figure out how to side load an app to my Google Glass. It is on XE22.
I did all of the simple things like adding adb and updating the .inf file. but when I do ADB DEVICE it says my serial number and then "offline". I tried multiple factory resets, and then got it to say "unauthorized." I did a few more things (i.e. turing off debug, unpluging, killing server, starting server, pluging back in...) and I got the prompt to "allow / trust computer." Once I did that it looked good and said my serial number and "device." I then tried to load Launchy.apk and it said "adb server is out of date. killing... daemon started successfully" and then it said "error: Device Offline" and now it shows off-line again.
How can I sideload to Google Glass?

How to change the admin port using the Google App engine launcher?

It's easy to change the port of the application using the launcher. Go to Edit>>Application Settings (or alternatively Ctrl+i) and change the port. Since I was getting an error similar to the one given below, I changed the application port from 8080 to 48080. Unfortunately, I am not able to change the admin port from 8000 to 48000, because of which I am getting the following error.
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8000
I also tried the method illustrated in the following image (my reference being this link):
Regardless of what I try, my web-browsers (Chrome and Firefox) return a message similar to This webpage is not available. Any ideas are appreciated.
I have seen this before, when I had a crashed instance running on the port. You may have a frozen Python script running on that port. On a Mac, I can go to Activity Monitor and kill the process. Not sure if you can do that via task manager in Windows. You may need to restart machine.

Resources