You are not logged in.
i am investigating a message from command "wmctrl -d".
this is what i get:
lt1a/gene/-1 /home/gene 5> wmctrl -d
No protocol specified
Cannot open display.
lt1a/gene/-1 /home/gene 6>
the man page for wmctrl has nothing about this or how to specify a protocol. any suggestion what to look at next?
Offline
Cannot open display.
wmctrl is a userspace utility, so make sure you are running it with the account that you are logged in with (the current x session).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
i am running it in a background terminal session. i have two ways i do this. way number one is connecting via an ssh server that listens on an obscure port (not 22 so i don't flood my system logs). way number two is creating "background" sessions via the screen command. i have written some scripts in Python to make the "background" abstraction easy. i have this issue with way number two. the "bgi" command sends input to the background session as input to whatever is reading some input. the bash shell happens to be reading in commands. the login user issue may be involved here. the background user is not literally logged in. i recall "wmctrl" giving me a list of potential sessions with all of them marked "-" and "N/A". but it does mark one "*" and "0,0" for position under the current workspace number (no idea how it knows that).
Offline
i have put these background screen scripts online. you can download the whole bunch at http://ipal.org/s/bg.tar.bz2 or you can download individual scripts at http://ipal.org/s/bgx.py where x is one of the letters: c_i_l_n_o_r_u. you cat use .net in place of .org if you want to.
Last edited by Skaperen (2024-04-18 04:31:03)
Offline
Assume the following:
- logged in user is USER1
- background user is USER2
Background user runs wmctrl (command run as background user):
# wmctrl -d
Cannot open display.
Currently logged in user allows background user access to make X connections (command run as currently logged in user):
$ xhost local:USER2
Background user connects to USER1's display and runs command (command run as background user):
# DISPLAY=:0.0 wmctrl -d
0 * DG: 1920x1080 VP: 0,0 WA: 0,42 1920x1038 Workspace 1
1 - DG: 1920x1080 VP: N/A WA: 0,42 1920x1038 Workspace 2
2 - DG: 1920x1080 VP: N/A WA: 0,42 1920x1038 Workspace 3
3 - DG: 1920x1080 VP: N/A WA: 0,42 1920x1038 Workspace 4
Note: make sure you are using the correct display setting. You can get this from USER1's login via (command run as currently logged in user):
$ echo $DISPLAY
:0.0
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Assume the following:
Currently logged in user allows background user access to make X connections
the background user is not given a way to make X connections. when connected over SSH this was possible. i will need to investigate if a process in the background is able to do this (am "wmctrl" is aware of it to make it work when users are the same). it all depends on what the "screen" command sets up since that is the mechanism i used for the "bg" scripts, because it allowed a disconnect state that could still function.
i am in the process of designing an all new background system based around the VNC protocol. a background process will have access to (its own instance of) X in this design.
Offline
[ Generated in 0.031 seconds, 7 queries executed - Memory usage: 541.07 KiB (Peak: 542.35 KiB) ]