[SuSE Linux] xserver, root shell, and charsets
I've never worked with multi-user systems before and I don't have yet any feel for that kind of thing. If I'm in X (not as root) and open a root shell, I cannot call any x apps from the root shell, it says "couldn't connect to xserver". Am I doing something that goes against the will of the linux gods? Or am I just not doing it well? Could somebody please help me? Another question - I installed cyrillic fonts and can at least see cyrillics in netscape. However when I print, all usual gibberish from latin1 comes out. I thought printer gets the same bitmaps as the terminal, at least when I'm not printing ascii. I'm printing through APS filter because I don't have a true postcript printer. Is there a way to make it print charsets other then latin1, preferrably without editing configuration for every charset change? Thanks in advance. Serguei - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
xhost localhost xhost adds localhost to the hosts that can connect to your machine. in the non root shell then su runxprogams
I've never worked with multi-user systems before and I don't have yet any feel for that kind of thing. If I'm in X (not as root) and open a root shell, I cannot call any x apps from the root shell, it says "couldn't connect to xserver". Am I doing something that goes against the will of the linux gods? Or am I just not doing it well? Could somebody please help me?
as for printers and fonts no help from me. - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
charles verge wrote:
xhost localhost xhost adds localhost to the hosts that can connect to your machine.
Thanks a lot! But I'm not quite there yet. Now it says it can't connect to display. Any ideas? Serguei - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
Thanks a lot! But I'm not quite there yet. Now it says it can't connect to display. Any ideas? Is your X server able to send data and revice data ? are you use ing :0.0 on the end of the export DISPLAY=hostname:0.0 ?
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
Thanks a lot! But I'm not quite there yet. Now it says it can't connect to display. Any ideas? oops sorry wrong person is you DISPLAY var set ? echo $DISPLAY says ? it should be :0.0
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
+----- On Thu, 17 Dec 1998 12:25:04 -0100, serguei chabanov writes: | | I've never worked with multi-user systems before and I don't have yet | any feel for that kind of thing. If I'm in X (not as root) and open a | root shell, I cannot call any x apps from the root shell, it says | "couldn't connect to xserver". Am I doing something that goes against | the will of the linux gods? Or am I just not doing it well? Could | somebody please help me? When you start up an Xserver one of the options is to restrict those who can connect, basically every application needs to know a password or be run on a specified set of hosts. The password is usually stored in a file in your home account called .Xauthority, any program that can read your Xserver's password can connect to the server. As root you can read any local file but of course root's home directory isn't the same as your own and you need to set 2 variables to point out the information needed, DISPLAY should point to the desired server, usually :0 and XAUTHORITY which should be ~<you>/.Xauthority. This may not work if you have an nfs mounted home directory. Another approach is to use xhost but that can open up some serious security problems. A third approach is to use sudo. | Another question - I installed cyrillic fonts and can at least see | cyrillics in netscape. However when I print, all usual gibberish from | latin1 comes out. I thought printer gets the same bitmaps as the | terminal, at least when I'm not printing ascii. Nope, wrong window system I'm afraid. | I'm printing through | APS filter because I don't have a true postcript printer. Is there a way | to make it print charsets other then latin1, preferrably without editing | configuration for every charset change? You need to install Latin6 postscript fonts for ghostscript. It isn't something that I've done so I can't help you much. /Michael - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
Michael Salmon wrote:
+----- On Thu, 17 Dec 1998 12:25:04 -0100, serguei chabanov writes: | | I've never worked with multi-user systems before and I don't have yet | any feel for that kind of thing. If I'm in X (not as root) and open a | root shell, I cannot call any x apps from the root shell, it says | "couldn't connect to xserver". Am I doing something that goes against | the will of the linux gods? Or am I just not doing it well? Could | somebody please help me?
When you start up an Xserver one of the options is to restrict those who can connect, basically every application needs to know a password or be run on a specified set of hosts. The password is usually stored in a file in your home account called .Xauthority, any program that can read your Xserver's password can connect to the server. As root you can read any local file but of course root's home directory isn't the same as your own and you need to set 2 variables to point out the information needed, DISPLAY should point to the desired server, usually :0 and XAUTHORITY which should be ~<you>/.Xauthority.
I had this problem too and the above hint showed me the way: The /root/.bashrc provided by SuSE already sets the DISPLAY variable like this: # # try to set DISPLAY smart (from Hans) :) # if test -z "$DISPLAY" -a "$TERM" = "xterm" -a -x /usr/bin/who ; then WHOAMI="`/usr/bin/who am i`" _DISPLAY="`expr "$WHOAMI" : '.*(\([^\.][^\.]*\).*)'`:0.0" if [ "${_DISPLAY}" != ":0:0.0" -a "${_DISPLAY}" != " :0.0" \ -a "${_DISPLAY}" != ":0.0" ]; then export DISPLAY="${_DISPLAY}"; fi unset WHOAMI _DISPLAY fi Now all that remains is to put this into /root/.bashrc as well: # # this allows a user to su to root and open a window under X # # note the separate quoting for the shell variable, with no intervening spaces PARENTUID=`ps lax | awk '$3 == '"${PPID}"' {print $2 }'` PARENTHOME=`awk -F: '$3 == '"${PARENTUID}"' {print $6}' /etc/passwd` export XAUTHORITY="${PARENTHOME}/.Xauthority" unset PARENTHOME PARENTUID and it works; any user running an X session on the console can now 'su' to root and launch an X client without running 'xhost'. Thanks Michael ;-) Ralph -- rclark@virgosolutions.demon.co.uk Ralph Clark, Virgo Solutions Ltd (UK) __ _ / / (_)__ __ ____ __ * Powerful * Flexible * Compatible * Reliable * / /__/ / _ \/ // /\ \/ / *Well Supported * Thousands of New Users Every Day* /____/_/_//_/\_,_/ /_/\_\ The Cost Effective Choice - Linux Means Business! - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
participants (4)
-
charlesiii@theverge.com
-
Michael.Salmon@uab.ericsson.se
-
rclark@virgosolutions.demon.co.uk
-
serguei@errc.org