Friday, February 17, 2006

 

Sun Studio 11, dbx, glibc and my old SuSe

OK, after having heard SUN now offers Sun Studio 11 on Linux, I tried to download it.

This is of course a pathetic excuse for a software. Simply NetBeans-based IDE which merely invokes GNU compilers. There is also Motif-based "X-designer" ... Br... And yes, there is "sample" C++ GUI "project". Nonsense.

The only remotely useful piece of whole crap could be dbx debugger, but of course it fails to start on my system asking for newer version of GNU libc :

dbx: /lib/i686/libc.so.6: version `GLIBC_2.3.4' not found (required by dbx)

I even risked downloading latest GNU libc (2.3.6 right now), hoping to install it into a separate directory (not really sure whether this is possible in the first place); this hope however died in vain after this error:

cannot set up thread-local storage: set_thread_area failed when setting up thread-local storage

It seems like something on my system is too old, either kernel (2.4.21), or compiler (3.3.1), or both.

Found one interesting page on the subject of upgrading libc.so which supposedly describes a (presumably) safe way to do so. It follows from it that I might have better luck trying 2.3.4, though I still don't understand whether I can simply install it in another directory to a avoid de-stabilizing the system or not.

May be I try it one day.

My SuSe 9.0 is rapidly becoming too old and outdated, so that few pre-compiled binaries can be installed. Unfortunately.

Labels: , ,


Sunday, February 05, 2006

 

Audacity vs. Audio Record Wizard

Just found an excellent free program for Linux/Windows, Audacity. It is included in SuSe 9.0, and under Windows is a perfect free replacement for (otherwise good) (shareware) program Audio Record Wizard.

Labels: ,


Saturday, February 04, 2006

 

Spellbound in Mozilla 1.5+

To install spellbound in Mozilla 1.5+, follow this links: Installer (found here, and here there is a generic spellbound discussion)

 

external USB devices with SuSe 9.0

Nice introduction on how to install external USB devices with SuSe 9.0!

Labels: , ,


Thursday, February 02, 2006

 

Controlling ssh from (python) script

It appears ssh only reads its password from the TTY making it difficult to supply one via a script. Here is a possible solution in python:

The trick is, of course, to create pseudo-TTY:

--
#!/usr/bin/env python
#Remote command through SSH using user/password
import os, time

def pause(d=0.2):
 time.sleep(d)

def rcmd(user, rhost, pw, cmd):
 #Fork a child process, using a new pseudo-terminal as the child's 
controlling terminal.
 pid, fd = os.forkpty()
 # If Child; execute external process
 if pid == 0:
  os.execv("/bin/ssh", ["/bin/ssh", "-l", user, rhost] + cmd)
 #if parent, read/write with child through file descriptor
 else:
  pause()
  #Get password prompt; ignore
  os.read(fd, 1000)
  pause()
  #write password
  os.write(fd, pw + "\n")
  pause()
  res = ''
  #read response from child process
  s = os.read(fd,1 )
  while s:
   res += s
   s = os.read(fd, 1)
  return res

#Example: execute ls on server 'serverdomain.com'
print rcmd('username', 'serverdomain.com', 'Password', ['ls -l'])
---

Labels:


This page is powered by Blogger. Isn't yours?