summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-03-20 18:03:31 (UTC)
committer mickeyl <mickeyl>2005-03-20 18:03:31 (UTC)
commit64104e14e4026658551e7283498eafbe3855e6d5 (patch) (side-by-side diff)
tree488a9916344c2627441742ae97eebf9a18a48a86
parent20aaf67029ac50afd8af8673db24721f10fbb43e (diff)
downloadopie-64104e14e4026658551e7283498eafbe3855e6d5.zip
opie-64104e14e4026658551e7283498eafbe3855e6d5.tar.gz
opie-64104e14e4026658551e7283498eafbe3855e6d5.tar.bz2
#1560 fix opie-console picking up the wrong shell. patch courtesy Paul Eggleton (bluelightning)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/apps/opie-console/consoleconfigwidget.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4722f9b..1c4cfe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,24 +14,25 @@
* #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
* #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
* #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
* #1482 - Fix double '/' in paths (zecke)
* #1536 - Autosave of custom locations in opie backup (ar)
* #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
* #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
* #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
* #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
* #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
* #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
* #1558 - Fixed opie-login breaking opie startup (mickeyl)
+ * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
* #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
* #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
* #1604 - Checkbook crashed on startup (drw)
* #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
* #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
* n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
* n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
* n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
* n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
* n.a. - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
* n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
* n.a. - AddressBook - fixed sorting by 'File As' name (drw)
diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp
index a6ad8d2..27d9a3f 100644
--- a/noncore/apps/opie-console/consoleconfigwidget.cpp
+++ b/noncore/apps/opie-console/consoleconfigwidget.cpp
@@ -1,23 +1,23 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlistview.h>
#include <qhbox.h>
#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>
-
+#include <unistd.h>
#include "consoleconfigwidget.h"
ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
m_lay = new QVBoxLayout( this );
QLabel *label = new QLabel(tr("Command to execute"), this);
m_lay->addWidget(label);
m_cmd = new QLineEdit(this);
m_lay->addWidget(m_cmd);
label = new QLabel(tr("Environment Variables"), this);
@@ -62,30 +62,30 @@ void ConsoleConfigWidget::slotRemove() {
}
}
ConsoleConfigWidget::~ConsoleConfigWidget() {
}
void ConsoleConfigWidget::load( const Profile& prof ) {
/*
* default to the users default shell
*/
struct passwd *ent = 0;
char *shell = "/bin/sh";
+ int uid = getuid();
- while ( (ent = getpwent()) != 0 ) {
+ ent = getpwuid(uid);
if (ent->pw_shell != "") {
shell = ent->pw_shell;
}
- }
m_cmd->setText(prof.readEntry("Command", shell ));
int envcount = prof.readNumEntry("EnvVars", 0);
for (int i=0; i<envcount; i++) {
QString name = prof.readEntry("Env_Name_" + QString::number(i), "");
QString value = prof.readEntry("Env_Value_" + QString::number(i), "");
if (!(name.isEmpty() || value.isEmpty())) {
QListViewItem *item = new QListViewItem(m_env);
item->setText(0, name);
item->setText(1, value);
m_env->insertItem(item);
}