ssh -C -Y -l$USER xserver.mynet.xx 'Xnest -geometry 1900x1150 -query localhost'

10
By: cp
2010-07-22 06:26:35
ssh

These Might Interest You

  • If all three Session IDs are the same, then you've got SSL session caching running. @ http://hezmatt.org/~mpalmer/blog/general/ssl_session_caching_in_nginx.html Show Sample Output


    0
    gnutls-cli -V -r www.google.com |grep 'Session ID'
    evandrix · 2011-06-27 23:48:05 0
  • This starts a very basic X session, with just a simple xterm. You can use this xterm to launch your preferred distant session. ssh -X john@otherbox gnome-session Try also startkde or fluxbox or xfce4-session. To switch between your two X servers, use CTRL+ALT+F7 and CTRL+ALT+F8.


    3
    xinit -- :1
    flux · 2009-07-31 23:42:28 1
  • A wrapper around ssh to automatically provide logging and session handling. This function runs ssh, which runs screen, which runs script. . The logs and the screen session are stored on the server. This means you can leave a session running and re-attach to it later, or from another machine. . . Requirements: * Log sessions on a remote server * Transparent - nothing extra to type * No installation - nothing to copy to the server beforehand . Features: * Function wrapper delegating to ssh - so nothing to remember - uses .ssh/config as expected - passes your command line option to ssh * Self-contained: no scripts to install on the server * Uses screen(1), so is: - detachable - re-attachable - shareable * Records session using script(1) * Configurable log file location, which may contain variables or whitespace L="$HOME" # local variable L="\$HOME" # server variable L="some space" . Limitations: * Log dir/file may not contain '~' (which would require eval on the server) . . The sessions are named by the local user connecting to the server. Therefore if you detach and re-run the same command you will reconnect to your original session. If you want to connect/share another's session simply run: USER=bob ssh root@server . The command above is stripped down to an absolute minimum. A fully expanded and annotated version is available as a Gist (git pastebin): https://gist.github.com/flatcap/3c42326abeb1197ee714 . If you want to add timing info to script, change the command to: ssh(){ L="\$HOME/logs/$(date +%F_%H:%M)-$USER";/usr/bin/ssh -t "$@" "mkdir -p \"${L%/*}\";screen -xRRS $USER script --timing=\"$L-timing\" -f \"$L\"";} Show Sample Output


    3
    ssh(){ L="\$HOME/logs/$(date +%F_%H:%M)-$USER";/usr/bin/ssh -t "$@" "mkdir -p \"${L%/*}\";screen -xRRS $USER script -f \"$L\"";}
    flatcap · 2015-10-14 13:14:29 1

  • -2
    script -t 2> timing.txt -a session.txt ; Run some commands here; exit; scriptreplay timing.txt session.txt
    sandeepvreddy · 2012-12-12 10:32:28 0
  • alternatives: xinit $(which gnome-awesome-session) with cat /usr/local/bin/gnome-awesome-session: #!/bin/bash exec gnome-session --session awesome "$@" following: http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome note: in ubuntu 12.10 a probable Xephyr recent bug rejects keybd option ... Show Sample Output


    -2
    xinit $(which awesome) -- /usr/bin/Xephyr :5 -once -fullscreen -ac -keybd "ephyr,,,xkbmodel=pc105,xkblayout=it,xkbrules=evdev,xkboption="
    hute37 · 2012-11-03 00:54:33 0
  • Force the user you want to watch doing things into doing his things in a screen session. Then simply attach yourself to that session with the command shown above. Works only if you are on the same machine, of course


    5
    screen -x
    flart · 2009-09-09 11:30:56 4

What Others Think

Pretty useful! Works also on Mac. But it seems to need another Display. So the command would be ssh -C -Y -lmyusername myhost 'Xnest -ac :2 -geometry 1900x1150 -query localhost'
simonbarkow · 408 weeks and 5 days ago
Xnest is your friend
cp · 379 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: