- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send output to an Xwindow Virtual Desktop
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2003 02:14 PM
тАО03-10-2003 02:14 PM
Assuming that I've telnet'd over to a different server than the one that's running MWM for me;
I'd like to run an x-command and have it appear in a named window.
For instance, to run xterm normally, I can use xclock -display myxterm:0.
Easy enough, but what if I want the clock to appear on a different virtual desktop?
Suppose there are four virtual desktops, labeled "ONE","TWO","THREE" and "FOUR". I want to send the xclock display to the "TWO" virtual desktop.
Right away, I figured I could use: "xclock -display myxterm:1"
But this doesn't work. Can anyone tell me how to do this? I hate having to switch to the proper desktop that I want the display to appear on before running my command (actually I want to run gpm, but I'd just as soon test the idea with something small like xclock).
Thanks for the help,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2003 02:26 PM
тАО03-10-2003 02:26 PM
Re: Send output to an Xwindow Virtual Desktop
export DISPLAY=xxx.xxx.xxx.xxx:0.0
xclock
From terminal to receive display maybe xhost +, allow access to all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2003 03:23 PM
тАО03-10-2003 03:23 PM
Re: Send output to an Xwindow Virtual Desktop
How do I send it to the second virtual desktop - when I'm not on it from the command line?
I know that I can click on the window bar and do a "send to desktop", but I want to execute a command and send it to a virtual desktop all from the command line. I want to do this so I can script a bunch of things that I want started automatically, and have them appear correctly in their named window(s).
That is, I know that :0.0 (the current desktop) works, I want to use another desktop - one I'm not one.
Thanks for the help and the response anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2003 12:39 AM
тАО03-11-2003 12:39 AM
SolutionI have something along these lines send me an email : see my forum profile. or try compiling the following but I think it requires libs from the CDE dev kit to be installed .... ps what O/S ?
/* include files */
#include
#include
#include
/* functions */
void main(int, char**);
void ws_change(Widget widget, Atom aWorkspace, XtPointer client_data);
/* global variables */
static XmString xms;
static Widget toplevel;
static Widget *wWs;
static Atom *paWsSet = NULL;
static unsigned long numWorkspaces;
static Atom *paWs;
static Display *display;
static Window root;
static int screen;
static Widget top, form, top1;
static XtAppContext app_context;
static Arg args[10];
static int n, i, status, pNumWorkspaces;
static Atom *ppaWorkspaces, foundWsAtom = NULL;
static DtWsmWorkspaceInfo *ppWsInfo;
static DtWsmCBContext wsmcontext;
static char *desiredWs;
/* main - main logic for program */
void main (int argc, char **argv)
{
/* initialize toolkit */
n = 0;
XtSetArg (args[n], XmNallowShellResize, True); n++;
XtSetArg (args[n], XtNmappedWhenManaged, False); n++;
toplevel = XtAppInitialize (&app_context,{}&p@x8@a`{ "Dtswitch", NULL, 0,
&argc, argv, NULL, args, n);
display = XtDisplay(toplevel);
screen = DefaultScreen(display);
root = RootWindow(display, screen);
XSynchronize(display, screen);
if ( argc != 2 )
{
printf("must provide name of a workspace to switch to\n");
printf("we'll just monitor workspace changes now\n");
desiredWs = NULL;
}
else
{
desiredWs = argv[1];
}
status = DtWsmGetWorkspaceList(display, root, &ppaWorkspaces,
&pNumWorkspaces);
if (status != Success )
{
printf("problem obtaining workspace list, exiting with status %d\n",
status);
exit(status);
}
/*
printf("Number of workspaces returned is %d\n", pNumWorkspaces);
*/
for (i=0;i{
status = DtWsmGetWorkspaceInfo(display, root, ppaWorkspaces[i],
&ppWsInfo);
if (status != Success )
{
printf("problem getting workspace info %d\n", status);
}
else
{
printf("Workspace %d , title is %s, name is %s\n",i,
ppWsIn{}&p@x8@a`{{fo->pchTitle,
XGetAtomName(display,ppWsInfo->workspace));
if ((desiredWs != NULL) &&
(0 == strcmp(desiredWs, ppWsInfo->pchTitle)))
{
foundWsAtom = ppWsInfo->workspace;
}
}
}
wsmcontext = DtWsmAddCurrentWorkspaceCallback(toplevel, ws_change, NULL);
/*
printf("wsmcontext is %d\n", wsmcontext);
*/
XtRealizeWidget (toplevel);
if (foundWsAtom != None)
{
printf("Atom is %x, name is %s\n",
foundWsAtom,XGetAtomName(display, foundWsAtom));
XFlush(display);
status = DtWsmSetCurrentWorkspace(toplevel, foundWsAtom);
XFlush(display);
printf("status is %d\n",status);
/*
if ( status != Success )
{
printf("workspace %s does not exist\n", desiredWs);
}
*/
}
else
printf("Never found a match - workspace doesn't exist\n");
/*
XtAppMainLoop (app_context);
*/
}
void ws_change(Widget widget, Atom aWorkspace, XtPointer client_data)
{
printf("In the change workspace callback\n");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2003 07:37 AM
тАО03-11-2003 07:37 AM
Re: Send output to an Xwindow Virtual Desktop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2003 07:31 AM
тАО03-14-2003 07:31 AM
Re: Send output to an Xwindow Virtual Desktop
Big 10,
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2003 09:24 AM
тАО03-17-2003 09:24 AM
Re: Send output to an Xwindow Virtual Desktop
if you want to run your programs the way you've shown in yor question, then you'll have to run "Xnest" in your CDE session, one *nested* X-server in each workspace. THEN each of those does have its own dispay number...
FWIW,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2003 02:55 PM
тАО03-26-2003 02:55 PM
Re: Send output to an Xwindow Virtual Desktop
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2003 12:24 AM
тАО03-27-2003 12:24 AM
Re: Send output to an Xwindow Virtual Desktop
Send me an email (see my forum profile for the address) I can provide you with the binary .... fyi Xnest is a nested Xserver (not HP s/w) basically acts like Reflections X on unix.
Alternatively you can search say via google I'm sure you'll find it ...
I'm not 100% convinced it's exactly what you are after but then again the switch program wasn't ideal I suspect either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2003 11:17 AM
тАО03-27-2003 11:17 AM
Re: Send output to an Xwindow Virtual Desktop
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 02:38 AM
тАО12-30-2004 02:38 AM