I’m currently in the process of hacking together a bit of bash and python3 to integrate my Minecraft server with my friends Discord. I managed to power through most of the planned features with nary a hitch, however now I’ve gotten myself stuck halfway into the chat integration. I can send messages from the Discord to the server no problem,
Tag: gnu-screen
Using screen on Synology (DSM6): “Cannot find termcap entry for ‘xterm-256color”
Using screen on Synology (DSM6) I get the error Cannot find termcap entry for ‘xterm-256color’ when I type screen. I am aware of the quick fix from this question Unix screen utility error: Cannot find termcap entry for ‘xterm-256color’. So TERM=xterm screen does work and launches screen. But I would like to set TERM to a different value on my
Possible to read the last line of a linux gnu-screen?
I’m trying to make a simple and reliable script, preferably in bash, that is executed every minute using crontab. The script simply has to read the contents of the last couple of lines of an open screen and store them as a var so that I can search for a sub-string. Does anyone know of an easy way to do
Attach to a GNU screen and then execute commands
I have seen some similar questions asked but the solutions don’t seem to work in my case. I am trying to SSH into a specific screen instance on a Node machine and then execute some commands My current process is this: On the remote machine I create a screen instance: screen -dmS “my_screen” From my local machine I do something
Access SSH client IP address, within a screen session
Accessing the IP address of a connecting SSH client is possible via environment variables (such as SSH_CONNECTION), as described in Find the IP address of the client in an SSH session In a GNU screen session though, those environment variables are defined by whoever started the screen to begin with. Is there any way to also get hold of the
Linux screen snapshot/redirect
Is it possible to take a “snapshot” of a running screen command, either stored as text or an image? Something akin to the following: Answer It’s possible to take so called “hard copy” of a screen session: Here we send hardcopy hc.n command to screen session 11534.test. The session name is available in the list of sessions(screen -ls). The hardcopy
php using exec with screen
I have a need to start three processes through my PHP script. Those processes live in the /home/user/server directory, named server-one, server-two and server-three. The process are also capable of accepting commands through their consoles, so I would need them to live in their own screen with a name so I can use -X stuff to give them commands. As
Equivalent for Linux’s “screen”
Is there anything similiar to Linux’s “screen”? What I want to do is launch console application created in Java. Then let’s say I want to execute command to the running application. For example I want to tell it to exit so I’ll tell it command ‘exit’. On Linux I can open the application “in screen” and later if I want
Linux “screen” does not write results
I have an Ubuntu system running on a remote computer that I use for computations. On other machines whenever I want to run some time-consuming program I type: and execute my program in the resulting screen, say: The program in question writes some results to an output file. This works fine on other machines. When I try the same in
Execute screen command returning `Cannot make directory ‘/var/run/screen’: File exists`
I’ve no idea what is happening. I can run any other shell command through the exec() command and it works fine. It’s clearly something to do with permissions somewhere, but I’m unsure what. I’ve tried this on many different servers and some of them work fine and some don’t. All were running CentOS. Safe mode is always off. This is