[Solved] Remotely closing X apps over ssh

I'm trying to figure out a way to remotely close an application (like firefox) cleanly over ssh.  I know I could run "kill [pid]" or "killall firefox-bin" to close it, but the default termination signal causes firefox to close immediately and give a message at its next start complaining about the program not being shut down properly.  I tried several other signals, all of which had the same problem. 
Is there a signal that I can issue from kill that will be equivalent to closing the application by clicking the X, pressing Alt-F4, going to File > Quit, etc?  If not, is there some other command I can issue to accomplish the same goal?
Last edited by liquidsunshine (2009-03-30 21:56:43)

@Bralkein:
i like the one liner, i've incorporated it into my script.  i split it up only because i wanted more meaningful errors.
@liquidsunshine:
thanks for asking this question, this turned out a nifty script.  i use pkill all the time, now i have wkill to gracefully close programs from CLI and it works from SSH just as well as locally.
here's the finished product:
#!/bin/bash
# wKill
# pbrisbin 2009
# gracefully close a program's window from
# a remote ssh session, or not
# requires wmctrl
# example usage: wkill firefox
# always exit cleanly
errorout() {
if [ $R -eq 1 ]; then
export DISPLAY=""
fi
echo "$1"
exit $2
# set DISPLAY to your remote X session if we're ssh'd
# though: maybe a "local DISPLAY=" would work?
# it'd be cleaner if it did
if [ -z "$DISPLAY" ]; then
export DISPLAY=":0.0"
R=1
else
R=0
fi
# get the PID by process name
PID=$(pgrep "$1") || errorout "no process by the name: $1" 1
# get the hex by pid
APP=$(wmctrl -pl | grep "$PID" | awk '{print $1}')
# some things don't get reported correctly
if [ -z "$APP" ]; then
APP=$(wmctrl -l | grep "$1" | awk '{print $1}')
if [ -z "$APP" ]; then
errorout "wmctrl can't find pid: $PID or app: $1" 1
fi
fi
# close the apps window
wmctrl -i -c $APP || errorout "wmctrl could not close app: $APP" 1
# put the DISPLAY back to prevent any problems
# do this only if we set it above
if [ $R -eq 1 ]; then
export DISPLAY=""
fi
exit 0
as Bralkein said, some windows might not get reported correctly.  i added a nested if in there for two reasons:
a) anything running in a terminal (irssi, mutt, htop) will only be captured by this if they were started with the terminal.  something like `xterm -e mutt`.  if you opened xterm, then opened mutt.  it will be listed as "bash ~" or something in wmctrl and the pid would be of mutt and not xterm... so we're kinda SOL there
b) b/c i'd rather get a nice "could not find pid: X for app: Y" instead of a grep or wmctrl error message (which is what you'd get if the $APP variable is empty)
other than the CLI app issue, it should pretty much catch every exception and run quite cleanly.  now if only i knew a real programming language...
Last edited by brisbin33 (2009-03-31 00:26:49)

