# Tunneling X via SSH... is startx not supposed to work?

## choey

Long story short, I made the infamous "rm -rf" mistake and wiped out my kernel, /dev, and some /stuff in my /bin.

I managed to start all over and emerge gnome-light. This is at my work, by the way.

Now, I'm at home for the weekend, and I need to make sure that when I get to work on Monday, I'll have most of the work environment set up.

I want to make sure that X and gnome all built correctly, but how can I do this?

I tried (after doing ssh -X) startx, which gave me

```
xauth:  creating new authority file /root/.serverauth.32119

X Window System Version 1.3.0

Release Date: 19 April 2007

X Protocol Version 11, Revision 0, Release 1.3

Build Operating System: UNKNOWN 

Current Operating System: Linux ws-scho 2.6.25-gentoo-r8 #1 SMP Fri Oct 10 10:04:58 PDT 2008 i686

Build Date: 10 October 2008

   Before reporting problems, check http://wiki.x.org

   to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 10 16:49:06 2008

(EE) Unable to locate/open config file

New driver is "nv"

(==) Using default built-in configuration (55 lines)

(EE) open /dev/fb0: No such file or directory

(II) Module already built-in

(II) Module already built-in

(II) Module already built-in

(WW) NV(0): Failed to set up write-combining range (0xd8000000,0x8000000)

(EE) AIGLX: Screen 0 is not DRI capable

^C

waiting for X server to shut down X connection to :0.0 broken (explicit kill or server shutdown).
```

And I tried gnome-session, which gave me

```
(gnome-session:32181): Gtk-WARNING **: cannot open display:
```

Is this expected from trying to startx when tunneling X?

----------

## notHerbert

If you want to run a remote X session on your local computer Xnest through an openvpn tunnel is an option.  

```
sudo Xnest :1 -ac -from xxx.xxx.xxx.xxx &

fvwm -d xxx.xxx.xxx.xxx:1 >/dev/null 2>&1 </dev/null &
```

KDE also had a remote desktop connection tool in the Internet menu -> Krdc and Krfb.

----------

## Hu

From the look of it, startx worked fine.  If you went in to work and powered up your monitor, you would find an X session waiting there for you.  You probably want to run an Xvnc process via vncserver, run the Xnest that notHerbert mentioned, or run individual X applications directly.

----------

## szczerb

If you have the time (judging by the fact that it's still saturday - at least at my location - you do) I'd do an emerge -e world so that all the missing files are rebuilt.

----------

## choey

Oh, nice. So I guess it's because of the method I was using that I was getting that error, and nothing is broken.

I don't need to tunnel X, really. I just need to make sure things are working. I'm still emerging stuff like evolution.

After I install everything I'll do a emerge -e world. Good call.

/goes to find out what -e is.   :Razz: 

EDIT:

The man page:

 *Quote:*   

>        --emptytree (-e)
> 
>               Reinstalls  all world packages and their dependencies to the current USE specifications while differing from the
> 
>               installed set of packages as little as possible.  You should run with --pretend first to make sure the result is
> ...

 

Does that mean that if I used some temporary USE flags (like "ldap kerberos" for evolution), they will be reinstalled with the global USE flags only, and not the temporary flags? That would break stuff miserable, so I hope not...   :Sad: 

----------

## Hu

As I understand it, --emptytree directs the package manager to consider every package as "missing, needs install" for purposes of determining which packages need to be built versus which packages already have an acceptable version installed.  This will cause it to construct a set consisting of the packages in world, then union in the set of packages that are required by packages in the first set, and to do so recursively until no new packages are added to the constructed set.  Then, every package in the constructed set is scheduled to be merged.

If you have already reinstalled a substantial number of packages, performing a --emptytree merge will perform a substantial amount of wasted work by rebuilding all those packages.  The only packages not rebuilt by an emerge --emptytree world are those that are neither listed in world nor required, directly or indirectly, by a package listed in world.  Such packages are candidates for removal from the machine, since neither you nor the package manager want them.

----------

## choey

I see. But my question is which USE flag does it use to rebuild the stuff? Does it not preserve the flags with which the packages were built (since not all packages are built with the same flags), or does it just ignore that and use the global flags?

----------

## notHerbert

It (emerge --emptytree) uses the currently set USE-flags thoughout the system; i.e the default flags, the profile flags, the make.conf flags and the package.use flags. You should run with --pretend first to make sure the result is what you expect.

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

network stuff, so moved here

----------

## choey

Thanks for moving the thread. The first thread I posted to was the installation, so I guess I posted this thread there, too!   :Cool: 

Good call on the --pretend deal... I didn't know what that did, but now I do. Hehe.

Emerging 390 packages... I hope that can be done in 12 hours on a xeon quad core.

----------

## choey

Oh, wow. It took just over 2 hours. Nice. =)

----------

