Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The -b add,fullscreen will toggle ON, if not already. With -b remove,fullscreen to toggle OFF, if not already. For something a little more definitive. TBH, you should break your thing into multiple commands. Doing it all on a one liner like that is begging for issues.
Then all users or specific user in the later case can also access X. Otherwise there's hoops to jump. Such as making sure that DISPLAY is set (correctly). And ~/.Xauthority matches that of the one who started X. At least with older Xorg stuff, the newer wayland stuff is supposed to be more secure and probably harder to tame. Also the environment variable setting ways vary between shells. For bash it's export, not env.
$ export DISPLAY=":0"; wmctrl -lpG
or
$ DISPLAY=":0" wmctrl -lpG
The later if you do not want the environment variable to persist but need it set for that one program. Bear in mind that the display may not be :0, but might be :1 or other things. You can pass that to startx, xinit, or X through various means. And should be visible with the longform output of ps. As the user who started X you can view it with xauth:
$ xauth list
Which is basically what's stored in ~/.Xauthority as well as /tmp/serverauth.????? as visible in the ps output. In terms of networked access to X, if the "-nolisten tcp" is set (it's often a default), then that's probably in the way of what you're trying to do. Or I could be wrong. YMMV.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.