LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 12-27-2016, 05:12 AM   #16
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873

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.
 
Old 12-27-2016, 09:47 AM   #17
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
I've tried both commands as user and as root, and the result is always the same.
Code:
user@ClientX:~$ wmctrl -lpG
Cannot open display.
user@ClientX:~$ wmctrl -r :SELECT: -b toggle,fullscreen
Cannot open display.
user@ClientX:~$
 
Old 12-27-2016, 09:57 AM   #18
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
I also tried this while x was running.

root@ClientX:~# env DISPLAY=:0 wmctrl -lpG
Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)
root@ClientX:~#
 
Old 12-27-2016, 10:20 AM   #19
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
what user started X?

$ ps -FlAw | grep $(pgrep xinit)

If the user (who started X) does something like:

$ xhost local:

or

$ xhost local:username

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.

Last edited by Shadow_7; 12-27-2016 at 10:21 AM.
 
Old 12-27-2016, 10:45 AM   #20
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
I did everything as root, to be sure.
Code:
root@ClientX:~# ps -FlAw | grep $(pgrep xinit)
4 S root       641   439  0  80   0 -   786 wait    1544   2 18:40 pts/2    00:00:00 xinit /usr/bin/midori -e Fullscreen -a http://www.google.com/ -- -nocursor -dpms -s off -s noblank
4 S root       642   641  0  79  -1 -  5547 poll_s 10712   2 18:40 tty2     00:00:00 X :0 -nocursor -dpms -s off -s noblank
4 S root       645   641  2  80   0 - 49506 poll_s 58260   0 18:40 pts/2    00:00:02 /usr/bin/midori -e Fullscreen -a http://www.google.com/
0 S root       678   667  0  80   0 -   648 pipe_w   492   0 18:41 pts/0    00:00:00 grep 641
root@ClientX:~# xhost local:
xhost:  unable to open display ""
root@ClientX:~# xhost local:root    
xhost:  unable to open display ""
root@ClientX:~# export DISPLAY=":0"; wmctrl -lpG
Cannot get client list properties. 
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)
root@ClientX:~# DISPLAY=":0" wmctrl -lpG
Cannot get client list properties. 
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)
root@ClientX:~# xauth list
xauth:  error in locking authority file /root/.Xauthority
root@ClientX:~#
There must be something terribly wrong with my setup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Games fullscreen is distorted, but video fullscreen is fine - older laptop xmrkite Linux - Software 7 07-20-2009 11:40 AM
unrecognized option /etc/X11/xinit/xserverrc walterbyrd Debian 1 05-28-2008 09:02 AM
Kdrive and xinit slothpuck Linux - Software 0 01-24-2005 01:50 PM
xinit command ftgow Linux - Software 2 06-10-2004 05:01 PM
question about XINIT evaross1 Linux - Software 3 05-12-2004 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration