Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: sh file (I think it's actually a binary) can't open xterm

  1. #1
    Join Date
    Jul 2014
    Beans
    290

    sh file (I think it's actually a binary) can't open xterm

    Newbie here.

    Trying to help a user get their lexmark printer working in Ubuntu. Found the appropriate linux driver at lexmark and downloaded it, uncompressed it and ran the sh file as the instructions said. At first it didn't work because it was looking for bin/linux/x86/libc.so.6, so I tried creating a folder in the Downloads folder of bin/lib/x86 and created a link there to the 64-bit libc.so.6 (I thought it would at least get past this problem but give me errors as it tried to actuall use the library) - didn't work. Tried the same but in /bin - didn't work. Backed out both attempts so the folders were cleaned up.

    Opened synaptic package manager and found the package for g++ for i386 - clicked it for install and it included 2 other packages (I think 1 of those was the actual i386 support libraries). I then ran the script again and got past the initial error. I know that this is supposed to eventually open a gui to install/config the printer, but I now get an error that it can't open xterm, so I don't know if there is another (older) version I might need as the last update I can find on the net for actually installing this was back in 10.xx. The attachment is a screen capture.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2009
    Location
    South Carolina
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: sh file (I think it's actually a binary) can't open xterm

    Welcome!

    See if xterm can be installed:
    Code:
    sudo apt-get install xterm

  3. #3
    Join Date
    Jul 2014
    Beans
    290

    Re: sh file (I think it's actually a binary) can't open xterm

    It's says xterm is already installed and current. I can open a terminal, type xterm and press enter and it does open a xterm terminal window.

    I'm wondering if the paths have changed since 10.xx, or perhaps even how X11 is referred to, such that I might need to create some kind of "dummy" folders fold X11 paths and link them to the current paths, including executables as needed. I have a hunch the program is referring to xterm via a full path.

    Thanks for the reply and help!

  4. #4
    Join Date
    Jan 2009
    Location
    South Carolina
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: sh file (I think it's actually a binary) can't open xterm

    Hmm, what does:
    Code:
    cat lexmark-08z-series-driver-1.0-1.i386.deb.sh | grep -i xterm
    give you?

  5. #5
    Join Date
    Jul 2014
    Beans
    290

    Re: sh file (I think it's actually a binary) can't open xterm

    I only get this:

    Code:
    me@me1735:~/Downloads$ cat lexmark-08z-series-driver-1.0-1.i386.deb.sh | grep -i xterm
    Binary file (standard input) matches
    me@me1735:~/Downloads$
    Kind of weird that it can't open xterm yet the actual word xterm is not in the file. I wonder if it's trying to use something and in turn that "something" requires xterm.

    I did try opening terminal, typing xterm and pressing enter, then going to the xterm window and running the sh file as well and still get the same error.

    Since this appears to be a binary executable, and there is no source code, do you know if there is any way to trace what X calls are being made - like some sort of X trace? Seems to me like I used something like that years ago but don't remember what it was or how it works.

    Thanks again.

  6. #6
    Join Date
    Jul 2014
    Beans
    290

    Re: sh file (I think it's actually a binary) can't open xterm

    I was just looking at another thread on the net about a similar problem and tried something it mentioned there:

    - opened a terminal via ctrl/alt/F6 and logged in
    - went to Downloads and ran it the same as before and now get this at the end instead of xterm:
    [code]Error opening terminal: linux[code]

    I also noticed that when I use that same terminal and type xterm I get errors, starting with DISPLAY not being defined.

    When I have been doing this before, including typing in xterm and it worked, it was via the "Terminal" launcher in the menu.

    Perhaps this helps - perhaps it just muddies things up more

  7. #7
    Join Date
    Apr 2012
    Beans
    7,174

    Re: sh file (I think it's actually a binary) can't open xterm

    I wouldn't expect running from one of the Ctrl-Alt-Fn virtual terminals to work - unless it's smart enough to figure out that there is no X session and run in some kind of text-based mode

    FYI the word 'xterm' is there - as indicated by the grep message "Binary file (standard input) matches" - but you need to be a bit more devious to see it e.g.

    Code:
    $ strings lexmark-08z-series-driver-1.0-1.i386.deb.sh | grep 'xterm'
      --nox11               Do not spawn an xterm
    xterm_loop=
        xterm_loop=1
            if test x"$DISPLAY" != x -a x"$xterm_loop" = x; then  # No, but do we have X?
                    GUESS_XTERMS="xterm rxvt dtterm eterm Eterm kvt konsole aterm"
    I don't have a Lexmark printer but I was able to run the extracted 32-bit sh file on my 32-bit 12.04 system and it popped up a graphical installer window - it didn't seem to be using xterm as far as I could tell though (using ps). FWIW I also tried adding the --nox11 option mentioned in the 'strings' output, but it didn't seem to make any difference (the GUI installer window still popped up).

    Since it's trying to open a GUI app you may have better luck using gksudo (or gksu) instead of plain sudo since that handles the GUI environment better.


    Sorry I can't help more
    Last edited by steeldriver; August 19th, 2014 at 10:48 PM.

  8. #8
    Join Date
    Jan 2009
    Location
    South Carolina
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: sh file (I think it's actually a binary) can't open xterm

    Big +1 to steeldriver's post.

    It might also be useful to know what $TERM is:
    Code:
    echo $TERM

  9. #9
    Join Date
    Jul 2014
    Beans
    290

    Re: sh file (I think it's actually a binary) can't open xterm

    Ok - found another link with some info that at least got me to the gui:

    - had to link /lib/terminfo and /usr/share/terminfo

    This then allowed the gui to come up and I could go through the setup until I accepted the license agreement and it started installing - I get an error in the actual install process itself that goes too quick to catch but the gui itself doesn't error out - it keeps running and says the install did not complete.

    So, a BIG step in the right direction.

    Any idea how to copy outputs from a xterm window to a file so I can see them?

    Thanks.

  10. #10
    Join Date
    Jul 2014
    Beans
    290

    Re: sh file (I think it's actually a binary) can't open xterm

    It goes by so dang quick and then gets mostly covered by the error message window the program pops up. It looks like something with dpkg, but I just can't catch it.

    In the opening text where it shows requirements, it says it's 32-bit only and the only ubuntu release supported is 9.10 - even though I saw reference to this with ubuntu 10.xx on the net.

    Does dpkg keep some sort of error log somewhere?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •