Sponsored Content
Full Discussion: GNU-Screen Stuff problems
Top Forums Shell Programming and Scripting GNU-Screen Stuff problems Post 302743099 by Zanax on Wednesday 12th of December 2012 06:02:55 AM
Old 12-12-2012
[SOLVED] GNU-Screen Stuff problems

Code:
OPTIONS="java -Xms1024M -Xmx1024M -jar craftbukkit.jar"
PROCESS=server01

screen -dmS $PROCESS $OPTIONS nogui             # Starting the application
screen -x $PROCESS -X stuff `printf "stop\r"`   # Closing the application
screen -x $PROCESS                              # Attaching to the terminal of the application

The problem I'm facing with is that "-X stuff `printf "stop\r"`" Doesn't work if the process has never been "screen -x $PROCESS" (attached to the screen and then Ctr-A-D)

So is there a way to make "stuff" work without that the screen has to be attached once?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problems Downloading and Installing Stuff

HI to everyone, I have been for a very long time in my life a GUI user, and now that i have to use a Solaris 5 terminal, i am not sure how to do some things: Downloading stuff from the internet: How do i do that? in a GUI you just click on the link and start downloading automatic, but i have... (4 Replies)
Discussion started by: sx3v1l_1n51de
4 Replies

2. UNIX for Dummies Questions & Answers

SSH Connection - Problems viewing stuff

Hey, I connected with Cygwin and this command: "ssh -Y USER@web.com" Then trying to open a program, but this error appeared: "Cannot open X display: DISPLAY variable unset" what do I have to do? Thanks. Alex (3 Replies)
Discussion started by: alf123
3 Replies

3. HP-UX

Compiling GNU 'screen' on HP-UX 11i

I finally gave up and installed the prepackaged version of 'screen', but I really want to get a better understanding of why my compilation of 'screen' failed on HP-UX 11i using GNU gcc (also from a prepackaged version). Whenever I would try to run './configure' to prep for building screen, it... (4 Replies)
Discussion started by: deckard
4 Replies

4. UNIX for Advanced & Expert Users

GNU screen

Hello, One of the things I like about screen is that it has a scrollback buffer, which if you go into the copy mode, will let you go back for a specified number of line. Is there a way to extend the number of scrollback lines in screen? I've looked thoroughly online and I could not find a... (2 Replies)
Discussion started by: neked
2 Replies

5. UNIX for Advanced & Expert Users

Help with GNU screen: Backtick and Caption.

I'm trying to get GNU screen to show the output of "uptime" for the host being accessed in the current window, but unfortunately, no matter what window I go in, it shows the uptime for the host I originally launched screen in ("adminhost"). Does anyone know how to get this to update from the... (0 Replies)
Discussion started by: akbar
0 Replies

6. Programming

Problems using Perl DBI to edit database entries - basic stuff

Hello. I am taking a Perl class in college and we've briefly covered SQL and moved on. We have a term project and we can do whatever we want. My project will rely strongly on an SQL Database so I am trying to learn as much about Perl DBI as I can to get things up and going. I am basically... (1 Reply)
Discussion started by: Dave247
1 Replies

7. UNIX for Dummies Questions & Answers

GNU Screen - viewing hardcopy (binary)

I generate a hardcopy (C-a h) of an ncurses screen which has some formatting on it (boxes, highlights). If I "cat" the file, i get only text. If I do a cat hardcopy.n | less , then i see a lot of control characters where the boxes are. most hardcopy.n shows me a hexdump of the file. less... (0 Replies)
Discussion started by: sentinel
0 Replies

8. HP-UX

GNU screen on HP-UX 11.23

I compiled GNU screen on HP-UX 11.23 and following the compile, I get the following error when I try to run screen Cannot find terminfo entry for 'vt100' By default the TERMINFO is not set, I found a reference that setting it might help. I tried the following but I still receive the same... (2 Replies)
Discussion started by: scotbuff
2 Replies

9. UNIX for Advanced & Expert Users

GNU screen: shortcut to go to tab 10,11 etc

Using GNU-Screen for a long time. C-a 1 2 n p to navigate to other tabs. This works till 9. I often have 10, 11 etc. Is there any way to go to them quickly ? Currently, i have to do C-a 9, C-a n which is quite a pain. Thanks. (0 Replies)
Discussion started by: sentinel
0 Replies

10. Linux

GNU Screen key bindings....

After I do CTRL-" to show all of my screen sessions, I typically use the up and down arrows to navigate up and down. Suddenly this has changed, and instead only "j" and "k" seem to work for up and down. This has changed in the middle of my screen session. First one changed, and then the... (1 Reply)
Discussion started by: akbar
1 Replies
DMXAddScreen(3X)														  DMXAddScreen(3X)

NAME
DMXAddScreen - attach a new back-end screen SYNOPSIS
#include <X11/extensions/dmxext.h> Bool DMXAddScreen(Display *dpy, const char *displayName, unsigned int mask, DMXScreenAttributes *attr, int *screen); DESCRIPTION
DMXAddScreen() attaches a back-end screen to the Xdmx(1) server, in place of the previously detached back-end server specified by screen. displayName is the name of the new back-end display, mask specifies the field in attr that are active, and screen returns the new Xdmx(1) screen number for the attached screen. The information stored in mask and attr is identical to that used by the DMXChangeScreenAttributes(3X) and DMXGetScreenAttribues(3X) functions. RETURN VALUE
DMXAddScreen() will return True if the screen was successfully attached, and False otherwise. False will be returned if the -addremove- screens command line option was not specified on the Xdmx(1) command line, the input value of screen is out of range, screen is not cur- rently detached, displayName cannot be opened, has unexpected visuals, or has characteristics that do not match the previously detached screen. DMXAddScreen() can generate BadLength, BadAlloc, and BadValue errors. NOTES
Attributes that are not specified will default to 0. This may lead to unintended results. Unlike other functions in the DMX(3X) API, this function uses screen for both input and output. SEE ALSO
DMXRemoveScreen(3X), DMXChangeScreenAttributes(3X), DMXGetScreenAttributes(3X), DMX(3X), Xdmx(1) X Version 11 libdmx 1.0.2 DMXAddScreen(3X)
All times are GMT -4. The time now is 02:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy