Skip to Content
Xclock not working after sudo. # ssh root@remotehost remotehost# export DISPLAY=x.
![]()
Xclock not working after sudo After this operation, 96. 4MB of additional disk space will be used. 4MB/41. Make sure you're already able to run graphical program via SSH X tunneling as normal user. Error: can't open display . This is commonly done using below commands. May 20, 2020 · Not sure how the Windows X server works, but you might also need to "allow authorized clients" to connect, like xhost does on xorg. This ensures that the authentication and display settings are correctly applied, allowing X11 forwarding to work even after user switching. (It doesnt matter if testuser can run another xclock by his id or not). You should see the sample output and xclock or xterm window opened similar to the following image. Edit: I can use sudo, but I can not use user1 password, which is unknown to me. The installation went fine. -bash: xeyes: command not found xeyes is an X Window application that pops up a pair of eyes that follow your mouse pointer around the screen. Xauthority file for the user you switch to. The concern with ssh1sgp user i could run xclock on testusers desktop. Do you want to continue [Y/n]? Ahh! now we're getting somewhere! After installing the packages, I quit MobaXterm and verified it's settings: X11-Forwarding - checked Aug 23, 2024 · Last week we installed SUSE Linux Enterprise Server SP6 on a server. – Jun 18, 2015 · Summarizing the comments leading to success to an answer Some linux distributions (including centos) by default disable direct X access (for which the server would be listening to port 6000 + display num) by running the X server with the -nolisten option. We created a user stcadmin and gave him sudo access also, However when we try to run sudo su - root we are getting the fol…. Open the XMing utility you installed on your Windows bastion host and make sure it’s running. Jun 12, 2012 · After logging in with testuser1, I want to run the xclock or should I say once I lgged in as testuser I want to see xclock on desktop appearing, and that should be owned by ssh1sgp. Whether you're a seasoned Linux pro or just getting started with multi-user setups, this tutorial will help you resolve these pesky Xclock problems once and Enable ssh X11forwarding after switching to other user using 'su -' or sudo from root user? Solution Verified - Updated 2024-08-07T06:53:58+00:00 - English Dec 14, 2018 · From user1 perspective, this must be the same as when user1 itself runs xclock. Aug 23, 2013 · 0 upgraded, 83 newly installed, 0 to remove and 31 not upgraded. Please see the output below. Try the command xclock to verify if the x client applications are working as expected. Need to get 37. First, go to the ‘Session’ option in the ‘Category’ panel on the left. x:y. conf [security] DisallowTCP=false which should cause GDM to start the Xserver without the -nolisten tcp flag in Ubuntu. Cause Jun 8, 2017 · On a terminal (local terminal or ssh with X11 forwarding), a user can open X application however, another user is not able after suing. 4MB of archives. Nov 28, 2015 · If you run a graphical application in the “su” context, like “firefox” or “xclock”, the following error will occur: MoTTY X11 proxy: Authorisation not recognised In order to make it work, you just have to execute the following command in order to retrieve your display and make “firefox” or “xclock” work: xauth add $(xauth -f Can’t start X11 applications after “su” or “su -” to another user. How to accomplish this? Nov 8, 2023 · Finally, try the xclock or xterm command to see X11 forwarding in action. This means your x11 forwarding setup is working as expected even after switched to different user. x. Sample output: [user@hostname ~]$ xclock. Particularly, if you're connecting as a different user, authorizations could be disabled, but usually have a list of allowed clients. 0 $ xclock. # ssh root@remotehost remotehost# export DISPLAY=x. To get access to the X client applications such as system-config-date, xclock, vncviewer we need to export the DISPLAY settings of a remote host to the local server. Jan 7, 2025 · xclock is failing to start when running it as a normal user coming from a root user (using sudo or su). To resolve this, you need to manually configure the DISPLAY variable and . Here's what worked for me, also after trying the xhost + method, NOT via ssh X forwarding: Add to /etc/gdm/custom. The owner of the process xclock should be user2, because this is the user who launched it, but however this is not important. u1@cluster:~$ xclock u1@cluster:~$ su Password: root@cluster:# su - u2 [u2@cluster ~]$ xclock No protocol specified Error: Can't open display: localhost:11. Then, sudo service gdm restart Oct 5, 2020 · $ sudo su - oracle $ xauth add `cat /tmp/xauth` $ xauth list $ env|grep DISPLAY $ export DISPLAY=localhost:10. 0 [u2@cluster ~]$ Sep 9, 2024 · In this step-by-step guide, we'll walk you through the process of fixing Xclock display issues, ensuring that all users on your Linux system can access and use Xclock without any hiccups. If you are getting the “xeyes command not found” error, you may install the pakacge x11-apps as per the distribution of your choice. y If you have run sudo su and try to open an X11 window, that won't work until you revert back to your original ssh bash. jehxhf uzbvum qhnzw jvigj ycu iqavzye cieuco gtxg soygb wursydi