Code Monkey home page Code Monkey logo

Comments (4)

aarnt avatar aarnt commented on September 28, 2024

Do you have "notify-send" installed in your system?

from octopi.

jemadux avatar jemadux commented on September 28, 2024

yup it's installed

On 02/05/2014 04:21 PM, Alexandre Arnt wrote:

Do you have "notify-send" installed in your system?


Reply to this email directly or view it on GitHub:
#17 (comment)

Klearchos-Angelos Gkountras
--------Contact info-----------
mail [email protected]
xmpp [email protected]
irc jemadux @ frenode

web jemadux.info

Gnu/Linux is not user-friendly.
It is user-friendly.
It is not ignorant-friendly and idiot-friendly.

from octopi.

vedgy avatar vedgy commented on September 28, 2024

I have examined octopi-notifier code, MainWindow::sendNotification in particular, and have several remarks:

  1. QProcess::startDetached is static public function, it does not require QProcess object. I suspect that
QProcess *send = new QProcess();

causes a memory leak.
2. I do not think that checking desktop environment and if the executable exists are necessary. Running unexisting command will just result in

    bash: <command>: command not found

in stdout and process will quit. The line

    if (WMHelper::isXFCERunning() || WMHelper::isLXDERunning() || WMHelper::isOPENBOXRunning())

must be causing this Mate issue.
I would rewrite this function as follows:

void MainWindow::sendNotification(const QString &msg)
{
      const QString processToExec =
          "notify-send -i /usr/share/icons/octopi_red.png -t 30000 \"" +
           StrConstants::getApplicationName() + "\"  \"" + msg + '"';
      QProcess::startDetached(processToExec);
}

I have not tested this, so sorry if it won't work as expected.

from octopi.

aarnt avatar aarnt commented on September 28, 2024

Indeed guys!
Thank you very much for finding and fixing this issue!

from octopi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.