Loading ...
Sorry, an error occurred while loading the content.

client server problems (X11)

Expand Messages
  • Thomas S. Urban
    I am interested in exploring the client server functionality in the latest betas, but I am having trouble getting it to work. I compiled 6.0t with HUGE
    Message 1 of 5 , Sep 2, 2001
    View Source
    • 0 Attachment
      I am interested in exploring the client server functionality in the
      latest betas, but I am having trouble getting it to work. I compiled
      6.0t with HUGE features, and clientserver is turned on (:ver below).

      If I start a gvim server with

      % gvim --servername BOB

      and then do

      % gvim --serverlist
      BOB

      but none of the remote commands seem to work, for example
      % gvim --servername BOB --remote test.txt

      returns immediately with 0 status, and test.txt doesn't appear in the
      BOB gvim or in it's buffer list. test.txt exists, btw.

      % gvim --servername BOB --remote-wait test.txt

      does wait for the gvim to exit, but again, the file doesn't show up in
      vim. I tried the other remote commands, but they don't work either.
      There isn't anything strange about my environment, and I have xhost set
      to accept any connection, just in case.


      Any ideas?
      Scott











      VIM - Vi IMproved 6.0at BETA (2001 Aug 27, compiled Sep 1 2001 21:06:27)
      Compiled by scott@...
      Huge version with GTK GUI. Features included (+) or not (-):
      +autocmd -balloon_eval +browse ++builtin_terms +byte_offset +cindent
      +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
      +cryptv +cscope +dialog_con_gui +diff +digraphs -ebcdic +emacs_tags +eval
      +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer
      +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
      +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm
      +mouse_netterm +mouse_xterm +multi_byte +multi_lang -osfiletype +path_extra
      -perl +postscript +printer -python +quickfix +rightleft -ruby +scrollbind
      +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
      +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
      +vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset +xim
      +xterm_clipboard -xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/local/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/local/include -g -O2 -I/usr/X11R6/include
      Linking: gcc -L/usr/X11R6/lib -L/usr/local/lib -o vim -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lm -lXt -lncurses -ldl
    • Thomas S. Urban
      Update - it works if I use vim as the server, ie: % vim --servername BOB (another term) then % vim --servername BOB --remote test.txt % gvim --servername BOB
      Message 2 of 5 , Sep 2, 2001
      View Source
      • 0 Attachment
        Update - it works if I use vim as the server, ie:

        % vim --servername BOB

        (another term)

        then

        % vim --servername BOB --remote test.txt
        % gvim --servername BOB --remote test.txt

        both work


        Scott


        On Sun, Sep 02, 2001 at 08:38:20AM -0700, Thomas S. Urban wrote:
        > I am interested in exploring the client server functionality in the
        > latest betas, but I am having trouble getting it to work. I compiled
        > 6.0t with HUGE features, and clientserver is turned on (:ver below).
        >
        > If I start a gvim server with
        >
        > % gvim --servername BOB
        >

        <snip>


        --
        Slous' Contention:
        If you do a job too well, you'll get stuck with it.
      • Bram Moolenaar
        ... It all works fine for me. I have no idea why it would fail for you. -- The early bird gets the worm. If you want something else for breakfast, get up
        Message 3 of 5 , Sep 2, 2001
        View Source
        • 0 Attachment
          Thomas S. Urban wrote:

          > I am interested in exploring the client server functionality in the
          > latest betas, but I am having trouble getting it to work. I compiled
          > 6.0t with HUGE features, and clientserver is turned on (:ver below).
          >
          > If I start a gvim server with
          >
          > % gvim --servername BOB
          >
          > and then do
          >
          > % gvim --serverlist
          > BOB
          >
          > but none of the remote commands seem to work, for example
          > % gvim --servername BOB --remote test.txt
          >
          > returns immediately with 0 status, and test.txt doesn't appear in the
          > BOB gvim or in it's buffer list. test.txt exists, btw.
          >
          > % gvim --servername BOB --remote-wait test.txt
          >
          > does wait for the gvim to exit, but again, the file doesn't show up in
          > vim. I tried the other remote commands, but they don't work either.
          > There isn't anything strange about my environment, and I have xhost set
          > to accept any connection, just in case.

          It all works fine for me. I have no idea why it would fail for you.

          --
          The early bird gets the worm. If you want something else for
          breakfast, get up later.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
          \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
        • Thomas S. Urban
          ... I tracked it down to a problem in my vimrc file. I have guioptions set to am there. Some experimenting showed that if i is not in the guioptions,
          Message 4 of 5 , Sep 2, 2001
          View Source
          • 0 Attachment
            On Sun, Sep 02, 2001 at 07:32:46PM +0200, Bram Moolenaar wrote:
            >...
            > It all works fine for me. I have no idea why it would fail for you.

            I tracked it down to a problem in my vimrc file. I have guioptions set
            to 'am' there. Some experimenting showed that if 'i' is not in the
            guioptions, then the client-server stuff doesn't work (at least for the
            gtk version I built). 'i' can't be added after the gui starts.

            Since 'i' is the flag for using the vim icon, this seems like a strange
            side effect or bug to me.

            Thx
            Scott

            --
            I don't have any use for bodyguards, but I do have a specific use for two
            highly trained certified public accountants.
            -- Elvis Presley
          • Bram Moolenaar
            ... Thanks for figuring this out. I couldn t have guessed it! The problem is a misplaced if in the GTK code. This patch should fix it: ... ***************
            Message 5 of 5 , Sep 2, 2001
            View Source
            • 0 Attachment
              > I tracked it down to a problem in my vimrc file. I have guioptions set
              > to 'am' there. Some experimenting showed that if 'i' is not in the
              > guioptions, then the client-server stuff doesn't work (at least for the
              > gtk version I built). 'i' can't be added after the gui starts.
              >
              > Since 'i' is the flag for using the vim icon, this seems like a strange
              > side effect or bug to me.

              Thanks for figuring this out. I couldn't have guessed it!

              The problem is a misplaced "if" in the GTK code. This patch should fix
              it:

              *** gui_gtk_x11.c~ Fri Aug 31 19:21:08 2001
              --- gui_gtk_x11.c Sun Sep 2 20:59:33 2001
              ***************
              *** 1612,1617 ****
              --- 1612,1619 ----
              XIconSize *size;
              int number_sizes;

              + if (vim_strchr(p_go, GO_ICON) != NULL)
              + {
              /*
              * Adjust the icon to the preferences of the actual window manager.
              * This is once again a workaround for a defficiency in GTK+.
              ***************
              *** 1636,1641 ****
              --- 1638,1644 ----
              icon = gdk_pixmap_create_from_xpm_d(gui.mainwin->window,
              &icon_mask, NULL, magick);
              gdk_window_set_icon(gui.mainwin->window, NULL, icon, icon_mask);
              + }

              #if 0
              /* Setup to indicate to the window manager that we want to catch the
              ***************
              *** 1775,1782 ****
              GTK_SIGNAL_FUNC(delete_event_cb), NULL);

              /* Add an icon to the main window. For fun and convenience of the user. */
              ! if (vim_strchr(p_go, GO_ICON) != NULL)
              ! gtk_signal_connect(GTK_OBJECT(gui.mainwin), "realize",
              GTK_SIGNAL_FUNC(mainwin_realize), NULL);


              --- 1778,1784 ----
              GTK_SIGNAL_FUNC(delete_event_cb), NULL);

              /* Add an icon to the main window. For fun and convenience of the user. */
              ! gtk_signal_connect(GTK_OBJECT(gui.mainwin), "realize",
              GTK_SIGNAL_FUNC(mainwin_realize), NULL);



              --
              CONCORDE: Quickly, sir, come this way!
              LAUNCELOT: No! It's not right for my idiom. I must escape more ... more ...
              CONCORDE: Dramatically, sir?
              LAUNCELOT: Dramatically.
              "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

              /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
              ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
              \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
            Your message has been successfully submitted and would be delivered to recipients shortly.