Similar Messages

  • [SOLVED] How to tunnel HTTP over SSH via SOCKS?

    This should be a simple issue to solve, but for some reason it's not working for me.
    `ssh vps` works just fine (I use authentication keys)
    I set up the tunnel with the command:
    ssh -C2TNv -D 8080 vps
    I then modify Firefox network settings:
    manual config
    http proxy: localhost, port: 8080
    use this proxy server for all protocols
    SOCKS v5
    about:config
    network.proxy.socks_remote_dns: true
    Terminal output:
    $ ssh -C2TNv -D 8080 vps
    OpenSSH_6.0p1, OpenSSL 1.0.1a 19 Apr 2012
    debug1: Reading configuration data /home/ting/.ssh/config
    debug1: /home/ting/.ssh/config line 47: Applying options for vps
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Connecting to vps.server.com [1.1.1.1] port 22.
    debug1: Connection established.
    debug1: identity file /home/ting/.ssh/id_rsa type 1
    debug1: identity file /home/ting/.ssh/id_rsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze1
    debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1 pat OpenSSH_5*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.0
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 [email protected]
    debug1: kex: client->server aes128-ctr hmac-md5 [email protected]
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA <removed>
    debug1: Host 'vps.server.com' is known and matches the RSA host key.
    debug1: Found key in /home/ting/.ssh/known_hosts:10
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /home/ting/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 279
    debug1: Enabling compression at level 6.
    debug1: Authentication succeeded (publickey).
    Authenticated to vps.server.com ([1.1.1.1]:22).
    debug1: Local connections to LOCALHOST:8080 forwarded to remote address socks:0
    debug1: Local forwarding listening on ::1 port 8080.
    debug1: channel 0: new [port listener]
    debug1: Local forwarding listening on 127.0.0.1 port 8080.
    debug1: channel 1: new [port listener]
    debug1: Requesting [email protected]
    debug1: Entering interactive session.
    I then try visiting a site using Firefox, SSH output:
    debug1: Connection to port 8080 forwarding to socks port 0 requested.
    debug1: channel 2: new [dynamic-tcpip]
    debug1: channel 2: free: dynamic-tcpip, nchannels 3
    debug1: Connection to port 8080 forwarding to socks port 0 requested.
    debug1: channel 2: new [dynamic-tcpip]
    debug1: channel 2: free: dynamic-tcpip, nchannels 3
    Despite the proxy seemingly working, visiting any site with Firefox just returns with the error "The connection was reset".
    Last edited by AncientPC (2012-04-27 06:47:39)

    I eventually figured it out from here:
    http://superuser.com/questions/417397/h … -via-socks
    It turns out my Firefox settings were wrong, only SOCKS Proxy needed to be filled in.
    For future reference, you can test your SSH tunnel by using:
    curl --socks5 127.0.0.1:8080 http://blah
    curl --proxy 127.0.0.1:8080 http://blah

  • Podcast Producer over ssh on MBP.

    I have both an iMac and an MBP. I'm trying to setup the MBP so that I can remotely activate the iSight over ssh. Supposedly this can be done using /usr/libexec/podcastproducer/pcastagentd.
    When I run that locally on the MBP it seems to work fine. However, when I run it over SSH (which I should be able to do) I receive the following output:
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: pcastagentd (version 75) starting...
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: Reading preferences...
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: CFPreferencesAppSynchronize succeeded
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingType" = "Audio+Video"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingDiskSpaceCutoffInMB" = "1024"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoInput" = "Automatic"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoCodec" = "MPEG4"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoCodecQuality" = "High"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoMaximumFrameRate" = "30"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoImageWidth" = "640"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingVideoImageHeight" = "480"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingPreviewIntervalInSeconds" = "3"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "HighQualityCompression" = "false"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingAudioCodec" = "AAC"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingAudioChannel" = "Stereo"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingAudioSampleRate" = "44"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Read "RecordingAudioInput" = "Automatic"
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: StartAdHoc...
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: StartAdHoc -- Starting thread...
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: StartAdHoc -- Thread started.
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: RunAdHoc -- Starting capture.
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: Delayed start: 0
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: Notification Scheduler starts
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Notice>: No AVC devices found, it may be an iSight camera or something else
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: Checking Available Disk Space on /Users/johndavenport/Desktop
    Sat Jan 3 10:49:34 Macintosh-2.local pcastagentd[2920] <Debug>: 56984 MB Available
    Sat Jan 3 10:49:36 Macintosh-2.local pcastagentd[2920] <Critical>: SGNewChannel(VideoMediaType) Failed with error -9405
    Sat Jan 3 10:49:36 Macintosh-2.local pcastagentd[2920] <Error>: An error occurred during recording (9)
    Sat Jan 3 10:49:36 Macintosh-2.local pcastagentd[2920] <Critical>: Failed setting up video channel - No Device
    Sat Jan 3 10:49:36 Macintosh-2.local pcastagentd[2920] <Critical>: No input
    Sat Jan 3 10:49:36 Macintosh-2.local pcastagentd[2920] <Error>: RunAdHoc -- Start error: 9.
    This is what I'm putting in the command line:
    /usr/libexec/podcastproducer/pcastagentd -f "/Users/myuser/Desktop/capture.mov"
    I can't quite figure out why it's failing since it works when it's run locally on the MBP. I do know that for this to work a user has to be currently logged in on the laptop and I'm definitely logged in on it.

    I wanted to add a footnote. I also created a shell script and placed it on the MBP. The shell script just contained the command that I wanted to run. I then used SSH to login and attempted to run the shell script. Apparently the laptop still new that I wasn't actually running the command locally. Any thoughts would be appreciated.

  • [Solved] Remote X over ssh not working

    Hello, I'm trying to forward X11 over ssh but it's not working.
    I type
    ssh -X 192.168.1.101
    followed by my password, and I log in just fine.
    I try to launch an X11 application and I get
    $kate
    kate: cannot connect to X server
    SSH is supposed to be forwarding a dummy $DISPLAY to allow remote X.  So I type
    $echo $DISPLAY
    and and get back a empty newline.
    Well how about
    $xinit
    Fatal server error:
    Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.
    Please consult the The X.Org Foundation support
    at http://wiki.x.org
    for help.
    Okay, I'll shut down xserver.
    I do it, and type
    $xinit
    again.  KDE launches on my remote box.  It makes sense, but contradicts many guides I have read which say it should launch on my local machine.
    What am I doing wrong here?  This should be ridiculously simple.
    Last edited by xenobrain (2010-07-06 20:45:16)

    Did you enable X forwarding in your sshd config?
    Did you xhost + (or ssh -Y)?
    Did you crop your DISPLAY variable in a bashrc or similar script run at login?
    Last edited by benob (2010-07-06 19:10:54)

  • [SOLVED] Font glyphs work locally, but not over SSH?

    Hello,
    I am trying to get some font glyphs used for status icons (https://aur.archlinux.org/packages/stlarch_font/) to show up in a tmux session over SSH.
    The setup on the local and remote machines are identical and the fonts work fine in tmux on both machines, running locally.
    When attempting to view a tmux session over SSH, however, the glyphs no longer display and instead there is a blank space where they should be.
    Setup:
    URxvt 9.20
    Tmux 1.9a
    .Xresources (full)
    URxvt*termName: rxvt-256color
    URxvt*font: xft:dejavu sans mono for powerline:regular:pixelsize=16,\
    -misc-stlarch-medium-r-normal--10-100-75-75-c-80-iso10646-1
    .tmux.conf (full)
    set -g default-terminal "screen-256color"
    The setup is based off of tutorial: http://crunchbang.org/forums/viewtopic.php?id=20504
    Any ideas?
    Keith
    Last edited by hughitt1 (2014-07-15 01:00:24)

    --edit--
    It appears that the fonts do show up properly on the remote machines when I simply SSH in; it's only when I enable X11 forwards ("-x" flag) that they no longer work...
    **Update 2014/07/14** Problem not related to X11 forwarding. See below for explanation.
    Last edited by hughitt1 (2014-07-15 01:00:02)

  • Remote photoshop scripting over SSH

    I'm trying to get AppleScript scripts to execute on a remote rendering server over SSH (using the osascript command line utility). However, whenever I try to do most anything, I get various Photoshop and/or AppleScript errors that I never get when trying to run the exact same scripts locally. Ultimately, I'm trying to execute a JavaScript file passing JSON arguments from Applescript, called over SSH. Please forgive the verbosity introduced by the simple initial example.
    Server: OS X 10.8.5
    Photoshop: CC 2014
    I see the same type of errors whether I SSH into a server and do the following manually in a shell after logging in, or feed a command to SSH to execute directly (e.g., ssh user@host 'osascript /path/to/script.scpt'). Starting from a basic example, I tried running the following AppleScript snippet. I tried entering it into osascript by hand via stdin, as well as writing it out to a file and calling it remotely. Both resulted in no new file being created, but a success message.
    tell application "Adobe Photoshop CC 2014"
         make new document
    end tell
    No matter how I try to run this remotely, I get the response "document Untitled" from osascript, and Photoshop pops up an error dialog: "Could not complete your request because of a program error."
    More specific to what I'm trying to do, I've got the following code:
    tell application "Adobe Photoshop CC 2014"
         with timeout of 30 seconds
              do javascript("/path/to/local/file.js") with arguments ({"{\"json\": \"document\", ...}"})
         end timeout
    end tell
    When I try to run this locally, I never have a problem. But when I run it over ssh (again, either from the command line or by passing the command directly to ssh), I always get the following:
    script error: Expected end of line but found identifier. (-2741)
    In addition to osascript stopping with that error, Photoshop also pops up the same error dialog: "Could not complete your request because of a program error."
    Anyone have any suggestions or thoughts with regard to how I can get all this working?
    Thanks,
    Brian

    I was able to work around this constraint using a daemon on the local host. However, it would be nice if I could do away with this bit of server code....
    Thanks,
    Brian

  • [SOLVED]running xwindows session over ssh

    hi guys,
    i'm trying to run an entire xwindows session - the complete openbox-session - over ssh.
    i'm having some joy, in that i can run graphical programs such as gedit, or pcmanfm, luakit or whatever else on the client end no problems. is it possible to run an entire desktop over ssh?
    here's some configs and commands i'm running. i'm going by the arch wiki here.
    sshd_config:
    # $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
    # This is the sshd server system-wide configuration file. See
    # sshd_config(5) for more information.
    # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented. Uncommented options override the
    # default value.
    Port 22
    #AddressFamily any
    #ListenAddress 0.0.0.0
    #ListenAddress ::
    # The default requires explicit activation of protocol 1
    #Protocol 2
    # HostKey for protocol version 1
    #HostKey /etc/ssh/ssh_host_key
    # HostKeys for protocol version 2
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_dsa_key
    #HostKey /etc/ssh/ssh_host_ecdsa_key
    # Lifetime and size of ephemeral version 1 server key
    #KeyRegenerationInterval 1h
    #ServerKeyBits 1024
    # Ciphers and keying
    #RekeyLimit default none
    # Logging
    # obsoletes QuietMode and FascistLogging
    #SyslogFacility AUTH
    #LogLevel INFO
    # Authentication:
    #LoginGraceTime 2m
    PermitRootLogin no
    #StrictModes yes
    #MaxAuthTries 6
    #MaxSessions 10
    #RSAAuthentication yes
    #PubkeyAuthentication yes
    # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    # but this is overridden so installations will only check .ssh/authorized_keys
    AuthorizedKeysFile .ssh/authorized_keys
    #AuthorizedPrincipalsFile none
    #AuthorizedKeysCommand none
    #AuthorizedKeysCommandUser nobody
    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
    #RhostsRSAAuthentication no
    # similar for protocol version 2
    #HostbasedAuthentication no
    # Change to yes if you don't trust ~/.ssh/known_hosts for
    # RhostsRSAAuthentication and HostbasedAuthentication
    #IgnoreUserKnownHosts no
    # Don't read the user's ~/.rhosts and ~/.shosts files
    #IgnoreRhosts yes
    # To disable tunneled clear text passwords, change to no here!
    PasswordAuthentication yes
    PermitEmptyPasswords no
    # Change to no to disable s/key passwords
    ChallengeResponseAuthentication no
    # Kerberos options
    #KerberosAuthentication no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes
    #KerberosGetAFSToken no
    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes
    # Set this to 'yes' to enable PAM authentication, account processing,
    # and session processing. If this is enabled, PAM authentication will
    # be allowed through the ChallengeResponseAuthentication and
    # PasswordAuthentication. Depending on your PAM configuration,
    # PAM authentication via ChallengeResponseAuthentication may bypass
    # the setting of "PermitRootLogin without-password".
    # If you just want the PAM account and session checks to run without
    # PAM authentication, then enable this but set PasswordAuthentication
    # and ChallengeResponseAuthentication to 'no'.
    UsePAM yes
    #AllowAgentForwarding yes
    AllowTcpForwarding yes
    #GatewayPorts no
    X11Forwarding yes
    X11DisplayOffset 10
    X11UseLocalhost yes
    PrintMotd no # pam does that
    #PrintLastLog yes
    #TCPKeepAlive yes
    #UseLogin no
    UsePrivilegeSeparation sandbox # Default for new installations.
    #PermitUserEnvironment no
    #Compression delayed
    #ClientAliveInterval 0
    #ClientAliveCountMax 3
    #UseDNS yes
    #PidFile /run/sshd.pid
    #MaxStartups 10:30:100
    #PermitTunnel no
    #ChrootDirectory none
    #VersionAddendum none
    # no default banner path
    #Banner none
    # override default of no subsystems
    Subsystem sftp /usr/lib/ssh/sftp-server
    AllowUsers hulk
    # Example of overriding settings on a per-user basis
    #Match User anoncvs
    # X11Forwarding no
    # AllowTcpForwarding no
    # ForceCommand cvs server
    ssh_config
    # $OpenBSD: ssh_config,v 1.27 2013/05/16 02:00:34 dtucker Exp $
    # This is the ssh client system-wide configuration file. See
    # ssh_config(5) for more information. This file provides defaults for
    # users, and the values can be changed in per-user configuration files
    # or on the command line.
    # Configuration data is parsed as follows:
    # 1. command line options
    # 2. user-specific file
    # 3. system-wide file
    # Any configuration value is only changed the first time it is set.
    # Thus, host-specific definitions should be at the beginning of the
    # configuration file, and defaults at the end.
    # Site-wide defaults for some commonly used options. For a comprehensive
    # list of available options, their meanings and defaults, please see the
    # ssh_config(5) man page.
    # Host *
    # ForwardAgent no
    ForwardX11 yes
    # RhostsRSAAuthentication no
    # RSAAuthentication yes
    # PasswordAuthentication yes
    # HostbasedAuthentication no
    # GSSAPIAuthentication no
    # GSSAPIDelegateCredentials no
    # BatchMode no
    # CheckHostIP yes
    # AddressFamily any
    # ConnectTimeout 0
    # StrictHostKeyChecking ask
    # IdentityFile ~/.ssh/identity
    # IdentityFile ~/.ssh/id_rsa
    # IdentityFile ~/.ssh/id_dsa
    # Port 22
    # Protocol 2,1
    # Cipher 3des
    # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
    # MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
    # EscapeChar ~
    # Tunnel no
    # TunnelDevice any:any
    # PermitLocalCommand no
    # VisualHostKey no
    # ProxyCommand ssh -q -W %h:%p gateway.example.com
    # RekeyLimit 1G 1h
    ServerAliveInterval 120
    and the command i'm using to ssh in
    ssh -X -p 22 user@hostip
    i can log in fine every time, but when i do
    startx
    the openbox session starts on the remote machine, when obviously i want to view it on the client. i should also add i'm using urxvt to ssh in. also, please be aware this is a very basic setup as i'm just starting with ssh.
    thanks
    Last edited by yabasta (2013-11-06 16:44:37)

    yabasta wrote:i'm trying to run an entire xwindows session - the complete openbox-session - over ssh.
    If this is the case, why not use a tool that was designed specifically for this purpose?  You could set up vnc and then forward the ports to run over ssh.  But I have been playing with x2go, which is a open-source NoMachine alternative.  It is super easy to set up and runs over ssh.  What is really cool is that it actually runs far better than plain ol' vnc with a super responsive desktop.
    I don't really have much practical use for it, but after playing with vnc a bit and seeing the shitty performance that it can sometimes have, I heard about NoMachine and decided to give it a whirl.  I think the best part is that because it runs over ssh, it is as secure as your sshd setup is.  So if you want to open it up to face the greater internet, as long as you feel confident in doing that with ssh, there is no additional ports you need to open up or anything.

  • ADT hangs over ssh

    I am putting the finishing touches on our build system and have run into a show stopper bug in ADT.  It seems that ADT will not function propertly over ssh.  When I issue my ADT package command remotely on my Mac OS X machine via ssh, ADT simply hangs forever.
    The following are the errors I see on the Mac System Log:
    com.apple.SecurityServer: Session 24524 created
    naip: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    naip: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    And then nothing happens.  Forever.
    Looking on the remote system, I see that the ADT process has created 2 files and a directory in the output directory:
    drwxr-xr-x  2 build  staff     68 Jun  8 13:10 adt3612439737122910737.tmp
    -rw-r--r--  1 build  staff  11553 Jun  8 13:10 air6133709946041732094.tmp
    -rw-r--r--  1 build  staff  11553 Jun  8 13:10 air8135951800351503639.tmp
    However, nothing else happens.  The directory adt3612439737122910737.tmp is empty.
    The ADT package command I am running is:
    adt -package -storetype pkcs12 -keystore ../build/input/air/cert.p12 -storepass mypassword -tsa none -target bundle ../build/output/tmp/StoicAssetCompiler.mac.app ../build/output/tmp/EngineCompiler-app.xml -C ../build/output/app app.engine.compiler.swf
    The command works perfectly when I execute it from a terminal session as the build user.  However, any ssh session causes the adt program to hang forever.
    Short version:  How do I invoke ADT over ssh on Mac OS X?

    Additional point of information:
    There are 2 users involved here:
    john
    build
    john is logged into a desktop session. john can run ADT from a terminal, or even from a terminal ssh-d back to localhost as john.
    build can run ADT from a terminal su'd to build.  build cannot run ADT in any ssh session, including one ssh'd from the su'd terminal that works otherwise.

  • My screen continually freezes up.  I've tried closing all apps that are openfreezby double clicking on the home button and closing them. I have held down on the home button and start button simultaneously and it still freezes. Can someone out the help me?

    MY screen continually freezes up. I've tried closing all apps that are open and have held down the home button and start button simultaneously but neither helped. Can someone out there help me?

    Well the next couple of things to try would be to reset all settings, and if that doesn't help, it's probably time to restore the iOS software.
    Settings>General>Reset>Reset all settings. That will take all settings on the iPad back to factory defaults. It will not delete anything and you will not lose any data, but you will have to enter all settings again ...WiFi passwords, enable Siri, select your wallpaper, adjust brightness, turn on location services and set privacy settings, etc, etc.
    You can read about restoring the software here.
    iTunes: Restoring iOS software - Support - Apple
    Should you decide to restore the iOS, it is extremely important that you back up first so that you can restore from the backup and then sync with iTunes afterward in order to restore all content back to the iPad. It is all covered in the kb article.
    If you do not sync with iTunes, then I assume that you backup with iCloud. In that case you can erase the device in Settings>General>Reset>Erase all content and settings. Once again, backing up with I loud is I,operative before you do this so that you can restore from the iCloud backup after you erase the iPad and start over again with activation.
    You should read this first before you restore from either backup.
    How to backup and restore from a backup
    http://support.apple.com/kb/HT1766
    This is a must read before you erase the iPad should you decide to go that route.
    iOS: Understanding 'Erase All Content and Settings' - Support - Apple

  • Ctrl+Shift+Option+5 registers as Option+5 in custom emacs build or over ssh

    I'm having trouble with custom emacs and emacs over ssh with Leopard. Included below is the text of the bug report I filed with Apple. If anyone has any thoughts or suggestions, I'd love to hear about them.
    It won't let me change the OS on this post for some reason, but I'm running Leopard, not Tiger.
    In Terminal.app Version 2.0 (237) when I ssh into my Gentoo Linux server and run emacs, or if I run a custom-compiled version of emacs in terminal mode locally, pressing CtrlShift+Option5 (which should bring up "Query replace regexp:" in the bottom input bar) registers as if only Option+5 was pressed.
    NOTE: I am using the new aluminum USB-2.0 apple keyboard connected to a MacBook Pro running Leopard 9A581. I have not tested any other hardware configurations.
    Steps to reproduce:
    1. Download http://ftp.gnu.org/pub/gnu/emacs/emacs-22.1.tar.gz
    2. Untar the above
    3. cd emacs/mac && ./make-package --self-contained
    4. Copy or move Emacs.app to /Applications
    5. From Terminal.app run "/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
    6. Press CtrlShift+Option5
    OR
    1. SSH into a linux server and run emacs.
    2. Press CtrlShift+Option5
    Expected Results:
    "Query replace regexp:" should appear in the input line at the bottom of the screen.
    Actual Results:
    "ESC 5-" shows up. The escape key is an alternate meta-key, so this indicates that the program believes Meta+5 was pushed, where the actual meta-key that I'm using is Option.
    I never noticed this problem in any version of Tiger, but it occurs in Leopard.

    Perhaps, you should try to reset your preference file to see if it corrects itself.  I have posted the instructions at this link:
    http://forums.adobe.com/thread/1097046?tstart=0
    Good luck.

  • X forwarding suddenly failing over ssh

    Hi,
    I have an Ultra 20 running solaris 10, and recently started using the patch manager thingy to update my machine automatically. Well, one of those patches botched X11 forwarding over ssh, with the following error message delivered to the client:
    ==================
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    connect /tmp/.X11-unix/X0: Not a directory
    X connection to localhost:10.0 broken (explicit kill or server shutdown).
    ==================
    Looking at this file, i see this:
    ==================
    pwd/tmp/.X11-unix
    ls -FCltotal 0
    srwxrwxrwx 1 root root 0 Oct 12 19:31 X0=
    ==================
    Which looks more or less correct for a socket. (doing just a plain "ls" returns "X0", and not "X0=").
    When run in debug mode, sshd gives this:
    ==================
    debug1: X11 connection requested.
    debug1: channel 3: new [X11 connection from ::1 port 33274]
    channel 3: open failed: administratively prohibited: open failed
    debug1: channel 3: free: X11 connection from ::1 port 33274, nchannels 4
    ==================
    This was working perfectly for a long time, and I don't even know which patch it was that caused the problem.
    Help! I can't stand developing with VI any more! Must run xemacs...
    Thanks,
    Ben

    Hello.
    With my old computer I managed to display this screen on a Windows X client using XDM. On my new machine I did not manage this because dtgreet does not work on remote machines when having installed the latest patches.
    Using SSH it is not possible to show this screen at all.
    If it was possible with another version of dtgreet you had to log-in as "root" using SSH (it would not work with another user) which is a problem because SSH typically denies root access.
    The question is: Why do you wish to show this display on the remote machine? Maybe there is a better way to archieve the goal you actually want.
    Martin

  • Using nvidia-settings without X/over ssh

    I have a computer with an nvidia GTX 670 that I want to control remotely. However, I have problems using nvidia-settings over ssh. When trying to use it, I get this error:
    ERROR: Cannot open display ':0.0'.
    When a user is logged in an xfce session locally, I can use nvidia-settings without issue, using the command line over ssh. As soon as I log out from the xfce session, I get
    Invalid MIT-MAGIC-COOKIE-1 key
    ERROR: Cannot open display ':0.0'.
    ERROR: Unable to query attribute GPUCoreTemp specified in query '[gpu:0]/GPUCoreTemp' (no Display connection).
    How can I use nvidia-settings without the need for a user to be logged in locally?

    I am trying to do the same thing with a GT 240. I found something promising here:
    https://sites.google.com/site/akohlmey/ … s-X-Server
    Since you do have a local monitor, it may be easier not having to fake one. I don't have a monitor, I haven't gotten around to trying the Xorg stuff yet.

  • Gnome over SSH Painfully slow

    Hello all!
    Since recently upgrading to Tarantella 4, and have found that Gnome sessions
    over SSH to Redhat ES3 systems have become extremely slow. We can compare
    this performance change with Tarantella 3.42 because we have one of our
    original array members with exactly the same ens configuration as our new
    TTA4 array.
    Would someone mind helping me with this?
    Kind thanks in advance!
    Paul
    Our new environment:
    TTA Host:
    Redhat ES3 (kernel 2.4.21-20)
    Tarantella 4.00.903
    openssh-3.6.1p2-33.30.1
    openssh-askpass-3.6.1p2-33.30.1
    openssh-clients-3.6.1p2-33.30.1
    openssh-server-3.6.1p2-33.30.1
    openssh-askpass-gnome-3.6.1p2-33.30.1
    gnome-session-2.2.2-3
    *NIX app server:
    Redhat ES3 (kernel 2.4.21-27)
    openssh-3.6.1p2-33.30.1
    openssh-clients-3.6.1p2-33.30.1
    openssh-server-3.6.1p2-33.30.1
    openssh-askpass-3.6.1p2-33.30.1
    openssh-askpass-gnome-3.6.1p2-33.30.1
    gnome-session-2.2.2-3
    Client:
    TTA native client 3.42.903
    Our Old Environment:
    TTA Host:
    Redhat 7.3 (kernel 2.4.18-3)
    Tarantella 3.42.915
    openssh-3.1p1-3
    openssh-server-3.1p1-3
    kdessh-3.0.0-4
    openssh-askpass-3.1p1-3
    openssh-askpass-gnome-3.1p1-3
    openssh-clients-3.1p1-3
    gnome-core-1.4.0.4-54
    *NIX app server:
    Redhat ES3 (kernel 2.4.21-27)
    openssh-3.6.1p2-33.30.1
    openssh-clients-3.6.1p2-33.30.1
    openssh-server-3.6.1p2-33.30.1
    openssh-askpass-3.6.1p2-33.30.1
    openssh-askpass-gnome-3.6.1p2-33.30.1
    gnome-session-2.2.2-3
    Client:
    TTA native client 3.42.903

    Actually, this problem crashes the server.
    Can anyone help me with this? Have there been any changes to the way
    Tarantella connects to a XWindows server over SSH?
    Thanks
    Paul

  • [MAC] aerender via terminal over ssh root

    Hey,
    I am attempting to start a render on a mac over ssh via the terminal.  On my test mac I can only get the command to work if I run it as root, however I will be needing to do this on an OSX Xserv cluster where I will not have root access.  Here are the errors I get.
    On my test Mac, not root:
    "_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    aerender ERROR -609: AESend failed to send apple event at line 712"
    On the cluster, not root:
    "kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
    INIT_Processeses(), could not establish the default connection to the WindowServer.Abort trap"
    Is there anyway for me to start a render remotely, without being logged in as root?
    Thanks,

    jonnyflash wrote:
    Is there anyway for me to start a render remotely, without being logged in as root?
    I don't think so. What you are trying to do is basically to break out of the security sandbox of your SSH connection which by all means is fundmanetally evil. What you would have to do is decouple the process from your connection by sending it to the background. Back then in my SGI days we used the background alias all the time to do this, but I think the native way merely attaches a parameter by calling the PID. From what a quick search turned up, on OSX this seems to be the ampersand (&). Short of that, the convenient way is naturally doing it in a remote desktop or via a virtualisation software....
    Mylenium

  • Verizon Remote Control iPhone App will not accept my logon credentials

    I downloaded the Verizon Remote Control iPhone App - but it doesn't accept my username/password.  The same app has a Support section and that section does accept my username/password.
    Any advice?

    make sure you are using the Verizon primary email account, if you are still having issues contact the FIOS tech support (FSC) over a live chat at http://www22.verizon.com/content/contactus or call on 1 800 837 4966
    “I am a Verizon employee but my comments and thoughts are my own.”

Maybe you are looking for

  • Error After sharing work book

    Hello All, I modifed a report by adding 2 news columns from a folder(which is based on table2). I am able to genrate the work book successfully. So i shared the same work to another user , but while user is running the report he came across an error

  • How to set default values to these fields

    Hello, I'm new with UCM 11g, and i need to add default values to fields, for example to these fields: Type -> Document should be the default and not editable value Title -> Should be the name of the file i'm checking in Security Group -> it's default

  • Sharing To Do's through Mobile Me publishing?

    I have a question about how to share the To Do's that are displayed in my iCal. Events are published to me and the person I am sharing with easily through Mobile Me (we both have accounts). However the To Do's aren't sent and updated by automatically

  • Problem with i5 Macbook Pro making full HD in iMovie

    My late 2011 Macbook pro (i5 2.4 GHz,4 GB Ram,intel HD3000,5400 rpm 500 gb hard disk)tells me "⚠choosing full size on this computer may result in degraded video playback" in  'video' pane of iMovie preferences if i want the option "import hd videos a

  • Illustrator won't open at all following Mavericks update.....

    This is very frustrating. InDesign and Photoshop open up just fine, but Illustrator (CS6) literally does not even budge. I hopped the Mavericks update train a bit late, and now I wish I hadn't at all. I need Illustrator for work. Now. And do not have