LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2013, 11:34 AM   #1
linuxer2013
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Rep: Reputation: Disabled
How use this command /root/.bashrc: export XAUTHORITHY=/home/<user>/.Xauthority


I have problem same as on:
https://answers.launchpad.net/ubuntu...question/71914
but I don't know how to:
/root/.bashrc:
export XAUTHORITHY=/home/<user>/.Xauthority

Anyone please help
 
Old 01-07-2013, 11:59 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Just open /root/.bashrc in a text editor (kate, vim, gedit, whatever), and add the line:
export XAUTHORITHY=/home/<user>/.Xauthority

replacing <user> with the user name.
 
Old 01-07-2013, 12:34 PM   #3
linuxer2013
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
I just tried that but I got
-----------------
linuxer2013@debian:~$ sudo gksu kate /root/.bashrc
[sudo] password for linuxer2013:
No protocol specified
(gksu:3810): Gtk-WARNING **: cannot open display: :0.0
linuxer2013@debian:~$
-----------------
is this another problem?

Thanks for the quick reply
 
Old 01-07-2013, 01:18 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Looks like an X-forwarding problem, is this a remote system that you're SSHing into?

The fastest solution would be to just use vi/vim or another non-graphical editor (pico, nano, etc).

Last edited by suicidaleggroll; 01-07-2013 at 01:20 PM.
 
Old 01-07-2013, 01:44 PM   #5
linuxer2013
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
There are build-in nano and vi on my debian but:
---
linuxer2013@debian:~$ sudo gksu nano /root/.bashrc
[sudo] password for linuxer2013:
No protocol specified
(gksu:5010): Gtk-WARNING **: cannot open display: :0.0
linuxer2013@debian:~$ sudo gksu vi /root/.bashrc
No protocol specified
(gksu:5014): Gtk-WARNING **: cannot open display: :0.0
---
My main problem is I can run synaptic but after giving root password on dialog box then synaptic can't show, this problem appears after installing Trinity and remove Xfce.

I don't understand about SSHing.
 
Old 01-07-2013, 03:00 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Get rid of the gksu business from the command, just "sudo vi /root/.bashrc"
 
Old 01-07-2013, 03:31 PM   #7
linuxer2013
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Okay, I prefer to use nano -> sudo nano /root/.bashrc
and it works and shows
--------
~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
--------
So now what should I do with "export XAUTHORITHY=/home/linuxer2013/.Xauthority" or in what line i should put it on?
I think it almost done, please don't get bored to give more answers V(^_^)
 
Old 01-07-2013, 08:29 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Put it anywhere in the file, doesn't matter.
 
Old 01-08-2013, 10:06 AM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It depends on how your login window works.

GDM passes the value for the xauthority by creating an environment variable for you. If you override it this is what you get, as the redirected xauthority file will be empty or have the wrong values.
 
  


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
[SOLVED] How to use my /home/kangjoo/.bashrc rather than root/.bashrc kangjoo.lee Linux - Newbie 2 11-05-2012 04:38 PM
User does int getting home directory in root home in ubuntu 10.04 lucid lynx sunrised24 Linux - Server 2 03-07-2012 10:21 AM
[SOLVED] Needed to be $HOME/.bashrc disabled when user shell is 'rbash' (restricted shell) mgumbau Linux - General 2 06-16-2011 07:17 AM
can't chdir /export/home/user/ perky.nishi Linux - Newbie 5 08-23-2010 01:37 AM
who should own /home/user/.Xauthority rbees Linux - General 3 02-10-2008 06:15 PM


All times are GMT -5. The time now is 08:29 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration