On Wed, 2002-05-29 at 00:42, Elky Grrrr... wrote: > > hello i have a problem, i need to start an app that uses X from the > command line, but i get this message : > Xlib: connection to ":0.0" refused by server > Xlib: Invalid MIT-MAGIC-COOKIE-1 key > > Error: Can't open display: :0.0 > > can anyone help me??
ian's suggestion works if you need to start the app from the commandline interactively. if the reason you need to start it from the command line is because it's automated or something (i could maybe invent a reason why you might want to do that, if i thought about it hard enough, right now i'm hard pressed to give a reasonable example) then maybe the app is started from crontab. or via at or something. in that case, and if the user that runs the app is not the same user running X, then you'll want to do something like: xhost +localhost and in the command line environment do something like: export DISPLAY=:0.0 before calling the program. the program (e.g., kcalc or some other X program) will then run and display on the localhost:0.0 display. that's basically the same approach you'd take if you needed to run a program on a remote box but display it on your current workstation. you allow the remote box to display on the local X environment by running xhost +remotehost and then set the $DISPLAY correctly on the remote box and run the program. it'll run there but display here. does that help? tiger _ Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph To leave: send "unsubscribe" in the body to [EMAIL PROTECTED] To subscribe to the Linux Newbies' List: send "subscribe" in the body to [EMAIL PROTECTED]
