in reply to to run a command from $ shell in perl program
to do what?...
want to run few commands here but system,exec,backticks wont runWell, first of all because these are perl commands, but you are in a shell that is a different program. If you want to run perl from here then use a perl script (or perl one liners). Second question, of course you had login in the shell as the plain user postgres, not as superuser root. This user don't have superpowers normally outside postgres databases, so if you use system for example, you have the powers of postgresql user, no more, and some system calls and commands (that are exclusive of root) will fail. To try to use postgres for things unrelated with postgres DB management is probably unwise and if "su" don't ask for a password in "su postgres" you are doing wrong.
if you still think that you need a graphic desktop for postgres user take a look to "adduser", (not necessary and not recommended, but if this make you feel better at the start, you can use it). If you need a graphic access to the database use i.e. pgadmin3, (but psql is perfect for me)
|
|---|