I see another guy use noVnc making a webshell for linux, it's not graphic and its running level3 as in the picture below. Does anyone know how to run vncserver in level3?
It doesn't matter if you are on run level 3.
You can start a VNC server, using the vncserver service, and connect to it remotely. Your session will be graphic.If you want to connect remotely to a shell, you can just use ssh instead.You can use this link http://wiki.centos.org/HowTos/VNC-ServerThat explains how to do it.
Related
I would like to remotely control a windows server from Linux Ubuntu. I am able to connect using the rdesktop command I was however wondering if there is a possibility to, for example, restart a service, or manually pull the server out of a pool, restart it and put it back simply using the command line.
If you know about any useful commands that would be great :) I am however simply trying to figure out if this is actually even possible as I am new to Linux...
Thanks in advance!
You are basically asking about how to control Windows from the command line. If you are able to connect to the screen of a Windows PC and open a socalled "dosbox" you can issue any command you like (and your permissions grant to you)
Services can be controlled with the sc command, a restart can be used with the shutdown command. Besides that you can call many more functions, from the classic command line or even with Powershell.
But all of this is based on manual interaction.
I have a Hummingboard running Ubuntu 14.04 which I use to work remotely on my coding projects. Sometimes I cannot connect using SSH or VNC and I have to physically unplug and replug it. Is there a way to do this process remotely?
For example if you have ibm server you can look for something like that
Or other solution like this or this
I am having some problems with launching firefox from a Linux daemon written in C.
When I launch firefox on the machine itself (via terminal) from the command shell using /usr/bin/firefox it works OK and a firefox browser window lanunches as it should.
However if I try this within my C daemon using system("/usr/bin/firefox"), firefox launches its process in the terminal but the browser window is not opened?
A similar thing happens when I try to do this using remote terminal acces. It's something to do with telling the system to open firefox in window mode rather than trying to open it in terminal mode - but I dont know how to specify this using bash commands?
I am using Lubuntu 11.10 in my Linux System.
Any help is most appreciated.
There's a reason I asked why you're attempting to do what you want. I didn't want to get into great details in my comment.
Firefox on Unix is an X-Window process (most of the Linux/Unix desktops are based upon the X11 protocol which is the heart of X-Window). What X-Window does is separate the display of the program from the process running the program. For example, I am now running Firefox from a Linux box at work, but the Linux box is actually displaying the Firefox browser window at home on my Mac.
In order to do this, I had to:
Run X11 on my Mac. The X11 program creates a default X11 client display called 0.0 which pretty much says the first screen and the first instance of X11 running (computer geeks like counting from zero). The process runs in the background on my Mac. In a certain sense, it's really a server process and not a client because it's waiting on port 6000 for a client X11 process (Firefox) to tell it what to do.
Before I run firefox, I have to tell my Mac's X11 process that I grant the X11 server running Firefox to be able to display on my X11 client process. Otherwise, you can imagine someone spamming another person by continuously popping up Windows on their display. You can use the xhost program to do this.
In order to run Firefox on the Linux box, I have tell the Firefox process what X11 client I'm running it on. I can do this by setting the DISPLAY environment variable to something like "10.0.1.33:0.0". This means the X11 client is running the the machine on IP address 10.0.1.33, and I want you to use the first screen, and the first instance of the X11 client on that screen.
Now, I can run Firefox on my Linux box, and the display will display on my Mac.
The problem you're running into is that there's simply no X11 client when you're starting FireFox as a daemon process. An X11 client is associated with a user and a display of some sort. The display could be a virtual display, but there's got to be an X11 client that's running and is addressable in some way, so the process knows where to display the output.
By the way, you said daemon which has a very, very specific meaning in Unix/Linux. A daemon is a process that runs in the background and usually has a service (and a port) associated with it. For example, there's an FTP daemon called ftpd, the mail server uses the sendmail daemon, ssh has the sshd daemon. Daemons have no display associated with them.
However, it looks like you might be using the word to mean launching Firefox via another process. Is that true? If so, you'll have to make sure that Firefox knows the X11 display to use (there's a command line setting to use to specify the display), and that your X11 client (your login session) has given permission for another process to update your display with the program window.
Can you please explain what you're trying to do in a bit more detail? If you simply want to download a file from a remote http server (which of course is running the http daemon process called httpd), you should use curl or wget which don't require a display and are way simpler to use. If you're trying to do something else, let us know exactly what it is.
Firefox needs to know which display it should open on. When you run it from within a gui, even through a terminal emulator, the DISPLAY environment variable is set to the appropriate value. When you launch from the daemon, try system("/usr/bin/firefox -display=:0").
Make sure that the DISPLAY environment variable is properly set in your daemon to refer to the X server that you want your firefox to use.
If the daemon is run as a different user account than the user account that "owns" the X server that you want to use, you will also need to use xauth(1) to configure the authentication token to grant permission to use the X server.
Often times, it is far easier to use ssh -X to tunnel X and properly configure the xauth(1) tokens in one go than try to manage xauth(1) tokens yourself. Maybe adding ssh -X into your environment would be suitable, maybe not. (I've even used ssh -X root#localhost before when I needed to run an X client as root and didn't want to bother with configuring xauth(1) manually. ssh(1) is just so much easier.)
I do this all the time using VNC and it is very easy, but I am curious about a few things like XDMCP. As I understand it, this is a way of creating the entire desktop on a remote X-Server which seems fairly elegant.
Several years ago, I worked on a Solaris server and multiple developers had X-Servers running in Windows and we were able to access a full remote X-desktop. All my efforts so far in X based systems seem to indicate that only one instance, remote or local, of the desktop can be loaded, so I guess this Solaris thing was an actual application that "emulated" a desktop, but who knows....
Any input ?
From Windows I've found the best way to do this is using the Xwin command in cygwin.
Steps:
Install Cygwin, making sure to install X11. (Do this by scrolling to the bottom of the list on the "select packages" screen and click on the word "default" to the right of "X11". Give it a second or two and it will change to "install".)
Then, just run the Xwin command like this:
Xwin -query your.unix.system.name
You'll get a full-screen login window from you unix box. That's it!
Btw, sometimes firewalls get in the way of the UDP protocol for XDMCP. If that happens, look up the port numbers (one UDP outgoing, and one TCP incomming) and unblock them. Other xdmcp troubleshooting tips here.
NX will allow you to use a complete remote desktop environment locally, and most Linux distros already have the server available.
As an alternative to full cygwin install you might want to look at Xming. It is quite a bit lighter and should provide the same functionality.
In Xorg/GDM/LightDM options : "listen" should be activated (disabled by default)
In windows, try Xwin32.
In Linux, try Xnest (windowed) or X with "-query" command.
Be careful: it's slow and everything (passwords included) is transmitted in clear. So keep it on local network, tunnel it in SSH or better don't use it.
I found an additional remote desktop implementation which works quite nicely with LXDE:
x2go
Has clients for Windows, Linux and MacOS X.
I'm running Xorg and my (Qt) program daemonises itself. Now I log out and restart the X server. When I log in again my process is still running fine, but I can't see it.
Is there a way of attatching the new incarnation of the X server to the old process?
If I don't restart the whole server, but log out and in again, is there a way to look at the old process?
Thanks
xpra should achieve your requirement. And it can also start tcp connection (without need of ssh). Start it on the you server:
xpra start :100 --start-child=xterm --bind-tcp=0.0.0.0:10000
Connect it on your client:
xpra attach tcp:SERVERHOST:10000
You can also use mac or windows xpra app to connect it. I tried in on win7 and osx10.10.2. The download link:
windows: https://www.xpra.org/dists/windows/Xpra_Setup.exe
mac: https://www.xpra.org/dists/osx/x86/Xpra.dmg
After the connection to the X server is lost, it is not possible to regain it.
There was an xserver proxy called xmove, but it is quite deprecated and doesn't work with several newer X extension, which are likely used by modern toolkits.
You could try to run your process in another virtual X server like xvnc or (better) NX. NX is a X proxy technology developed by NoMachine. There exist free implementations of NX servers as well.
If you run your program inside such a server, it is possible to attach and detach from it from arbitrary graphical environments.
Use something like Xpra: it allows you to run applications on an off-screen X11 server to which you can re-attach whenever needed, and from remote machines too. It supports "seamless" sessions too so the windows will appear just like local windows.
Practical example:
xpra start :10 --start-child=/bin/YOURAPP
Then whenever you want to re-attach (say after an X11 server restart):
xpra attach :10
Or from a remote machine:
xpra attach ssh://THESERVERHOSTNAMEORIP/10