LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to modify the nitrogen wallpaper changer to work with caja file manager (http://www.linuxquestions.org/questions/linux-software-2/how-to-modify-the-nitrogen-wallpaper-changer-to-work-with-caja-file-manager-941644/)

nokangaroo 04-25-2012 05:54 AM

How to modify the nitrogen wallpaper changer to work with caja file manager
 
sudo apt-get source nitrogen
sudo chown -R <myself> ~/nitrogen-1.5.1
#this is what you get with apt-get source in Ubuntu precise, but there is a newer version available at http://projects.l3ib.org/nitrogen

now modify ~/nitrogen-1.5.1/src/SetBG.cc as follows:
(After this, nitrogen will probably not work with nautilus any more)

line 397:
old: gdk_atom_intern("NAUTILUS_DESKTOP_WINDOW_ID", FALSE),
new: gdk_atom_intern("CAJA_DESKTOP_WINDOW_ID", FALSE),

line 427:
old: if (strclass == std::string("Nautilus")) retval = SetBG::NAUTILUS; else
new: if (strclass == std::string("Caja")) retval = SetBG::NAUTILUS; else

line 463:
old: vecCmdLine.push_back(std::string("gconftool-2"));
new: vecCmdLine.push_back(std::string("mateconftool-2"));

line 467:
old: vecCmdLine.push_back(std::string("/desktop/gnome/background/picture_options"))
new: vecCmdLine.push_back(std::string("/desktop/mate/background/picture_options"))

line 470:
old: vecCmdLine.push_back(std::string("/desktop/gnome/background/picture_filename"));
new: vecCmdLine.push_back(std::string("/desktop/mate/background/picture_filename"));


(This will also work with nitrogen-1.5.2, but the line numbers are different)


Compiling:

sudo apt-get install libgtkmm-2.4-dev
cd ~/nitrogen-1.5.1
./bootstrap
CXXFLAGS="-O2" ./configure --prefix=/usr/local
make
sudo make install

/* I am no programmer, so if somebody finds an insidious bug in this procedure please reply :) */

EricTRA 04-26-2012 12:49 AM

Hi,

Thank you for sharing. Off the Zero Reply List.

Kind regards,

Eric

donovanmuller 12-22-2013 02:47 PM

This does not work for MATE 1.6.
mateconftool-2 has been dropped [1] in favour of dconf-editor/gsettings [2]

To get Nitrogen working on MATE 1.6, from line 463 (486 for 1.5.2) replace as follows:

Code:

    std::vector<std::string> vecCmdLine;
    vecCmdLine.push_back(std::string("gsettings"));
    vecCmdLine.push_back(std::string("org.mate.background picture-options"));
    vecCmdLine.push_back(std::string(strmode));
    vecCmdLine.push_back(std::string("org.mate.background picture-filename"));
    vecCmdLine.push_back(std::string(file));

    std::string strcolor = std::string( bgcolor.to_string() );
    vecCmdLine.push_back(std::string("org.mate.background primary-color"));
    vecCmdLine.push_back(strcolor);
    vecCmdLine.push_back(std::string("org.mate.background secondary-color"));
    vecCmdLine.push_back(strcolor);

Tested on Mint 16 MATE...

[1] - http://forums.linuxmint.com/viewtopi...130582#p706599
[2] - http://wiki.mate-desktop.org/docs:gsettings


All times are GMT -5. The time now is 04:42 AM.