Posts Tagged remove

Desktop Cube still showing second monitor space after it’s been unplugged

So this is an interesting problem that has haunted me for the past week or so.  I was running dual monitors last week which allowed me 12 virtual desktops, one stacked on the other.  This made my desktop cube/hexagon twice as tall which was awesome.. The problem was that when I unplugged the monitor and restarted the desktop space for the second monitor was still there although I cuold no longer access it as the monitor was no longer plugged in.. I could spin the hexagon and see it but there was no accessing it.. Things would get lost up there, it just wasn’t a good time.. I went into my monitor config and my ATI config and both of them reported just one monitor, it was clear that linux knew there was now only one monitor connected, it just didn’t want to remove that additional desktop space.

Today I finally decided to tackle it and it turned out to be easier than I thought.  All you need to do is go into Configure display settings where you can set your resolutions and such, I just changed the resolution and click on apply and it removed that additional desktop space and got me back down to the proper desktop size for one monitor.  Huzzah!

Tags: , , , , , ,

Ubuntu 11.10 Upgrade Hell: Part 2 – Aesthetics

Well the operating system is functional, I can get emails, I can surf the web, I can connect via wireless or, for the first time with this laptop, via a cat5 cable but man oh man does it look like shit.

The main issues I have to deal with right off the bat are:

  • Compiz not loading when lightdm starts.  This results in the nice things like my desktop cube not working to more glaring problems like transparency on icons not working.
    • So the first one’s easy enough..  You just need to add a the command ‘compize –replace’ to the startup programs.  Done and done
  • Top and bottom panels are back in full force and ugly as shit.  I’m missing my system menu, it looks like it’s been jammed into Applications/System Tools/System Settings, loading up like a classic windows control panel.  If I wanted a windows control panel I’d bloody well use windows
    • The solution I came to with this was to remove gnome-panel all together and just have awn handle everything.  it has a great plugin for main menu and places to replace the menus in the top panel and then clocks and running apps to replace the system tray.  It already replaces the task bar at the bottom on it’s own so there’s nothing to worry about that.
    • To prevent gnome-panel from loading all together just go into /usr/bin/ and chmod gnome-panel to 444 (You’ll need to do this as root or with sudo). and viola your screen is so much cleaner
    • What I chose to do next was to add 2 additional docks(bringing my grand total up to 3) placing 1 in the top left, one in the top right and leaving the main on centered on the bottom.  The top left one has my Cairo Menu and the top left contains all the goodies I’d want in a system tray and then some.. they are all tucked away so I never need to have screen space occupied by a useless panel anymore.  There were a couple extra applets I had to install which required the instructions from here
  • When rotating the 3D Cube the screen redraws/flickers
    • No way around this, compiz 3D cude is only operating at 80% at the moment
    • Tried installing all proposed/bleeding edge updates but there was no fix
  • I’m unable to move windows from one desktop/workspace to another via ctrl-alt-super left or right
    • So pretty mega annoying little bug is that when you move a window with ctrl-alt-super to a different workspace and let go, it just goes right back where it came from.  I discovered a crude work around where if you move the window and then just let go of shift and rotate the cube again(without moving the window this time) the window will stay in place.
    • Tried installing all proposed/bleeding edge updates but there was no fix
  • Lastly the window shades doesn’t really work..  It will rollup just fine but it leaves this ugly outline where it was.  Ugh. Found a forum thread saying that instaling the proposed updates would fix this but it doesn’t so don’t waste your time or risk one of those messing up your system even more.
That pretty solves all of my aesthetic problems.   I think I am going to look into pimping out the greeting screen as I hear lightdm lets you do some crazy stuff with it, but as far as fixing goes we’re all done!  Hope that helps

Tags: , , , , , , , , , ,

Deleting Duplicate Posts in WordPress

I ran into a little problem today where one of the programs I wrote to create blog posts was creating duplicates during one step of the process.  I haven’t quite figured out why it’s doing it yet however in the meantime I have used it to create and import about 25,000 blog posts and the rub is that about 30% of those are duplicates.  So my dilemma now was whether I should delay the launch a network of sites by spending another few days recreating, re-importing and resetting up all these posts or should I leave the script as is, duplication bug and then just find some way to remove the dupes.  Luckily enough I managed to figure out how to go with the latter option here and will debug this after I have a few dozen sites up and running.

I’ve tried both major duplicate post remover plugins and they are both crap.  Neither works, and both are broken in different ways.  Not sure if it’s because of the large volume of posts or if it’s just because they are bugged but needless to say they are useless to me.

So if you find yourself with a ton of duplicate posts in wordpress and want probably the most efficient, quickest way to go about getting rid of them just log onto your server, go into mysql, use the database in question and execute the following:

 

DELETE bad_rows.*
from wp_posts as bad_rows
inner join (
select post_title, MIN(id) as min_id
from wp_posts
group by post_title
having count(*) > 1
) as good_rows on good_rows.post_title = bad_rows.post_title
and good_rows.min_id <> bad_rows.id;

 

Now give it a while, my quad-core xeon took more than a few minutes to go through 7500 posts and remove the dupes, so grab a cup of joe and come back to see all of your problems magically disappeared :)   I can confirm this works with WordPress 3.1

A big thanks to pf69.com over at the wordpress forums who originally posted this solution here: http://wordpress.org/support/topic/plugin-to-remove-duplicate-posts

Tags: , , , , , ,

Page optimized by WP Minify WordPress Plugin