Skip to main content

Using Sublime Text or gedit when logging as User

For me I used xhost + and it solved the problem.
You can use it when you are working in a  remote instance and you wanna use gedit.
By default, and for security reasons, the only user that interacts with X-server is the logged-in user. Meaning, You can not initiate a connection to x-server as a different user or in your case as root, unless you have overridden the default setting to allow different users/hosts to connect to x-server. So the error message you are getting is related to x-server since any other user can't connect to it. In order to get around it, you have various fixes you can apply. What I normally do when ever I need to run an X-app as root is as follows.
  • From normal user terminal, I run xhost + to grant access to all user temporarily
  • Then I log in as root from a different terminal and execute the X-app ie gedit tester.php
To make it permanent (which I don't suggest), edit /etc/profile and add the following line:
export XAUTHORITY=/root/.Xauthority

Popular posts from this blog

Mounting a Windows 8.1 partition on Ubuntu 14.04

If u guys have a problem mounting a Windows 8.1 partition on Ubuntu 14.04 , Here's a Quick fix that worked for me :

Disable the default hibernation mode by using CMD program as administrator – Boot into Windows and type “cmd” in the search field on the built-in Windows search app >> launch the app and type: powercfg -h off >> press enter and your done.

The Brain Regain

It's an article of : Mohammed BIN RASHID AL MAKTOUM, Vice President and Prime Minister of the United Arab Emirates and Ruler of Dubai. Written on : JUN 8, 2014 , from : The World's Opinion Page
DUBAI – In 1968, while studying at the Mons Officer Cadet School in the United Kingdom, I needed to visit a hospital. There I met a doctor who, to my surprise, spoke fluent Arabic. I learned that he was new to the UK, so I asked if he intended to stay long or return home. He replied with an Arabic saying that translates as: “My home is where I can eat.”
That doctor’s words stayed with me for many years, because they underscored the contradiction between our idealized view of “home” and the harsh realities of life that push talented people to leave their homes. The doctor was a classic case of the “brain drain” phenomenon that has afflicted developing countries for decades. These countries spend scarce resources educating doctors, engineers, and scientists, in the hope that they will be…

My Environmental Club at CPGE IBN Taimiya

This is the link that shows the schools that participated in MOBILZE U, and our school is the only one to participate from MOROCCO:
IBN TAIMIYAEarth Day Participating Schools ---USA Initiative---

How did the story begin ?

It was all about a presentation I did, about the theme we had last year Social Development.So, I prepared the presentation and I rehearse it before going to class,meanwhile ,I thought about how I would tease students'curiosity and make them participate in the debate. Then, I said why not to talk with them on changing the aspect of our preparatory classes, 'coz as a famous school, it's a shame to have such a disgusting courtyard without trees or joyful plants.
then ,at the end of my presentation , I mentionned the idea ,and Mr Rasmy 'our english teacher' liked it and did share it with the coordinator of our school. Then it comes the IDEA OF CREATING this Club,which I named "ENVIRONMENTAL CLUB OF IBN TAIMIYA". I'm sure that several…