Page 92 of 170

Gnome 3 autocomplete crash, Filezilla drag&drop crash and shutdown without admin password

Since I'm using those hints from time to time, I've decided to put them here, so I don't need to google everytime I need them.

Gnome 3 autocomplete crash fix

Well to me honest, this isn't a fix but just a workaround, but hey! Wokrs for me ;)

sudo chattr +i ~/.local/share/recently-used.xbel

Filezilla drag&drop crash

sudo apt-get install curl
curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -

Now let's add to /etc/apt/sources.list file:

deb http://apt.wxwidgets.org/ natty-wx main
deb-src http://apt.wxwidgets.org/ natty-wx main

and then:

sudo apt-get update
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n

Ubuntu shutdown without admin password

To do this, we just need to change the policy for shutting down. Edit the /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy file and replace:

<action id="org.freedesktop.consolekit.system.stop-multiple-users">
  <description>Stop the system when multiple users are logged in</description>
  <message>System policy prevents stopping the system when other users are logged in</message>
  <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>auth_admin_keep</allow_active>
  </defaults>
</action>

to:

<action id="org.freedesktop.consolekit.system.stop-multiple-users">
  <description>Stop the system when multiple users are logged in</description>
  <message>System policy prevents stopping the system when other users are logged in</message>
  <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
  </defaults>
</action>

Same for rebooting:

<action id="org.freedesktop.consolekit.system.restart-multiple-users">
  <description>Restart the system when multiple users are logged in</description>
  <message>System policy prevents restarting the system when other users are logged in</message>
  <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>auth_admin_keep</allow_active>
  </defaults>
</action>

to:

<action id="org.freedesktop.consolekit.system.restart-multiple-users">
  <description>Restart the system when multiple users are logged in</description>
  <message>System policy prevents restarting the system when other users are logged in</message>
  <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
  </defaults>
</action>

RVM, Ruby 1.9.3-p194, ruby-debugger and “You need to install ruby-debug” on Ubuntu 11.10

Recently I've been upgrading my RVM and Ruby versions. After upgrade I've encountered a problem connected to ruby-debugger. When starting Rails server I always ended with such a message:

You need to install ruby-debug to run the server in debugging mode. 
With gems, use 'gem install ruby-debug'

# Edit: this solutions fixes also this problem:

cannot load such file -- zlib

Ruby-debbug doesn't work to well with Ruby 1.9, so I use following combination in my gemsets:

group :development, :test do
  gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
  gem 'ruby-debug-base19x', '~> 0.11.30.pre4'
  gem 'ruby-debug19'
end

Until now, it worked really well, but after the upgrade, the "You need to install ruby-debug" message kept showing again and again (even when the gems from list above were installed). To fix this issue, you need to run following commands:

rm -rf $rvm_path/usr
rvm pkg install zlib

# Posted in 5 lines instead of 1 for better visibility
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev 
sudo apt-get install curl git-core zlib1g zlib1g-dev libssl-dev
sudo apt-get install libyaml-dev  libsqlite3-0 libsqlite3-dev sqlite3
sudo apt-get install libxml2-dev  libxslt-dev autoconf libc6-dev 
sudo apt-get install ncurses-dev automake libtool bison subversion

rvm reinstall 1.9.3-p194

After successful Ruby version reinstall, you should be able to run ruby software with debugger enabled.

# Update
Looks like, you can (as guys suggested in comments) debugger instead of ruby-debugger, however the method above fixes also problem with:

cannot load such file -- zlib

Copyright © 2025 Closer to Code

Theme by Anders NorenUp ↑