• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • sources
  • kde-4.12
  • applications
  • konsole
  • src
Session.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Konsole
3 
4  Copyright 2006-2008 by Robert Knight <robertknight@gmail.com>
5  Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
6  Copyright 2009 by Thomas Dreibholz <dreibh@iem.uni-due.de>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  02110-1301 USA.
22 */
23 
24 // Own
25 #include "Session.h"
26 
27 // Standard
28 #include <stdlib.h>
29 #include <signal.h>
30 #include <unistd.h>
31 
32 // Qt
33 #include <QApplication>
34 #include <QtGui/QColor>
35 #include <QtCore/QDir>
36 #include <QtCore/QFile>
37 #include <QtCore/QStringList>
38 #include <QtDBus/QtDBus>
39 
40 // KDE
41 #include <KDebug>
42 #include <KLocalizedString>
43 #include <KNotification>
44 #include <KRun>
45 #include <KShell>
46 #include <KProcess>
47 #include <KStandardDirs>
48 #include <KConfigGroup>
49 
50 // Konsole
51 #include <sessionadaptor.h>
52 
53 #include "ProcessInfo.h"
54 #include "Pty.h"
55 #include "TerminalDisplay.h"
56 #include "ShellCommand.h"
57 #include "Vt102Emulation.h"
58 #include "ZModemDialog.h"
59 #include "History.h"
60 
61 using namespace Konsole;
62 
63 int Session::lastSessionId = 0;
64 
65 // HACK This is copied out of QUuid::createUuid with reseeding forced.
66 // Required because color schemes repeatedly seed the RNG...
67 // ...with a constant.
68 QUuid createUuid()
69 {
70  static const int intbits = sizeof(int) * 8;
71  static int randbits = 0;
72  if (!randbits) {
73  int max = RAND_MAX;
74  do {
75  ++randbits;
76  } while ((max = max >> 1));
77  }
78 
79  qsrand(uint(QDateTime::currentDateTime().toTime_t()));
80  qrand(); // Skip first
81 
82  QUuid result;
83  uint* data = &(result.data1);
84  int chunks = 16 / sizeof(uint);
85  while (chunks--) {
86  uint randNumber = 0;
87  for (int filled = 0; filled < intbits; filled += randbits)
88  randNumber |= qrand() << filled;
89  *(data + chunks) = randNumber;
90  }
91 
92  result.data4[0] = (result.data4[0] & 0x3F) | 0x80; // UV_DCE
93  result.data3 = (result.data3 & 0x0FFF) | 0x4000; // UV_Random
94 
95  return result;
96 }
97 
98 Session::Session(QObject* parent) :
99  QObject(parent)
100  , _shellProcess(0)
101  , _emulation(0)
102  , _monitorActivity(false)
103  , _monitorSilence(false)
104  , _notifiedActivity(false)
105  , _silenceSeconds(10)
106  , _autoClose(true)
107  , _closePerUserRequest(false)
108  , _addToUtmp(true)
109  , _flowControlEnabled(true)
110  , _sessionId(0)
111  , _sessionProcessInfo(0)
112  , _foregroundProcessInfo(0)
113  , _foregroundPid(0)
114  , _zmodemBusy(false)
115  , _zmodemProc(0)
116  , _zmodemProgress(0)
117  , _hasDarkBackground(false)
118 {
119  _uniqueIdentifier = createUuid();
120 
121  //prepare DBus communication
122  new SessionAdaptor(this);
123  _sessionId = ++lastSessionId;
124  QDBusConnection::sessionBus().registerObject(QLatin1String("/Sessions/") + QString::number(_sessionId), this);
125 
126  //create emulation backend
127  _emulation = new Vt102Emulation();
128 
129  connect(_emulation, SIGNAL(titleChanged(int,QString)),
130  this, SLOT(setUserTitle(int,QString)));
131  connect(_emulation, SIGNAL(stateSet(int)),
132  this, SLOT(activityStateSet(int)));
133  connect(_emulation, SIGNAL(zmodemDetected()),
134  this, SLOT(fireZModemDetected()));
135  connect(_emulation, SIGNAL(changeTabTextColorRequest(int)),
136  this, SIGNAL(changeTabTextColorRequest(int)));
137  connect(_emulation, SIGNAL(profileChangeCommandReceived(QString)),
138  this, SIGNAL(profileChangeCommandReceived(QString)));
139  connect(_emulation, SIGNAL(flowControlKeyPressed(bool)),
140  this, SLOT(updateFlowControlState(bool)));
141  connect(_emulation, SIGNAL(primaryScreenInUse(bool)),
142  this, SLOT(onPrimaryScreenInUse(bool)));
143  connect(_emulation, SIGNAL(selectionChanged(QString)),
144  this, SIGNAL(selectionChanged(QString)));
145  connect(_emulation, SIGNAL(imageResizeRequest(QSize)),
146  this, SIGNAL(resizeRequest(QSize)));
147 
148  //create new teletype for I/O with shell process
149  openTeletype(-1);
150 
151  //setup timer for monitoring session activity & silence
152  _silenceTimer = new QTimer(this);
153  _silenceTimer->setSingleShot(true);
154  connect(_silenceTimer, SIGNAL(timeout()), this, SLOT(silenceTimerDone()));
155 
156  _activityTimer = new QTimer(this);
157  _activityTimer->setSingleShot(true);
158  connect(_activityTimer, SIGNAL(timeout()), this, SLOT(activityTimerDone()));
159 }
160 
161 Session::~Session()
162 {
163  delete _foregroundProcessInfo;
164  delete _sessionProcessInfo;
165  delete _emulation;
166  delete _shellProcess;
167  delete _zmodemProc;
168 }
169 
170 void Session::openTeletype(int fd)
171 {
172  if (isRunning()) {
173  kWarning() << "Attempted to open teletype in a running session.";
174  return;
175  }
176 
177  delete _shellProcess;
178 
179  if (fd < 0)
180  _shellProcess = new Pty();
181  else
182  _shellProcess = new Pty(fd);
183 
184  _shellProcess->setUtf8Mode(_emulation->utf8());
185 
186  // connect the I/O between emulator and pty process
187  connect(_shellProcess, SIGNAL(receivedData(const char*,int)),
188  this, SLOT(onReceiveBlock(const char*,int)));
189  connect(_emulation, SIGNAL(sendData(const char*,int)),
190  _shellProcess, SLOT(sendData(const char*,int)));
191 
192  // UTF8 mode
193  connect(_emulation, SIGNAL(useUtf8Request(bool)),
194  _shellProcess, SLOT(setUtf8Mode(bool)));
195 
196  // get notified when the pty process is finished
197  connect(_shellProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
198  this, SLOT(done(int,QProcess::ExitStatus)));
199 
200  // emulator size
201  connect(_emulation, SIGNAL(imageSizeChanged(int,int)),
202  this, SLOT(updateWindowSize(int,int)));
203  connect(_emulation, SIGNAL(imageSizeInitialized()),
204  this, SLOT(run()));
205 }
206 
207 WId Session::windowId() const
208 {
209  // Returns a window ID for this session which is used
210  // to set the WINDOWID environment variable in the shell
211  // process.
212  //
213  // Sessions can have multiple views or no views, which means
214  // that a single ID is not always going to be accurate.
215  //
216  // If there are no views, the window ID is just 0. If
217  // there are multiple views, then the window ID for the
218  // top-level window which contains the first view is
219  // returned
220 
221  if (_views.count() == 0) {
222  return 0;
223  } else {
224  QWidget* window = _views.first();
225 
226  Q_ASSERT(window);
227 
228  while (window->parentWidget() != 0)
229  window = window->parentWidget();
230 
231  return window->winId();
232  }
233 }
234 
235 void Session::setDarkBackground(bool darkBackground)
236 {
237  _hasDarkBackground = darkBackground;
238 }
239 
240 bool Session::isRunning() const
241 {
242  return _shellProcess && (_shellProcess->state() == QProcess::Running);
243 }
244 
245 void Session::setCodec(QTextCodec* codec)
246 {
247  emulation()->setCodec(codec);
248 }
249 
250 bool Session::setCodec(QByteArray name)
251 {
252  QTextCodec* codec = QTextCodec::codecForName(name);
253 
254  if (codec) {
255  setCodec(codec);
256  return true;
257  } else {
258  return false;
259  }
260 }
261 
262 QByteArray Session::codec()
263 {
264  return _emulation->codec()->name();
265 }
266 
267 void Session::setProgram(const QString& program)
268 {
269  _program = ShellCommand::expand(program);
270 }
271 
272 void Session::setArguments(const QStringList& arguments)
273 {
274  _arguments = ShellCommand::expand(arguments);
275 }
276 
277 void Session::setInitialWorkingDirectory(const QString& dir)
278 {
279  _initialWorkingDir = KShell::tildeExpand(ShellCommand::expand(dir));
280 }
281 
282 QString Session::currentWorkingDirectory()
283 {
284  // only returned cached value
285  if (_currentWorkingDir.isEmpty())
286  updateWorkingDirectory();
287 
288  return _currentWorkingDir;
289 }
290 ProcessInfo* Session::updateWorkingDirectory()
291 {
292  ProcessInfo* process = getProcessInfo();
293 
294  const QString currentDir = process->validCurrentDir();
295  if (currentDir != _currentWorkingDir) {
296  _currentWorkingDir = currentDir;
297  emit currentDirectoryChanged(_currentWorkingDir);
298  }
299 
300  return process;
301 }
302 
303 QList<TerminalDisplay*> Session::views() const
304 {
305  return _views;
306 }
307 
308 void Session::addView(TerminalDisplay* widget)
309 {
310  Q_ASSERT(!_views.contains(widget));
311 
312  _views.append(widget);
313 
314  // connect emulation - view signals and slots
315  connect(widget, SIGNAL(keyPressedSignal(QKeyEvent*)),
316  _emulation, SLOT(sendKeyEvent(QKeyEvent*)));
317  connect(widget, SIGNAL(mouseSignal(int,int,int,int)),
318  _emulation, SLOT(sendMouseEvent(int,int,int,int)));
319  connect(widget, SIGNAL(sendStringToEmu(const char*)),
320  _emulation, SLOT(sendString(const char*)));
321 
322  // allow emulation to notify view when the foreground process
323  // indicates whether or not it is interested in mouse signals
324  connect(_emulation, SIGNAL(programUsesMouseChanged(bool)),
325  widget, SLOT(setUsesMouse(bool)));
326 
327  widget->setUsesMouse(_emulation->programUsesMouse());
328 
329  widget->setScreenWindow(_emulation->createWindow());
330 
331  //connect view signals and slots
332  connect(widget, SIGNAL(changedContentSizeSignal(int,int)),
333  this, SLOT(onViewSizeChange(int,int)));
334 
335  connect(widget, SIGNAL(destroyed(QObject*)),
336  this, SLOT(viewDestroyed(QObject*)));
337 }
338 
339 void Session::viewDestroyed(QObject* view)
340 {
341  // the received QObject has already been destroyed, so using
342  // qobject_cast<> does not work here
343  TerminalDisplay* display = static_cast<TerminalDisplay*>(view);
344 
345  Q_ASSERT(_views.contains(display));
346 
347  removeView(display);
348 }
349 
350 void Session::removeView(TerminalDisplay* widget)
351 {
352  _views.removeAll(widget);
353 
354  disconnect(widget, 0, this, 0);
355 
356  // disconnect
357  // - key presses signals from widget
358  // - mouse activity signals from widget
359  // - string sending signals from widget
360  //
361  // ... and any other signals connected in addView()
362  disconnect(widget, 0, _emulation, 0);
363 
364  // disconnect state change signals emitted by emulation
365  disconnect(_emulation, 0, widget, 0);
366 
367  // close the session automatically when the last view is removed
368  if (_views.count() == 0) {
369  close();
370  }
371 }
372 
373 // Upon a KPty error, there is no description on what that error was...
374 // Check to see if the given program is executable.
375 QString Session::checkProgram(const QString& program)
376 {
377  QString exec = program;
378 
379  if (exec.isEmpty())
380  return QString();
381 
382  QFileInfo info(exec);
383  if (info.isAbsolute() && info.exists() && info.isExecutable()) {
384  return exec;
385  }
386 
387  exec = KRun::binaryName(exec, false);
388  exec = KShell::tildeExpand(exec);
389  QString pexec = KStandardDirs::findExe(exec);
390  if (pexec.isEmpty()) {
391  kError() << i18n("Could not find binary: ") << exec;
392  return QString();
393  }
394 
395  return exec;
396 }
397 
398 void Session::terminalWarning(const QString& message)
399 {
400  static const QByteArray warningText = i18nc("@info:shell Alert the user with red color text", "Warning: ").toLocal8Bit();
401  QByteArray messageText = message.toLocal8Bit();
402 
403  static const char redPenOn[] = "\033[1m\033[31m";
404  static const char redPenOff[] = "\033[0m";
405 
406  _emulation->receiveData(redPenOn, qstrlen(redPenOn));
407  _emulation->receiveData("\n\r\n\r", 4);
408  _emulation->receiveData(warningText.constData(), qstrlen(warningText.constData()));
409  _emulation->receiveData(messageText.constData(), qstrlen(messageText.constData()));
410  _emulation->receiveData("\n\r\n\r", 4);
411  _emulation->receiveData(redPenOff, qstrlen(redPenOff));
412 }
413 
414 QString Session::shellSessionId() const
415 {
416  QString friendlyUuid(_uniqueIdentifier.toString());
417  friendlyUuid.remove('-').remove('{').remove('}');
418 
419  return friendlyUuid;
420 }
421 
422 void Session::run()
423 {
424  // extra safeguard for potential bug.
425  if (isRunning()) {
426  kWarning() << "Attempted to re-run an already running session.";
427  return;
428  }
429 
430  //check that everything is in place to run the session
431  if (_program.isEmpty()) {
432  kWarning() << "Program to run not set.";
433  }
434  if (_arguments.isEmpty()) {
435  kWarning() << "No command line arguments specified.";
436  }
437  if (_uniqueIdentifier.isNull()) {
438  _uniqueIdentifier = createUuid();
439  }
440 
441  const int CHOICE_COUNT = 3;
442  // if '_program' is empty , fall back to default shell. If that is not set
443  // then fall back to /bin/sh
444 #ifndef _WIN32
445  QString programs[CHOICE_COUNT] = {_program, qgetenv("SHELL"), "/bin/sh"};
446 #else
447  // on windows, fall back to %COMSPEC% or to cmd.exe
448  QString programs[CHOICE_COUNT] = {_program, qgetenv("COMSPEC"), "cmd.exe"};
449 #endif
450  QString exec;
451  int choice = 0;
452  while (choice < CHOICE_COUNT) {
453  exec = checkProgram(programs[choice]);
454  if (exec.isEmpty())
455  choice++;
456  else
457  break;
458  }
459 
460  // if a program was specified via setProgram(), but it couldn't be found, print a warning
461  if (choice != 0 && choice < CHOICE_COUNT && !_program.isEmpty()) {
462  terminalWarning(i18n("Could not find '%1', starting '%2' instead. Please check your profile settings.", _program, exec));
463  // if none of the choices are available, print a warning
464  } else if (choice == CHOICE_COUNT) {
465  terminalWarning(i18n("Could not find an interactive shell to start."));
466  return;
467  }
468 
469  // if no arguments are specified, fall back to program name
470  QStringList arguments = _arguments.join(QChar(' ')).isEmpty() ?
471  QStringList() << exec :
472  _arguments;
473 
474  if (!_initialWorkingDir.isEmpty()) {
475  _shellProcess->setInitialWorkingDirectory(_initialWorkingDir);
476  } else {
477  _shellProcess->setInitialWorkingDirectory(QDir::currentPath());
478  }
479 
480  _shellProcess->setFlowControlEnabled(_flowControlEnabled);
481  _shellProcess->setEraseChar(_emulation->eraseChar());
482  _shellProcess->setUseUtmp(_addToUtmp);
483 
484  // this is not strictly accurate use of the COLORFGBG variable. This does not
485  // tell the terminal exactly which colors are being used, but instead approximates
486  // the color scheme as "black on white" or "white on black" depending on whether
487  // the background color is deemed dark or not
488  const QString backgroundColorHint = _hasDarkBackground ? "COLORFGBG=15;0" : "COLORFGBG=0;15";
489  addEnvironmentEntry(backgroundColorHint);
490 
491  addEnvironmentEntry(QString("SHELL_SESSION_ID=%1").arg(shellSessionId()));
492 
493  addEnvironmentEntry(QString("WINDOWID=%1").arg(QString::number(windowId())));
494 
495  const QString dbusService = QDBusConnection::sessionBus().baseService();
496  addEnvironmentEntry(QString("KONSOLE_DBUS_SERVICE=%1").arg(dbusService));
497 
498  const QString dbusObject = QString("/Sessions/%1").arg(QString::number(_sessionId));
499  addEnvironmentEntry(QString("KONSOLE_DBUS_SESSION=%1").arg(dbusObject));
500 
501  int result = _shellProcess->start(exec, arguments, _environment);
502  if (result < 0) {
503  terminalWarning(i18n("Could not start program '%1' with arguments '%2'.", exec, arguments.join(" ")));
504  return;
505  }
506 
507  _shellProcess->setWriteable(false); // We are reachable via kwrited.
508 
509  emit started();
510 }
511 
512 void Session::setUserTitle(int what, const QString& caption)
513 {
514  //set to true if anything is actually changed (eg. old _nameTitle != new _nameTitle )
515  bool modified = false;
516 
517  if ((what == IconNameAndWindowTitle) || (what == WindowTitle)) {
518  if (_userTitle != caption) {
519  _userTitle = caption;
520  modified = true;
521  }
522  }
523 
524  if ((what == IconNameAndWindowTitle) || (what == IconName)) {
525  if (_iconText != caption) {
526  _iconText = caption;
527  modified = true;
528  }
529  }
530 
531  if (what == TextColor || what == BackgroundColor) {
532  QString colorString = caption.section(';', 0, 0);
533  QColor color = QColor(colorString);
534  if (color.isValid()) {
535  if (what == TextColor)
536  emit changeForegroundColorRequest(color);
537  else
538  emit changeBackgroundColorRequest(color);
539  }
540  }
541 
542  if (what == SessionName) {
543  if (_localTabTitleFormat != caption) {
544  _localTabTitleFormat = caption;
545  setTitle(Session::DisplayedTitleRole, caption);
546  modified = true;
547  }
548  }
549 
550  /* I don't believe this has ever worked in KDE 4.x
551  if (what == 31) {
552  QString cwd = caption;
553  cwd = cwd.replace(QRegExp("^~"), QDir::homePath());
554  emit openUrlRequest(cwd);
555  }*/
556 
557  /* The below use of 32 works but appears to non-standard.
558  It is from a commit from 2004 c20973eca8776f9b4f15bee5fdcb5a3205aa69de
559  */
560  // change icon via \033]32;Icon\007
561  if (what == SessionIcon) {
562  if (_iconName != caption) {
563  _iconName = caption;
564 
565  modified = true;
566  }
567  }
568 
569  if (what == ProfileChange) {
570  emit profileChangeCommandReceived(caption);
571  return;
572  }
573 
574  if (modified)
575  emit titleChanged();
576 }
577 
578 QString Session::userTitle() const
579 {
580  return _userTitle;
581 }
582 void Session::setTabTitleFormat(TabTitleContext context , const QString& format)
583 {
584  if (context == LocalTabTitle)
585  _localTabTitleFormat = format;
586  else if (context == RemoteTabTitle)
587  _remoteTabTitleFormat = format;
588 }
589 QString Session::tabTitleFormat(TabTitleContext context) const
590 {
591  if (context == LocalTabTitle)
592  return _localTabTitleFormat;
593  else if (context == RemoteTabTitle)
594  return _remoteTabTitleFormat;
595 
596  return QString();
597 }
598 
599 void Session::silenceTimerDone()
600 {
601  //FIXME: The idea here is that the notification popup will appear to tell the user than output from
602  //the terminal has stopped and the popup will disappear when the user activates the session.
603  //
604  //This breaks with the addition of multiple views of a session. The popup should disappear
605  //when any of the views of the session becomes active
606 
607  //FIXME: Make message text for this notification and the activity notification more descriptive.
608  if (_monitorSilence) {
609  KNotification::event("Silence", i18n("Silence in session '%1'", _nameTitle), QPixmap(),
610  QApplication::activeWindow(),
611  KNotification::CloseWhenWidgetActivated);
612  emit stateChanged(NOTIFYSILENCE);
613  } else {
614  emit stateChanged(NOTIFYNORMAL);
615  }
616 }
617 
618 void Session::activityTimerDone()
619 {
620  _notifiedActivity = false;
621 }
622 
623 void Session::updateFlowControlState(bool suspended)
624 {
625  if (suspended) {
626  if (flowControlEnabled()) {
627  foreach(TerminalDisplay * display, _views) {
628  if (display->flowControlWarningEnabled())
629  display->outputSuspended(true);
630  }
631  }
632  } else {
633  foreach(TerminalDisplay * display, _views) {
634  display->outputSuspended(false);
635  }
636  }
637 }
638 
639 void Session::onPrimaryScreenInUse(bool use)
640 {
641  emit primaryScreenInUse(use);
642 }
643 
644 void Session::activityStateSet(int state)
645 {
646  // TODO: should this hardcoded interval be user configurable?
647  const int activityMaskInSeconds = 15;
648 
649  if (state == NOTIFYBELL) {
650  emit bellRequest(i18n("Bell in session '%1'", _nameTitle));
651  } else if (state == NOTIFYACTIVITY) {
652  if (_monitorActivity && !_notifiedActivity) {
653  KNotification::event("Activity", i18n("Activity in session '%1'", _nameTitle), QPixmap(),
654  QApplication::activeWindow(),
655  KNotification::CloseWhenWidgetActivated);
656 
657  // mask activity notification for a while to avoid flooding
658  _notifiedActivity = true;
659  _activityTimer->start(activityMaskInSeconds * 1000);
660  }
661 
662  // reset the counter for monitoring continuous silence since there is activity
663  if (_monitorSilence) {
664  _silenceTimer->start(_silenceSeconds * 1000);
665  }
666  }
667 
668  if (state == NOTIFYACTIVITY && !_monitorActivity)
669  state = NOTIFYNORMAL;
670  if (state == NOTIFYSILENCE && !_monitorSilence)
671  state = NOTIFYNORMAL;
672 
673  emit stateChanged(state);
674 }
675 
676 void Session::onViewSizeChange(int /*height*/, int /*width*/)
677 {
678  updateTerminalSize();
679 }
680 
681 void Session::updateTerminalSize()
682 {
683  int minLines = -1;
684  int minColumns = -1;
685 
686  // minimum number of lines and columns that views require for
687  // their size to be taken into consideration ( to avoid problems
688  // with new view widgets which haven't yet been set to their correct size )
689  const int VIEW_LINES_THRESHOLD = 2;
690  const int VIEW_COLUMNS_THRESHOLD = 2;
691 
692  //select largest number of lines and columns that will fit in all visible views
693  foreach(TerminalDisplay* view, _views) {
694  if (view->isHidden() == false &&
695  view->lines() >= VIEW_LINES_THRESHOLD &&
696  view->columns() >= VIEW_COLUMNS_THRESHOLD) {
697  minLines = (minLines == -1) ? view->lines() : qMin(minLines , view->lines());
698  minColumns = (minColumns == -1) ? view->columns() : qMin(minColumns , view->columns());
699  view->processFilters();
700  }
701  }
702 
703  // backend emulation must have a _terminal of at least 1 column x 1 line in size
704  if (minLines > 0 && minColumns > 0) {
705  _emulation->setImageSize(minLines , minColumns);
706  }
707 }
708 void Session::updateWindowSize(int lines, int columns)
709 {
710  Q_ASSERT(lines > 0 && columns > 0);
711  _shellProcess->setWindowSize(columns, lines);
712 }
713 void Session::refresh()
714 {
715  // attempt to get the shell process to redraw the display
716  //
717  // this requires the program running in the shell
718  // to cooperate by sending an update in response to
719  // a window size change
720  //
721  // the window size is changed twice, first made slightly larger and then
722  // resized back to its normal size so that there is actually a change
723  // in the window size (some shells do nothing if the
724  // new and old sizes are the same)
725  //
726  // if there is a more 'correct' way to do this, please
727  // send an email with method or patches to konsole-devel@kde.org
728 
729  const QSize existingSize = _shellProcess->windowSize();
730  _shellProcess->setWindowSize(existingSize.width() + 1, existingSize.height());
731  usleep(500); // introduce small delay to avoid changing size too quickly
732  _shellProcess->setWindowSize(existingSize.width(), existingSize.height());
733 }
734 
735 void Session::sendSignal(int signal)
736 {
737  const ProcessInfo* process = getProcessInfo();
738  bool ok = false;
739  int pid;
740  pid = process->foregroundPid(&ok);
741 
742  if (ok) {
743  ::kill(pid, signal);
744  }
745 }
746 
747 bool Session::kill(int signal)
748 {
749  if (_shellProcess->pid() <= 0)
750  return false;
751 
752  int result = ::kill(_shellProcess->pid(), signal);
753 
754  if (result == 0) {
755  if (_shellProcess->waitForFinished(1000))
756  return true;
757  else
758  return false;
759  } else {
760  return false;
761  }
762 }
763 
764 void Session::close()
765 {
766  if (isRunning()) {
767  if (!closeInNormalWay())
768  closeInForceWay();
769  } else {
770  // terminal process has finished, just close the session
771  QTimer::singleShot(1, this, SIGNAL(finished()));
772  }
773 }
774 
775 bool Session::closeInNormalWay()
776 {
777  _autoClose = true;
778  _closePerUserRequest = true;
779 
780  // for the possible case where following events happen in sequence:
781  //
782  // 1). the terminal process crashes
783  // 2). the tab stays open and displays warning message
784  // 3). the user closes the tab explicitly
785  //
786  if (!isRunning()) {
787  emit finished();
788  return true;
789  }
790 
791  if (kill(SIGHUP)) {
792  return true;
793  } else {
794  kWarning() << "Process " << _shellProcess->pid() << " did not die with SIGHUP";
795  _shellProcess->closePty();
796  return (_shellProcess->waitForFinished(1000));
797  }
798 }
799 
800 bool Session::closeInForceWay()
801 {
802  _autoClose = true;
803  _closePerUserRequest = true;
804 
805  if (kill(SIGKILL)) {
806  return true;
807  } else {
808  kWarning() << "Process " << _shellProcess->pid() << " did not die with SIGKILL";
809  return false;
810  }
811 }
812 
813 void Session::sendText(const QString& text) const
814 {
815  _emulation->sendText(text);
816 }
817 
818 void Session::runCommand(const QString& command) const
819 {
820  _emulation->sendText(command + '\n');
821 }
822 
823 void Session::sendMouseEvent(int buttons, int column, int line, int eventType)
824 {
825  _emulation->sendMouseEvent(buttons, column, line, eventType);
826 }
827 
828 void Session::done(int exitCode, QProcess::ExitStatus exitStatus)
829 {
830  // This slot should be triggered only one time
831  disconnect(_shellProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
832  this, SLOT(done(int,QProcess::ExitStatus)));
833 
834  if (!_autoClose) {
835  _userTitle = i18nc("@info:shell This session is done", "Finished");
836  emit titleChanged();
837  return;
838  }
839 
840  if (_closePerUserRequest) {
841  emit finished();
842  return;
843  }
844 
845  QString message;
846 
847  if (exitCode != 0) {
848  if (exitStatus != QProcess::NormalExit)
849  message = i18n("Program '%1' crashed.", _program);
850  else
851  message = i18n("Program '%1' exited with status %2.", _program, exitCode);
852 
853  //FIXME: See comments in Session::silenceTimerDone()
854  KNotification::event("Finished", message , QPixmap(),
855  QApplication::activeWindow(),
856  KNotification::CloseWhenWidgetActivated);
857  }
858 
859  if (exitStatus != QProcess::NormalExit) {
860  // this seeming duplicated line is for the case when exitCode is 0
861  message = i18n("Program '%1' crashed.", _program);
862  terminalWarning(message);
863  } else {
864  emit finished();
865  }
866 }
867 
868 Emulation* Session::emulation() const
869 {
870  return _emulation;
871 }
872 
873 QString Session::keyBindings() const
874 {
875  return _emulation->keyBindings();
876 }
877 
878 QStringList Session::environment() const
879 {
880  return _environment;
881 }
882 
883 void Session::setEnvironment(const QStringList& environment)
884 {
885  _environment = environment;
886 }
887 
888 void Session::addEnvironmentEntry(const QString& entry)
889 {
890  _environment << entry;
891 }
892 
893 int Session::sessionId() const
894 {
895  return _sessionId;
896 }
897 
898 void Session::setKeyBindings(const QString& name)
899 {
900  _emulation->setKeyBindings(name);
901 }
902 
903 void Session::setTitle(TitleRole role , const QString& newTitle)
904 {
905  if (title(role) != newTitle) {
906  if (role == NameRole)
907  _nameTitle = newTitle;
908  else if (role == DisplayedTitleRole)
909  _displayTitle = newTitle;
910 
911  emit titleChanged();
912  }
913 }
914 
915 QString Session::title(TitleRole role) const
916 {
917  if (role == NameRole)
918  return _nameTitle;
919  else if (role == DisplayedTitleRole)
920  return _displayTitle;
921  else
922  return QString();
923 }
924 
925 ProcessInfo* Session::getProcessInfo()
926 {
927  ProcessInfo* process = 0;
928 
929  if (isForegroundProcessActive()) {
930  process = _foregroundProcessInfo;
931  } else {
932  updateSessionProcessInfo();
933  process = _sessionProcessInfo;
934  }
935 
936  return process;
937 }
938 
939 void Session::updateSessionProcessInfo()
940 {
941  Q_ASSERT(_shellProcess);
942 
943  bool ok;
944  // The checking for pid changing looks stupid, but it is needed
945  // at the moment to workaround the problem that processId() might
946  // return 0
947  if (!_sessionProcessInfo ||
948  (processId() != 0 && processId() != _sessionProcessInfo->pid(&ok))) {
949  delete _sessionProcessInfo;
950  _sessionProcessInfo = ProcessInfo::newInstance(processId());
951  _sessionProcessInfo->setUserHomeDir();
952  }
953  _sessionProcessInfo->update();
954 }
955 
956 bool Session::updateForegroundProcessInfo()
957 {
958  Q_ASSERT(_shellProcess);
959 
960  const int foregroundPid = _shellProcess->foregroundProcessGroup();
961  if (foregroundPid != _foregroundPid) {
962  delete _foregroundProcessInfo;
963  _foregroundProcessInfo = ProcessInfo::newInstance(foregroundPid);
964  _foregroundPid = foregroundPid;
965  }
966 
967  if (_foregroundProcessInfo) {
968  _foregroundProcessInfo->update();
969  return _foregroundProcessInfo->isValid();
970  } else {
971  return false;
972  }
973 }
974 
975 bool Session::isRemote()
976 {
977  ProcessInfo* process = getProcessInfo();
978 
979  bool ok = false;
980  return (process->name(&ok) == "ssh" && ok);
981 }
982 
983 QString Session::getDynamicTitle()
984 {
985  // update current directory from process
986  ProcessInfo* process = updateWorkingDirectory();
987 
988  // format tab titles using process info
989  bool ok = false;
990  QString title;
991  if (process->name(&ok) == "ssh" && ok) {
992  SSHProcessInfo sshInfo(*process);
993  title = sshInfo.format(tabTitleFormat(Session::RemoteTabTitle));
994  } else {
995  title = process->format(tabTitleFormat(Session::LocalTabTitle));
996  }
997 
998  return title;
999 }
1000 
1001 KUrl Session::getUrl()
1002 {
1003  QString path;
1004 
1005  updateSessionProcessInfo();
1006  if (_sessionProcessInfo->isValid()) {
1007  bool ok = false;
1008 
1009  // check if foreground process is bookmark-able
1010  if (isForegroundProcessActive()) {
1011  // for remote connections, save the user and host
1012  // bright ideas to get the directory at the other end are welcome :)
1013  if (_foregroundProcessInfo->name(&ok) == "ssh" && ok) {
1014  SSHProcessInfo sshInfo(*_foregroundProcessInfo);
1015 
1016  path = "ssh://" + sshInfo.userName() + '@' + sshInfo.host();
1017 
1018  QString port = sshInfo.port();
1019  if (!port.isEmpty() && port != "22") {
1020  path.append(':' + port);
1021  }
1022  } else {
1023  path = _foregroundProcessInfo->currentDir(&ok);
1024  if (!ok)
1025  path.clear();
1026  }
1027  } else { // otherwise use the current working directory of the shell process
1028  path = _sessionProcessInfo->currentDir(&ok);
1029  if (!ok)
1030  path.clear();
1031  }
1032  }
1033 
1034  return KUrl(path);
1035 }
1036 
1037 void Session::setIconName(const QString& iconName)
1038 {
1039  if (iconName != _iconName) {
1040  _iconName = iconName;
1041  emit titleChanged();
1042  }
1043 }
1044 
1045 void Session::setIconText(const QString& iconText)
1046 {
1047  _iconText = iconText;
1048 }
1049 
1050 QString Session::iconName() const
1051 {
1052  return _iconName;
1053 }
1054 
1055 QString Session::iconText() const
1056 {
1057  return _iconText;
1058 }
1059 
1060 void Session::setHistoryType(const HistoryType& hType)
1061 {
1062  _emulation->setHistory(hType);
1063 }
1064 
1065 const HistoryType& Session::historyType() const
1066 {
1067  return _emulation->history();
1068 }
1069 
1070 void Session::clearHistory()
1071 {
1072  _emulation->clearHistory();
1073 }
1074 
1075 QStringList Session::arguments() const
1076 {
1077  return _arguments;
1078 }
1079 
1080 QString Session::program() const
1081 {
1082  return _program;
1083 }
1084 
1085 bool Session::isMonitorActivity() const
1086 {
1087  return _monitorActivity;
1088 }
1089 bool Session::isMonitorSilence() const
1090 {
1091  return _monitorSilence;
1092 }
1093 
1094 void Session::setMonitorActivity(bool monitor)
1095 {
1096  if (_monitorActivity == monitor)
1097  return;
1098 
1099  _monitorActivity = monitor;
1100  _notifiedActivity = false;
1101 
1102  // This timer is meaningful only after activity has been notified
1103  _activityTimer->stop();
1104 
1105  activityStateSet(NOTIFYNORMAL);
1106 }
1107 
1108 void Session::setMonitorSilence(bool monitor)
1109 {
1110  if (_monitorSilence == monitor)
1111  return;
1112 
1113  _monitorSilence = monitor;
1114  if (_monitorSilence) {
1115  _silenceTimer->start(_silenceSeconds * 1000);
1116  } else {
1117  _silenceTimer->stop();
1118  }
1119 
1120  activityStateSet(NOTIFYNORMAL);
1121 }
1122 
1123 void Session::setMonitorSilenceSeconds(int seconds)
1124 {
1125  _silenceSeconds = seconds;
1126  if (_monitorSilence) {
1127  _silenceTimer->start(_silenceSeconds * 1000);
1128  }
1129 }
1130 
1131 void Session::setAddToUtmp(bool add)
1132 {
1133  _addToUtmp = add;
1134 }
1135 
1136 void Session::setAutoClose(bool close)
1137 {
1138  _autoClose = close;
1139 }
1140 
1141 bool Session::autoClose() const
1142 {
1143  return _autoClose;
1144 }
1145 
1146 void Session::setFlowControlEnabled(bool enabled)
1147 {
1148  _flowControlEnabled = enabled;
1149 
1150  if (_shellProcess)
1151  _shellProcess->setFlowControlEnabled(_flowControlEnabled);
1152 
1153  emit flowControlEnabledChanged(enabled);
1154 }
1155 bool Session::flowControlEnabled() const
1156 {
1157  if (_shellProcess)
1158  return _shellProcess->flowControlEnabled();
1159  else
1160  return _flowControlEnabled;
1161 }
1162 void Session::fireZModemDetected()
1163 {
1164  if (!_zmodemBusy) {
1165  QTimer::singleShot(10, this, SIGNAL(zmodemDetected()));
1166  _zmodemBusy = true;
1167  }
1168 }
1169 
1170 void Session::cancelZModem()
1171 {
1172  _shellProcess->sendData("\030\030\030\030", 4); // Abort
1173  _zmodemBusy = false;
1174 }
1175 
1176 void Session::startZModem(const QString& zmodem, const QString& dir, const QStringList& list)
1177 {
1178  _zmodemBusy = true;
1179  _zmodemProc = new KProcess();
1180  _zmodemProc->setOutputChannelMode(KProcess::SeparateChannels);
1181 
1182  *_zmodemProc << zmodem << "-v" << list;
1183 
1184  if (!dir.isEmpty())
1185  _zmodemProc->setWorkingDirectory(dir);
1186 
1187  connect(_zmodemProc, SIGNAL(readyReadStandardOutput()),
1188  this, SLOT(zmodemReadAndSendBlock()));
1189  connect(_zmodemProc, SIGNAL(readyReadStandardError()),
1190  this, SLOT(zmodemReadStatus()));
1191  connect(_zmodemProc, SIGNAL(finished(int,QProcess::ExitStatus)),
1192  this, SLOT(zmodemFinished()));
1193 
1194  _zmodemProc->start();
1195 
1196  disconnect(_shellProcess, SIGNAL(receivedData(const char*,int)),
1197  this, SLOT(onReceiveBlock(const char*,int)));
1198  connect(_shellProcess, SIGNAL(receivedData(const char*,int)),
1199  this, SLOT(zmodemReceiveBlock(const char*,int)));
1200 
1201  _zmodemProgress = new ZModemDialog(QApplication::activeWindow(), false,
1202  i18n("ZModem Progress"));
1203 
1204  connect(_zmodemProgress, SIGNAL(user1Clicked()),
1205  this, SLOT(zmodemFinished()));
1206 
1207  _zmodemProgress->show();
1208 }
1209 
1210 void Session::zmodemReadAndSendBlock()
1211 {
1212  _zmodemProc->setReadChannel(QProcess::StandardOutput);
1213  QByteArray data = _zmodemProc->readAll();
1214 
1215  if (data.count() == 0)
1216  return;
1217 
1218  _shellProcess->sendData(data.constData(), data.count());
1219 }
1220 
1221 void Session::zmodemReadStatus()
1222 {
1223  _zmodemProc->setReadChannel(QProcess::StandardError);
1224  QByteArray msg = _zmodemProc->readAll();
1225  while (!msg.isEmpty()) {
1226  int i = msg.indexOf('\015');
1227  int j = msg.indexOf('\012');
1228  QByteArray txt;
1229  if ((i != -1) && ((j == -1) || (i < j))) {
1230  msg = msg.mid(i + 1);
1231  } else if (j != -1) {
1232  txt = msg.left(j);
1233  msg = msg.mid(j + 1);
1234  } else {
1235  txt = msg;
1236  msg.truncate(0);
1237  }
1238  if (!txt.isEmpty())
1239  _zmodemProgress->addProgressText(QString::fromLocal8Bit(txt));
1240  }
1241 }
1242 
1243 void Session::zmodemReceiveBlock(const char* data, int len)
1244 {
1245  QByteArray bytes(data, len);
1246 
1247  _zmodemProc->write(bytes);
1248 }
1249 
1250 void Session::zmodemFinished()
1251 {
1252  /* zmodemFinished() is called by QProcess's finished() and
1253  ZModemDialog's user1Clicked(). Therefore, an invocation by
1254  user1Clicked() will recursively invoke this function again
1255  when the KProcess is deleted! */
1256  if (_zmodemProc) {
1257  KProcess* process = _zmodemProc;
1258  _zmodemProc = 0; // Set _zmodemProc to 0 avoid recursive invocations!
1259  _zmodemBusy = false;
1260  delete process; // Now, the KProcess may be disposed safely.
1261 
1262  disconnect(_shellProcess, SIGNAL(receivedData(const char*,int)),
1263  this , SLOT(zmodemReceiveBlock(const char*,int)));
1264  connect(_shellProcess, SIGNAL(receivedData(const char*,int)),
1265  this, SLOT(onReceiveBlock(const char*,int)));
1266 
1267  _shellProcess->sendData("\030\030\030\030", 4); // Abort
1268  _shellProcess->sendData("\001\013\n", 3); // Try to get prompt back
1269  _zmodemProgress->transferDone();
1270  }
1271 }
1272 
1273 void Session::onReceiveBlock(const char* buf, int len)
1274 {
1275  _emulation->receiveData(buf, len);
1276 }
1277 
1278 QSize Session::size()
1279 {
1280  return _emulation->imageSize();
1281 }
1282 
1283 void Session::setSize(const QSize& size)
1284 {
1285  if ((size.width() <= 1) || (size.height() <= 1))
1286  return;
1287 
1288  emit resizeRequest(size);
1289 }
1290 
1291 QSize Session::preferredSize() const
1292 {
1293  return _preferredSize;
1294 }
1295 
1296 void Session::setPreferredSize(const QSize& size)
1297 {
1298  _preferredSize = size;
1299 }
1300 
1301 int Session::processId() const
1302 {
1303  return _shellProcess->pid();
1304 }
1305 
1306 void Session::setTitle(int role , const QString& title)
1307 {
1308  switch (role) {
1309  case 0:
1310  this->setTitle(Session::NameRole, title);
1311  break;
1312  case 1:
1313  this->setTitle(Session::DisplayedTitleRole, title);
1314 
1315  // without these, that title will be overridden by the expansion of
1316  // title format shortly after, which will confuses users.
1317  _localTabTitleFormat = title;
1318  _remoteTabTitleFormat = title;
1319 
1320  break;
1321  }
1322 }
1323 
1324 QString Session::title(int role) const
1325 {
1326  switch (role) {
1327  case 0:
1328  return this->title(Session::NameRole);
1329  case 1:
1330  return this->title(Session::DisplayedTitleRole);
1331  default:
1332  return QString();
1333  }
1334 }
1335 
1336 void Session::setTabTitleFormat(int context , const QString& format)
1337 {
1338  switch (context) {
1339  case 0:
1340  this->setTabTitleFormat(Session::LocalTabTitle, format);
1341  break;
1342  case 1:
1343  this->setTabTitleFormat(Session::RemoteTabTitle, format);
1344  break;
1345  }
1346 }
1347 
1348 QString Session::tabTitleFormat(int context) const
1349 {
1350  switch (context) {
1351  case 0:
1352  return this->tabTitleFormat(Session::LocalTabTitle);
1353  case 1:
1354  return this->tabTitleFormat(Session::RemoteTabTitle);
1355  default:
1356  return QString();
1357  }
1358 }
1359 
1360 void Session::setHistorySize(int lines)
1361 {
1362  if (lines < 0) {
1363  setHistoryType(HistoryTypeFile());
1364  } else if (lines == 0) {
1365  setHistoryType(HistoryTypeNone());
1366  } else {
1367  setHistoryType(CompactHistoryType(lines));
1368  }
1369 }
1370 
1371 int Session::historySize() const
1372 {
1373  const HistoryType& currentHistory = historyType();
1374 
1375  if (currentHistory.isEnabled()) {
1376  if (currentHistory.isUnlimited()) {
1377  return -1;
1378  } else {
1379  return currentHistory.maximumLineCount();
1380  }
1381  } else {
1382  return 0;
1383  }
1384 }
1385 
1386 int Session::foregroundProcessId()
1387 {
1388  int pid;
1389 
1390  bool ok = false;
1391  pid = getProcessInfo()->pid(&ok);
1392  if (!ok)
1393  pid = -1;
1394 
1395  return pid;
1396 }
1397 
1398 bool Session::isForegroundProcessActive()
1399 {
1400  // foreground process info is always updated after this
1401  return updateForegroundProcessInfo() && (processId() != _foregroundPid);
1402 }
1403 
1404 QString Session::foregroundProcessName()
1405 {
1406  QString name;
1407 
1408  if (updateForegroundProcessInfo()) {
1409  bool ok = false;
1410  name = _foregroundProcessInfo->name(&ok);
1411  if (!ok)
1412  name.clear();
1413  }
1414 
1415  return name;
1416 }
1417 
1418 void Session::saveSession(KConfigGroup& group)
1419 {
1420  group.writePathEntry("WorkingDir", currentWorkingDirectory());
1421  group.writeEntry("LocalTab", tabTitleFormat(LocalTabTitle));
1422  group.writeEntry("RemoteTab", tabTitleFormat(RemoteTabTitle));
1423  group.writeEntry("SessionGuid", _uniqueIdentifier.toString());
1424  group.writeEntry("Encoding", QString(codec()));
1425 }
1426 
1427 void Session::restoreSession(KConfigGroup& group)
1428 {
1429  QString value;
1430 
1431  value = group.readPathEntry("WorkingDir", QString());
1432  if (!value.isEmpty()) setInitialWorkingDirectory(value);
1433  value = group.readEntry("LocalTab");
1434  if (!value.isEmpty()) setTabTitleFormat(LocalTabTitle, value);
1435  value = group.readEntry("RemoteTab");
1436  if (!value.isEmpty()) setTabTitleFormat(RemoteTabTitle, value);
1437  value = group.readEntry("SessionGuid");
1438  if (!value.isEmpty()) _uniqueIdentifier = QUuid(value);
1439  value = group.readEntry("Encoding");
1440  if (!value.isEmpty()) setCodec(value.toUtf8());
1441 }
1442 
1443 SessionGroup::SessionGroup(QObject* parent)
1444  : QObject(parent), _masterMode(0)
1445 {
1446 }
1447 SessionGroup::~SessionGroup()
1448 {
1449 }
1450 int SessionGroup::masterMode() const
1451 {
1452  return _masterMode;
1453 }
1454 QList<Session*> SessionGroup::sessions() const
1455 {
1456  return _sessions.keys();
1457 }
1458 bool SessionGroup::masterStatus(Session* session) const
1459 {
1460  return _sessions[session];
1461 }
1462 
1463 void SessionGroup::addSession(Session* session)
1464 {
1465  connect(session, SIGNAL(finished()), this, SLOT(sessionFinished()));
1466  _sessions.insert(session, false);
1467 }
1468 void SessionGroup::removeSession(Session* session)
1469 {
1470  disconnect(session, SIGNAL(finished()), this, SLOT(sessionFinished()));
1471  setMasterStatus(session, false);
1472  _sessions.remove(session);
1473 }
1474 void SessionGroup::sessionFinished()
1475 {
1476  Session* session = qobject_cast<Session*>(sender());
1477  Q_ASSERT(session);
1478  removeSession(session);
1479 }
1480 void SessionGroup::setMasterMode(int mode)
1481 {
1482  _masterMode = mode;
1483 }
1484 QList<Session*> SessionGroup::masters() const
1485 {
1486  return _sessions.keys(true);
1487 }
1488 void SessionGroup::setMasterStatus(Session* session , bool master)
1489 {
1490  const bool wasMaster = _sessions[session];
1491 
1492  if (wasMaster == master) {
1493  // No status change -> nothing to do.
1494  return;
1495  }
1496  _sessions[session] = master;
1497 
1498  if (master) {
1499  connect(session->emulation(), SIGNAL(sendData(const char*,int)),
1500  this, SLOT(forwardData(const char*,int)));
1501  } else {
1502  disconnect(session->emulation(), SIGNAL(sendData(const char*,int)),
1503  this, SLOT(forwardData(const char*,int)));
1504  }
1505 }
1506 void SessionGroup::forwardData(const char* data, int size)
1507 {
1508  static bool _inForwardData = false;
1509  if (_inForwardData) { // Avoid recursive calls among session groups!
1510  // A recursive call happens when a master in group A calls forwardData()
1511  // in group B. If one of the destination sessions in group B is also a
1512  // master of a group including the master session of group A, this would
1513  // again call forwardData() in group A, and so on.
1514  return;
1515  }
1516 
1517  _inForwardData = true;
1518  foreach(Session* other, _sessions.keys()) {
1519  if (!_sessions[other]) {
1520  other->emulation()->sendString(data, size);
1521  }
1522  }
1523  _inForwardData = false;
1524 }
1525 
1526 #include "Session.moc"
1527 
Session.h
Konsole::NOTIFYSILENCE
Definition: Emulation.h:65
Konsole::Session::run
void run()
Starts the terminal session.
Definition: Session.cpp:422
Konsole::Session::keyBindings
QString keyBindings() const
Returns the name of the key bindings used by this session.
Konsole::Emulation::setHistory
void setHistory(const HistoryType &)
Sets the history store used by this emulation.
Definition: Emulation.cpp:125
Konsole::Session::startZModem
void startZModem(const QString &rz, const QString &dir, const QStringList &list)
Definition: Session.cpp:1176
Konsole::Session::setMonitorActivity
Q_SCRIPTABLE void setMonitorActivity(bool)
Enables monitoring for activity in the session.
Definition: Session.cpp:1094
Konsole::Session::WindowTitle
Definition: Session.h:344
Konsole::Session
Represents a terminal session consisting of a pseudo-teletype and a terminal emulation.
Definition: Session.h:67
Konsole::Session::restoreSession
void restoreSession(KConfigGroup &group)
Definition: Session.cpp:1427
Konsole::Session::foregroundProcessId
Q_SCRIPTABLE int foregroundProcessId()
Returns the process id of the terminal's foreground process.
Definition: Session.cpp:1386
Konsole::Pty::sendData
void sendData(const char *buffer, int length)
Sends data to the process currently controlling the teletype ( whose id is returned by foregroundProc...
Definition: Pty.cpp:74
Konsole::Session::setEnvironment
Q_SCRIPTABLE void setEnvironment(const QStringList &environment)
Sets the environment for this session.
Definition: Session.cpp:883
Konsole::Pty::foregroundProcessGroup
int foregroundProcessGroup() const
Returns the process id of the teletype's current foreground process.
Definition: Pty.cpp:276
Konsole::Session::currentDirectoryChanged
void currentDirectoryChanged(const QString &dir)
Emitted when the current working directory of this session changes.
Konsole::HistoryType::isEnabled
virtual bool isEnabled() const =0
Returns true if the history is enabled ( can store lines of output ) or false otherwise.
Konsole::Session::size
QSize size()
Returns the terminal session's window size in lines and columns.
Konsole::Session::setAddToUtmp
void setAddToUtmp(bool)
Specifies whether a utmp entry should be created for the pty used by this session.
Definition: Session.cpp:1131
Konsole::Emulation::setImageSize
virtual void setImageSize(int lines, int columns)
Change the size of the emulation's image.
Definition: Emulation.cpp:326
Konsole::Session::shellSessionId
Q_SCRIPTABLE QString shellSessionId() const
Returns the "friendly" version of the QUuid of this session.
Definition: Session.cpp:414
Konsole::ShellCommand::expand
static QString expand(const QString &text)
Expands environment variables in text .
Definition: ShellCommand.cpp:74
Konsole::Session::sendMouseEvent
Q_SCRIPTABLE void sendMouseEvent(int buttons, int column, int line, int eventType)
Sends a mouse event of type eventType emitted by button buttons on column/line to the current foregro...
Definition: Session.cpp:823
Konsole::Session::processId
Q_SCRIPTABLE int processId() const
Returns the process id of the terminal process.
Konsole::Pty::start
int start(const QString &program, const QStringList &arguments, const QStringList &environment)
Starts the terminal process.
Definition: Pty.cpp:225
Konsole::Session::historySize
Q_SCRIPTABLE int historySize() const
Returns the history capacity of this session.
Definition: Session.cpp:1371
Konsole::Session::sessionId
int sessionId() const
Returns the unique ID for this session.
Definition: Session.cpp:893
Konsole::ProcessInfo::currentDir
QString currentDir(bool *ok) const
Returns the current working directory of the process.
Definition: ProcessInfo.cpp:300
Konsole::HistoryType::maximumLineCount
virtual int maximumLineCount() const =0
Returns the maximum number of lines which this history type can store or -1 if the history can store ...
Konsole::Session::openTeletype
void openTeletype(int masterFd)
Connect to an existing terminal.
Definition: Session.cpp:170
Konsole::TerminalDisplay::processFilters
void processFilters()
Updates the filters in the display's filter chain.
Definition: TerminalDisplay.cpp:939
Konsole::Pty::setEraseChar
void setEraseChar(char eraseChar)
Sets the special character for erasing previous not-yet-erased character.
Definition: Pty.cpp:156
Konsole::HistoryTypeNone
Definition: History.h:348
Konsole::Session::titleChanged
void titleChanged()
Emitted when the session's title has changed.
Konsole::Pty::closePty
void closePty()
Close the underlying pty master/slave pair.
Definition: Pty.cpp:271
Konsole::ZModemDialog
Definition: ZModemDialog.h:29
Konsole::Session::setPreferredSize
void setPreferredSize(const QSize &size)
Definition: Session.cpp:1296
Konsole::Emulation::imageSize
QSize imageSize() const
Returns the size of the screen image which the emulation produces.
Definition: Emulation.cpp:366
QWidget
Konsole::Session::setCodec
void setCodec(QTextCodec *codec)
Definition: Session.cpp:245
Konsole::Pty::windowSize
QSize windowSize() const
Returns the size of the window used by this teletype.
Definition: Pty.cpp:100
Konsole::TerminalDisplay::outputSuspended
void outputSuspended(bool suspended)
Causes the widget to display or hide a message informing the user that terminal output has been suspe...
Definition: TerminalDisplay.cpp:2861
Konsole::SessionGroup::sessions
QList< Session * > sessions() const
Returns the list of sessions currently in the group.
Definition: Session.cpp:1454
Konsole::Session::refresh
void refresh()
Attempts to get the shell program to redraw the current display area.
Definition: Session.cpp:713
Konsole::Session::DisplayedTitleRole
The title of the session which is displayed in tabs etc.
Definition: Session.h:244
Konsole::CompactHistoryType
Definition: History.h:373
Konsole::ProcessInfo::foregroundPid
int foregroundPid(bool *ok) const
Returns the id of the current foreground process.
Definition: ProcessInfo.cpp:226
Konsole::SessionGroup::masterStatus
bool masterStatus(Session *session) const
Returns the master status of a session.
Definition: Session.cpp:1458
Konsole::Session::TitleRole
TitleRole
This enum describes the available title roles.
Definition: Session.h:240
Konsole::Session::IconNameAndWindowTitle
Definition: Session.h:342
Konsole::Session::tabTitleFormat
QString tabTitleFormat(TabTitleContext context) const
Returns the format used by this session for tab titles.
Definition: Session.cpp:589
Konsole::Pty::setWindowSize
void setWindowSize(int columns, int lines)
Sets the size of the window (in columns and lines of characters) used by this teletype.
Definition: Pty.cpp:91
Konsole::Session::setProgram
void setProgram(const QString &program)
Sets the program to be executed when run() is called.
Definition: Session.cpp:267
Konsole::Emulation::sendText
virtual void sendText(const QString &text)=0
Interprets a sequence of characters and sends the result to the terminal.
Konsole::Session::arguments
QStringList arguments() const
Returns the arguments passed to the shell process when run() is called.
Definition: Session.cpp:1075
Konsole::Emulation::eraseChar
virtual char eraseChar() const
Returns the special character used for erasing character.
Definition: Emulation.cpp:321
QObject
ShellCommand.h
Konsole::Session::setDarkBackground
void setDarkBackground(bool darkBackground)
Sets whether the session has a dark background or not.
Definition: Session.cpp:235
Konsole::Session::views
QList< TerminalDisplay * > views() const
Returns the views connected to this session.
Definition: Session.cpp:303
ProcessInfo.h
Konsole::Session::currentWorkingDirectory
QString currentWorkingDirectory()
Returns the current directory of the foreground process in the session.
Definition: Session.cpp:282
Konsole::Emulation::setCodec
void setCodec(const QTextCodec *)
Sets the codec used to decode incoming characters.
Definition: Emulation.cpp:137
Konsole::Session::setHistoryType
void setHistoryType(const HistoryType &type)
Sets the type of history store used by this session.
Definition: Session.cpp:1060
Konsole::ProcessInfo::newInstance
static ProcessInfo * newInstance(int pid, bool readEnvironment=false)
Constructs a new instance of a suitable ProcessInfo sub-class for the current platform which provides...
Definition: ProcessInfo.cpp:1165
Konsole::Session::userTitle
QString userTitle() const
Return the session title set by the user (ie.
Definition: Session.cpp:578
Konsole::Session::codec
Q_SCRIPTABLE QByteArray codec()
Returns the codec used to decode incoming characters in this terminal emulation.
Definition: Session.cpp:262
Konsole::ProcessInfo::pid
int pid(bool *ok) const
Returns the process id.
Definition: ProcessInfo.cpp:212
Konsole::ProcessInfo::update
void update()
Updates the information about the process.
Definition: ProcessInfo.cpp:96
Konsole::SSHProcessInfo::userName
QString userName() const
Returns the user name which the user initially logged into on the remote computer.
Definition: ProcessInfo.cpp:1119
Konsole::TerminalDisplay::flowControlWarningEnabled
bool flowControlWarningEnabled() const
Returns true if the flow control warning box is enabled.
Definition: TerminalDisplay.h:504
Konsole::Session::name
QString name
Definition: Session.h:73
Konsole::Pty
The Pty class is used to start the terminal process, send data to it, receive data from it and manipu...
Definition: Pty.h:52
Konsole::TerminalDisplay::setUsesMouse
void setUsesMouse(bool usesMouse)
Sets whether the program whose output is being displayed in the view is interested in mouse events...
Definition: TerminalDisplay.cpp:2666
Konsole::Session::primaryScreenInUse
void primaryScreenInUse(bool use)
Emitted when the active screen is switched, to indicate whether the primary screen is in use...
Konsole::Session::autoClose
bool autoClose() const
See setAutoClose()
Definition: Session.cpp:1141
Konsole::Session::resizeRequest
void resizeRequest(const QSize &size)
Emitted when the terminal process requests a change in the size of the terminal window.
Konsole::Session::bellRequest
void bellRequest(const QString &message)
Emitted when a bell event occurs in the session.
Konsole::Session::setMonitorSilence
Q_SCRIPTABLE void setMonitorSilence(bool)
Enables monitoring for silence in the session.
Definition: Session.cpp:1108
Konsole::NOTIFYACTIVITY
The emulation is currently receiving data from its terminal input.
Definition: Emulation.h:62
Konsole::Session::setTabTitleFormat
void setTabTitleFormat(TabTitleContext context, const QString &format)
Sets the format used by this session for tab titles.
Definition: Session.cpp:582
Konsole::Session::~Session
~Session()
Definition: Session.cpp:161
Konsole::Session::profileChangeCommandReceived
void profileChangeCommandReceived(const QString &text)
Emitted when a profile change command is received from the terminal.
Konsole::Session::historyType
const HistoryType & historyType() const
Returns the type of history store used by this session.
Definition: Session.cpp:1065
History.h
Konsole::Session::isRunning
bool isRunning() const
Returns true if the session is currently running.
Definition: Session.cpp:240
Konsole::Emulation::sendMouseEvent
virtual void sendMouseEvent(int buttons, int column, int line, int eventType)
Converts information about a mouse event into an xterm-compatible escape sequence and emits the chara...
Definition: Emulation.cpp:204
Konsole::SessionGroup::masterMode
int masterMode() const
Returns a bitwise OR of the active MasterMode flags for this group.
Definition: Session.cpp:1450
Konsole::ProcessInfo::setUserHomeDir
void setUserHomeDir()
Forces the user home directory to be calculated.
Definition: ProcessInfo.cpp:280
Konsole::ProcessInfo::name
QString name(bool *ok) const
Returns the name of the current process.
Definition: ProcessInfo.cpp:233
Konsole::Session::closeInNormalWay
bool closeInNormalWay()
Kill the terminal process in normal way.
Definition: Session.cpp:775
TerminalDisplay.h
Konsole::TerminalDisplay::lines
int lines() const
Returns the number of lines of text which can be displayed in the widget.
Definition: TerminalDisplay.h:268
Konsole::Session::isRemote
bool isRemote()
Returns true if the session currently contains a connection to a remote computer. ...
Definition: Session.cpp:975
Konsole::Session::changeTabTextColorRequest
void changeTabTextColorRequest(int)
Requests that the color the text for any tabs associated with this session should be changed;...
Konsole::Session::emulation
Emulation * emulation() const
Returns the terminal emulation instance being used to encode / decode characters to / from the proces...
Definition: Session.cpp:868
Konsole::SSHProcessInfo
Lightweight class which provides additional information about SSH processes.
Definition: ProcessInfo.h:406
Konsole::Session::flowControlEnabledChanged
void flowControlEnabledChanged(bool enabled)
Emitted when the flow control state changes.
Konsole::ProcessInfo
Takes a snapshot of the state of a process and provides access to information such as the process nam...
Definition: ProcessInfo.h:74
Konsole::Session::setTitle
void setTitle(TitleRole role, const QString &title)
Sets the session's title for the specified role to title.
Definition: Session.cpp:903
Konsole::SessionGroup::setMasterStatus
void setMasterStatus(Session *session, bool master)
Sets whether a particular session is a master within the group.
Definition: Session.cpp:1488
Vt102Emulation.h
Konsole::Emulation::keyBindings
QString keyBindings() const
Returns the name of the emulation's current key bindings.
Definition: Emulation.cpp:167
Konsole::Session::TextColor
Definition: Session.h:345
Konsole::Session::iconText
QString iconText() const
Returns the text of the icon associated with this session.
Definition: Session.cpp:1055
Konsole::NOTIFYBELL
The terminal program has triggered a bell event to get the user's attention.
Definition: Emulation.h:57
Konsole::ProcessInfo::format
QString format(const QString &text) const
Parses an input string, looking for markers beginning with a '' character and returns a string with t...
Definition: ProcessInfo.cpp:120
Konsole::Session::setIconName
void setIconName(const QString &iconName)
Sets the name of the icon associated with this session.
Definition: Session.cpp:1037
Konsole::Emulation::programUsesMouse
bool programUsesMouse() const
Returns true if the active terminal program wants mouse input events.
Definition: Emulation.cpp:57
Konsole::Emulation
Base class for terminal emulation back-ends.
Definition: Emulation.h:117
Konsole::NOTIFYNORMAL
The emulation is currently receiving user input.
Definition: Emulation.h:52
Konsole::Session::setInitialWorkingDirectory
void setInitialWorkingDirectory(const QString &dir)
Sets the initial working directory for the session when it is run This has no effect once the session...
Definition: Session.cpp:277
Konsole::Session::addView
void addView(TerminalDisplay *widget)
Adds a new view for this session.
Definition: Session.cpp:308
Konsole::Session::RemoteTabTitle
Tab title format used session currently contains a connection to a remote computer (via SSH) ...
Definition: Session.h:155
Konsole::Emulation::createWindow
ScreenWindow * createWindow()
Creates a new window onto the output from this emulation.
Definition: Emulation.cpp:67
Konsole::SSHProcessInfo::host
QString host() const
Returns the host which the user has connected to.
Definition: ProcessInfo.cpp:1123
Konsole::Session::getUrl
KUrl getUrl()
Return URL for the session.
Definition: Session.cpp:1001
Konsole::Session::stateChanged
void stateChanged(int state)
Emitted when the activity state of this session changes.
Konsole::TerminalDisplay::columns
int columns() const
Returns the number of characters of text which can be displayed on each line in the widget...
Definition: TerminalDisplay.h:278
Konsole::SessionGroup::setMasterMode
void setMasterMode(int mode)
Specifies which activity in the group's master sessions is propagated to all sessions in the group...
Definition: Session.cpp:1480
Konsole::Session::setKeyBindings
void setKeyBindings(const QString &name)
Sets the key bindings used by this session.
Definition: Session.cpp:898
Konsole::SessionGroup::removeSession
void removeSession(Session *session)
Removes a session from the group.
Definition: Session.cpp:1468
Konsole::Session::SessionName
Definition: Session.h:347
Konsole::Session::environment
Q_SCRIPTABLE QStringList environment() const
Returns the environment of this session as a list of strings like VARIABLE=VALUE. ...
Definition: Session.cpp:878
Konsole::Session::finished
void finished()
Emitted when the terminal process exits.
Pty.h
Konsole::SessionGroup::SessionGroup
SessionGroup(QObject *parent)
Constructs an empty session group.
Definition: Session.cpp:1443
Konsole::ProcessInfo::validCurrentDir
QString validCurrentDir() const
Returns the current working directory of the process (or its parent)
Definition: ProcessInfo.cpp:101
Konsole::Pty::setInitialWorkingDirectory
void setInitialWorkingDirectory(const QString &dir)
Sets the initial working directory.
Definition: Pty.cpp:182
Konsole::HistoryTypeFile
Definition: History.h:359
Konsole::Session::close
void close()
Closes the terminal session.
Definition: Session.cpp:764
Konsole::Session::isForegroundProcessActive
bool isForegroundProcessActive()
Returns true if the user has started a program in the session.
Definition: Session.cpp:1398
Konsole::Session::setHistorySize
Q_SCRIPTABLE void setHistorySize(int lines)
Sets the history capacity of this session.
Definition: Session.cpp:1360
Konsole::Session::started
void started()
Emitted when the terminal process starts.
Konsole::ProcessInfo::isValid
bool isValid() const
Returns true if the process state was read successfully.
Definition: ProcessInfo.cpp:207
ZModemDialog.h
Konsole::Session::sendSignal
void sendSignal(int signal)
Definition: Session.cpp:735
Konsole::SessionGroup::~SessionGroup
~SessionGroup()
Destroys the session group and removes all connections between master and slave sessions.
Definition: Session.cpp:1447
Konsole::HistoryType
Definition: History.h:319
Konsole::Session::title
QString title(TitleRole role) const
Returns the session's title for the specified role.
Definition: Session.cpp:915
Konsole::Vt102Emulation
Provides an xterm compatible terminal emulation based on the DEC VT102 terminal.
Definition: Vt102Emulation.h:75
Konsole::Pty::flowControlEnabled
bool flowControlEnabled() const
Queries the terminal state and returns true if Xon/Xoff flow control is enabled.
Definition: Pty.cpp:122
Konsole::ZModemDialog::transferDone
void transferDone()
To indicate the process is finished.
Definition: ZModemDialog.cpp:58
Konsole::Session::isMonitorActivity
Q_SCRIPTABLE bool isMonitorActivity() const
Returns true if monitoring for activity is enabled.
Definition: Session.cpp:1085
Konsole::Session::changeBackgroundColorRequest
void changeBackgroundColorRequest(const QColor &)
Requests that the background color of views on this session should be changed.
Konsole::Session::clearHistory
void clearHistory()
Clears the history store used by this session.
Definition: Session.cpp:1070
Konsole::Session::NameRole
The name of the session.
Definition: Session.h:242
Konsole::Session::setIconText
void setIconText(const QString &iconText)
Sets the text of the icon associated with this session.
Definition: Session.cpp:1045
Konsole::Session::LocalTabTitle
Default tab title format.
Definition: Session.h:150
Konsole::SSHProcessInfo::format
QString format(const QString &input) const
Operates in the same way as ProcessInfo::format(), except that the set of markers understood is diffe...
Definition: ProcessInfo.cpp:1135
Konsole::Emulation::clearHistory
void clearHistory()
Clears the history scroll.
Definition: Emulation.cpp:121
Konsole::TerminalDisplay::setScreenWindow
void setScreenWindow(ScreenWindow *window)
Sets the terminal screen section which is displayed in this widget.
Definition: TerminalDisplay.cpp:107
Konsole::Pty::setFlowControlEnabled
void setFlowControlEnabled(bool on)
Enables or disables Xon/Xoff flow control.
Definition: Pty.cpp:105
Konsole::Session::cancelZModem
void cancelZModem()
Definition: Session.cpp:1170
Konsole::SessionGroup::addSession
void addSession(Session *session)
Adds a session to the group.
Definition: Session.cpp:1463
Konsole::Session::setArguments
void setArguments(const QStringList &arguments)
Sets the command line arguments which the session's program will be passed when run() is called...
Definition: Session.cpp:272
Konsole::Session::isMonitorSilence
Q_SCRIPTABLE bool isMonitorSilence() const
Returns true if monitoring for inactivity (silence) in the session is enabled.
Definition: Session.cpp:1089
createUuid
QUuid createUuid()
Definition: Session.cpp:68
Konsole::Session::setAutoClose
void setAutoClose(bool close)
Specifies whether to close the session automatically when the terminal process terminates.
Definition: Session.cpp:1136
Konsole::Session::IconName
Definition: Session.h:343
Konsole::HistoryType::isUnlimited
bool isUnlimited() const
Returns true if the history size is unlimited.
Definition: History.h:343
Konsole::Session::preferredSize
QSize preferredSize() const
Definition: Session.cpp:1291
Konsole::Emulation::receiveData
void receiveData(const char *buffer, int len)
Processes an incoming stream of characters.
Definition: Emulation.cpp:213
Konsole::Session::changeForegroundColorRequest
void changeForegroundColorRequest(const QColor &)
Requests that the text color of views on this session should be changed to color. ...
Konsole::Emulation::setKeyBindings
void setKeyBindings(const QString &name)
Sets the key bindings used to key events ( received through sendKeyEvent() ) into character streams t...
Definition: Emulation.cpp:159
Konsole::Emulation::codec
const QTextCodec * codec() const
Returns the codec used to decode incoming characters.
Definition: Emulation.h:169
Konsole::Session::setFlowControlEnabled
Q_SCRIPTABLE void setFlowControlEnabled(bool enabled)
Sets whether flow control is enabled for this terminal session.
Definition: Session.cpp:1146
Konsole::Session::SessionIcon
Definition: Session.h:348
Konsole::Session::addEnvironmentEntry
void addEnvironmentEntry(const QString &entry)
Adds one entry for the environment of this session entry should be like VARIABLE=VALUE.
Definition: Session.cpp:888
Konsole::Session::selectionChanged
void selectionChanged(const QString &text)
Emitted when the text selection is changed.
Konsole::Session::Session
Session(QObject *parent=0)
Constructs a new session.
Definition: Session.cpp:98
Konsole::Session::foregroundProcessName
QString foregroundProcessName()
Returns the name of the current foreground process.
Definition: Session.cpp:1404
Konsole::Session::setSize
void setSize(const QSize &size)
Emits a request to resize the session to accommodate the specified window size.
Definition: Session.cpp:1283
Konsole::Session::TabTitleContext
TabTitleContext
This enum describes the contexts for which separate tab title formats may be specified.
Definition: Session.h:148
Konsole::Session::zmodemDetected
void zmodemDetected()
Emitted when the request for data transmission through ZModem protocol is detected.
Konsole::Emulation::history
const HistoryType & history() const
Returns the history store used by this emulation.
Definition: Emulation.cpp:132
Konsole::Session::flowControlEnabled
Q_SCRIPTABLE bool flowControlEnabled() const
Returns whether flow control is enabled for this terminal session.
Definition: Session.cpp:1155
Konsole::Emulation::utf8
bool utf8() const
Convenience method.
Definition: Emulation.h:180
Konsole::ZModemDialog::addProgressText
void addProgressText(const QString &)
Adds a line of text to the progress window.
Definition: ZModemDialog.cpp:50
Konsole::Session::ProfileChange
Definition: Session.h:349
Konsole::TerminalDisplay
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
Definition: TerminalDisplay.h:63
Konsole::Session::sendText
Q_SCRIPTABLE void sendText(const QString &text) const
Sends text to the current foreground terminal program.
Definition: Session.cpp:813
Konsole::Session::setUserTitle
void setUserTitle(int what, const QString &caption)
Changes the session title or other customizable aspects of the terminal emulation display...
Definition: Session.cpp:512
Konsole::Session::runCommand
Q_SCRIPTABLE void runCommand(const QString &command) const
Sends command to the current foreground terminal program.
Definition: Session.cpp:818
Konsole::Session::iconName
QString iconName() const
Returns the name of the icon associated with this session.
Definition: Session.cpp:1050
Konsole::Session::setMonitorSilenceSeconds
Q_SCRIPTABLE void setMonitorSilenceSeconds(int seconds)
See setMonitorSilence()
Definition: Session.cpp:1123
Konsole::Session::BackgroundColor
Definition: Session.h:346
Konsole::Session::saveSession
void saveSession(KConfigGroup &group)
Definition: Session.cpp:1418
Konsole::Session::program
QString program() const
Returns the program name of the shell process started when run() is called.
Definition: Session.cpp:1080
QList
Konsole::SSHProcessInfo::port
QString port() const
Returns the port on host which the user has connected to.
Definition: ProcessInfo.cpp:1127
Konsole::Session::removeView
void removeView(TerminalDisplay *widget)
Removes a view from this session.
Definition: Session.cpp:350
Konsole::Pty::setWriteable
void setWriteable(bool writeable)
Control whether the pty device is writeable by group members.
Definition: Pty.cpp:261
Konsole::Session::getDynamicTitle
QString getDynamicTitle()
Returns a title generated from tab format and process information.
Definition: Session.cpp:983
Konsole::Pty::setUtf8Mode
void setUtf8Mode(bool on)
Put the pty into UTF-8 mode on systems which support it.
Definition: Pty.cpp:135
Konsole::Session::closeInForceWay
bool closeInForceWay()
kill terminal process in force way.
Definition: Session.cpp:800
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal