Konsole is driving me crazy!

Konsole, the terminal emulator of KDE, is driving me crazy! Version 4.8 made a slight change, that breaks an essential feature I'm using.

Up to version 4.7.x, I used the command konsole --profile=Profilename to open a terminal. Then I used ctrl+alt+N to open several terminals with the same profile. For some reason, this broke in version 4.8. Since I use this feature like every minute, I'm getting very frustrated by this.

Here comes the beauty of open source: since Konsole is open source, I can fix it myself.

My changes

First, I downloaded the current version of the konsole source RPM and installed it, using rpm -i konsole-4.8.1-1.fc16.src.rpm. In ~/rpmbuild/SOURCES I created a new file named newtab.patch, containing:

--- konsole-4.8.1/src/MainWindow.cpp    2012-02-29 23:56:57.000000000 +0100
+++ konsole-4.8.1/src/MainWindow.cpp    2012-04-03 19:47:52.397594047 +0200
@@ -397,7 +397,8 @@
 
 void MainWindow::newTab()
 {
-    Profile::Ptr defaultProfile = SessionManager::instance()->defaultProfile();
+    Profile::Ptr defaultProfile = MainWindow::defaultProfile();
+              //SessionManager::instance()->defaultProfile();  //Geeklab fix
     emit newSessionRequest(defaultProfile , activeSessionDir() , _viewManager);
 }

Then I editted konsole.spec, adding a line after the one that starts with Patch50:

Patch99: newtab.patch

After that, I added a line after the one that starts with %patch50:

%patch99 -p1 -b .newtab

And we're done. Build the RPM using the command rpmbuild -ba konsole.spec --define "dist geeklab" and install it.

Somehow, this RPM doesn't cover all of the problems, but enough for me to be happy.

© GeekLabInfo Konsole is driving me crazy! is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Magento and safe mode

The e-commerce application magento, for some reason, expects to have a lot of permissions on every server. One thing I stumbled upon when trying to install magento, was the creation of /tmp/magento/var.

Since /tmp could be shared between all users, this may not be the safest way. That's why my servers don't allow access to /tmp, but have a personal /tmp-style directory instead.

I got the error:
[Thu Feb 04 21:24:21 2010] [error] [client 1.2.3.4] PHP Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/magento/var) is not within the allowed path(s): (/blah/blah/website.com:/usr/share/pear:/var/www/error) in /blah/blah/website.com/app/code/core/Mage/Core/Model/Config/Options.php on line 214

The fix is very, very easy. But since I couldn't find anyone else posting the exact fix, I thought I'd do it.

in app/code/core/Mage/Core/Model/Config/Options.php on line 137, you find:
public function getSysTmpDir()
{
return sys_get_temp_dir();
}

Change it to:
public function getSysTmpDir()
{
return $_SERVER['DOCUMENT_ROOT'].'/your_secret_tmp_dir/';
}

© GeekLabInfo Magento and safe mode is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.00 out of 5)
Loading...