Family, Work, Life

Video Mashup

October 30th, 2008 Ansi

Moin

I am soooo sorry…

Share/Save/Bookmark

How to export display via SSH after sudo su

October 8th, 2008 Ansi

Moin
Just figured out together with DrScofield how to export the Display via an SSH tunnel after changing user to root via sudo. And hey it sound trivial but was not easy to find out. Here is the step by step way.

  1. ssh -X server #as normal user
  2. xterm #for testing if export display as normal user works
  3. echo $DISPLAY #write it down
  4. xauth #enters the shell of xauth
    1. list # find the line with the display number from step 3 for me it was “wpsvm054/unix:12 MIT-MAGIC-COOKIE-1 071df2e12cfff0ed75fd0af5869665f7″ remember the first part of it
    2. quit #to leave the shell
  5. xauth extract filename system/unix:12 # the line from step 4.1
  6. sudo su - # to become root
  7. xauth merge filename # filename from step 5
  8. export DISPLAY=:nummer.0 #Displaynumber from step 3 resp. 4.1
  9. xterm #for testing

Hope it works on other systems too.

Share/Save/Bookmark