Feed aggregator

Keith Packard: Present-redirect-lifetimes

Planet Debian - Sat, 28/12/2013 - 22:38
Object Lifetimes under Present Redirection

Present extension redirection passes responsibility for showing application contents from the X server to the compositing manager. This eliminates an extra copy to the composite extension window buffer and also allows the application contents to be shown in the right frame.

(Currently, the copy from application buffer to window buffer is synchronized to the application-specified frame, and then a Damage event is delivered to the compositing manager which constructs the screen image using the window buffer and presents that to the screen at least one frame later, which generally adds another frame of delay for the application.)

The redirection operation itself is simple — just wrap the PresentPixmap request up into an event and send it to the compositing manager. However, the pixmap to be presented is allocated by the application, and hence may disappear at any time. We need to carefully control the lifetime of the pixmap ID and the specific frame contents of the pixmap so that the compositing manager can reliably construct complete frames.

We’ll separately discuss the lifetime of the specific frame contents from that of the pixmap itself. By the “frame contents”, I mean the image, as a set of pixel values in the pixmap, to be presented for a specific frame.

Present Pixmap contents lifetime

After the application is finished constructing a particular frame in a pixmap, it passes the pixmap to the X server with PresentPixmap. With non-redirected Present, the X server is responsible for generating a PresentIdleNotify event once the server is finished using the contents. There are three different cases that the server handles, matching the three different PresentCompleteModes:

  1. Copy. The pixmap contents are not needed after the copy operation has been performed. Hence, the PresentIdleNotify event is generated when the target vblank time has been reached, right after the X server calls CopyArea

  2. Flip. The pixmap is being used for scanout, and so the X server won’t be done using it until some other scanout buffer is selected. This can happen as a result of window reconfiguration which makes the displayed window no longer full-screen, but the usual case is when the application presents a subsequent frame for display, and the new frame replaces the old. Thus, the PresentIdleNotify event generally occurs when the target vblank time for the subsequent frame has been reached, right after the subsequent frame’s pixmap has been selected for scanout.

  3. Skip. The pixmap contents will never be used, and the X server figures this out when a subsequent frame is delivered with a matching target vblank time. This happens when the subsequent Present operation is queued by the X server.

In the Redirect case, the X server cannot tell when the compositing manager is finished with the pixmap. The same three cases as above apply here, but the results are slightly different:

  1. Composite. The pixmap is being used as a part of the screen image and must be composited with other window pixmaps. In this case, the compositing manager will need to hold onto the pixmap until a subsequent pixmap is provided by the application. Thus, the pixmap will remain needed by the compositing manager until it receives a subsequent PresentRedirectNotify for the same window.

  2. Flip. The compositing manager is free to take the application pixmap and use it directly in a subsequent PresentPixmap operation and let the X server ‘flip’ to it; this provides a simple way of avoiding an extra copy while not needing to fuss around with ‘unredirecting’ windows. In this case, the X server will need the pixmap contents until a new scanout pixmap is provided, and the compositing manager will also need the pixmap in case the contents are needed to help construct a subsequent frame.

  3. Skip. In this case, the compositing manager notices that the window’s pixmap has been replaced before it was ever used.

In case 2, the X server and the compositing manager will need to agree on when the PresentIdleNotify event should be delivered. In the other two cases, the compositing manager itself will be in charge of that.

To let the compositing manager control when the event is delivered, the X server will count the number of PresentPixmap redirection events sent, and the compositing manager will deliver matching PresentIdle requests.

PresentIdle ┌─── PresentIdle pixmap: PIXMAP └─── Errors: Pixmap, Match

Informs the server that the Pixmap passed in a PresentRedirectNotify event is no longer needed by the client. Each PresentRedirectNotify event must be matched by a PresentIdle request for the originating client to receive a PresentIdleNotify event.

PresentRedirect pixmap ID lifetimes

A compositing manager will want to know the lifetime of the pixmaps delivered in PresentRedirectNotify events to clean up whatever local data it has associated with it. For instance, GL compositing managers will construct textures for each pixmap that need to be destroyed when the pixmap disappears.

Some kind of PixmapDestroyNotify event is necessary for this; the alternative is for the compositing manager to constantly query the X server to see if the pixmap IDs it is using are still valid, and even that isn’t reliable as the application may re-use pixmap IDs for a new pixmap.

It seems like this PixmapDestroyNotify event belongs in the XFixes extension—it’s a general mechanism that doesn’t directly relate to Present. XFixes doesn’t currently have any Generic Events associated, but adding that should be fairly straightforward. And then, have the Present extension automatically select for PixmapDestroyNotify events when it delivers the pixmap in a PresentRedirectNotify event so that the client is ensured of receiving the associated PixmapDestroyNotify event.

One remaining question I have is whether this is sufficient, or if the compositing manager needs a stable pixmap ID which lives beyond the life of the application pixmap ID. If so, the solution would be to have the X server allocate an internal ID for the pixmap and pass that to the client somehow; presumably in addition to the original pixmap ID.

XFixesPixmapSelectInput XFIXESEVENTID { XID } Defines a unique event delivery target for Present events. Multiple event IDs can be allocated to provide multiple distinct event delivery contexts. PIXMAPEVENTS { XFixesPixmapDestroyNotify } ┌─── XFixesPixmapSelectInput eventid: XFIXESEVENTID pixmap: PIXMAP events: SETofPIXMAPEVENTS └─── Errors: Pixmap, Value

Changes the set of events to be delivered for the target pixmap. A Value error is sent if ‘events’ contains invalid event selections.

XFixesPixmapDestroyNotify ┌─── XFixesPixmapDestroyNotify type: CARD8 XGE event type (35) extension: CARD8 XFixes extension request number sequence-number: CARD16 length: CARD32 0 evtype: CARD16 XFixes_PixmapDestroyNotify eventID: XFIXESEVENTID pixmap: pixmap └───

This event is delivered to all clients selecting for it on ‘pixmap’ when the pixmap ID is destroyed by a client. Note that the pixmap may still be referenced by other objects within the X server, as a window background, GC tile or stipple or Picture drawable (among others), but this event serves to notify the selecting client that the ID is no longer associated with the underlying pixmap.

Categories: Elsewhere

BryceAdamFisher.com: Considerations for Multisite Drupal

Planet Drupal - Sat, 28/12/2013 - 17:40

At my day job, we've been using the Domain Access module with Drupal 6 for 5 years. Recently, we've decided it's time to rethink our approach to Drupal multisite. In this article, I'll share some of ideal use cases and pitfalls for the Domain module and some alternatives for you to consider.

Categories: Elsewhere

David Moreno: FOSDEM 2014

Planet Debian - Sat, 28/12/2013 - 14:17

I just booked my train tickets for FOSDEM 2014. Accommodation will be sorted out later.

This year I planned it well in advance to get decent prices for Thalys, unlike last year that we ended up riding the slow trains that stop in every single town in the Netherlands and Belgium taking forever.

See you there!

Categories: Elsewhere

Russ Allbery: rra-c-util 5.0

Planet Debian - Sat, 28/12/2013 - 05:26

This package started as my collection of shared C utility code and has turned into the collection of all sorts of glue that I use across multiple packages.

The primary changes in this release are to the network utility layer. In order to add proper IPv6 support, I adopted the network_bind_* functions to take the socket type, which changed all the APIs (hence the major version bump). While I was at it, I also cleaned up some of the error reporting in the various functions to make them easier to use. There's a new network_wait_any function that does the select part of network_accept_any, making it useful for UDP servers.

This release also contains a new, generalized TAP add-on for spawning background processes used by test cases. Their standard output and standard error is now captured and merged into the test output stream using the new C TAP Harness support for files containing diagnostic messages. The remctl TAP add-on has been rewritten to use this framework.

Julien ÉLIE also adapted the Autoconf probes for Berkeley DB and zlib used in INN to the framework used for most probes in rra-c-util, and those probes are included in this release.

Finally, the vector utility library's free functions now accept (and do nothing with) NULL, which makes it easier to write cleanup functions.

You can get the latest release from the rra-c-util distribution page.

Categories: Elsewhere

Richard Hartmann: Random rant

Planet Debian - Fri, 27/12/2013 - 23:08

Q: What user space program can reliably lock up a Lenovo X1 Carbon with Intel Core i7-3667U, 8 GB RAM, and an Intel SSDSCMMW240A3L so badly that you can't ssh into it any more and ctrl-alt-f1 does not work? So badly that, after half an hour of waiting, the only thing that's left is to shut if off hard.

A: Google Chrome with 50+ Flickr tabs open.

Q: Why?

A: I honestly don't know.

Categories: Elsewhere

Richard Hartmann: Release Critical Bug report for Week 52

Planet Debian - Fri, 27/12/2013 - 21:41

I had been pondering to do an end-of-year bug stat post. Niels Thykier forced my hand, so here goes :)

The UDD bugs interface currently knows about the following release critical bugs:

  • In Total: 1353
    • Affecting Jessie: 476 That's the number we need to get down to zero before the release. They can be split in two big categories:
      • Affecting Jessie and unstable: 410 Those need someone to find a fix, or to finish the work to upload a fix to unstable:
        • 52 bugs are tagged 'patch'. Please help by reviewing the patches, and (if you are a DD) by uploading them.
        • 28 bugs are marked as done, but still affect unstable. This can happen due to missing builds on some architectures, for example. Help investigate!
        • 330 bugs are neither tagged patch, nor marked done. Help make a first step towards resolution!
      • Affecting Jessie only: 66 Those are already fixed in unstable, but the fix still needs to migrate to Jessie. You can help by submitting unblock requests for fixed packages, by investigating why packages do not migrate, or by reviewing submitted unblock requests.
        • 0 bugs are in packages that are unblocked by the release team.
        • 66 bugs are in packages that are not unblocked.

Graphical overview of bug stats thanks to azhag:
[[!img Error: Image::Magick is not installed]]

Categories: Elsewhere

Tyler Frankenstein: Drupal - Get a View's Export Code Programmatically from CTools

Planet Drupal - Fri, 27/12/2013 - 18:17

With Drupal and Views, we are able to configure a View's settings and import/export them across Drupal sites. This allows us to create backup copies of our View's settings and/or move a View between Drupal sites with relative ease.

Typically this is a manual process by using the Views UI to copy the "export" code string from one site:

http://dev.example.com/admin/structure/views/view/frontpage/export

..and then paste the string into the "import" form on another site:

Categories: Elsewhere

Drupalize.Me: Careful With That Debug Syntax

Planet Drupal - Fri, 27/12/2013 - 14:53

A funny thing happened last week. On Wednesday, we performed our weekly code deployment and released a handful of new features/bug fixes to the site. And then, about an hour later, someone on the team found this:

Notice the extra "asdf fdsa" in there? It's okay if you didn't, because neither did we. How did this happen? Don't you guys have a review process? I would have never let this happen on my project.

Related Topics: debugging, Development
Categories: Elsewhere

Chris Hertzog: Introducing Pinger and PingCheck.in

Planet Drupal - Fri, 27/12/2013 - 12:59

As the owner of a small development shop, I deal one on one with all of my clients. Most of the time these are happy/pleasant exchanges. But then on occasion, (usually when I'm on vacation, in the middle of an 8 hour meeting, or somewhere that my access to the internet is severely hindered), I get an email/text/call from a client whose site is down. No matter which form of communication, these exchanges are always written with caps lock.

Any website developer can give you a laundry list of why a site may be down or is not responding. Traffic spikes, server malfunctions, power outages, hacking attempts, etc. But most website owners don't care why the site isn't responding. They just want it fixed. An hour ago.

So in an effort to minimize these unpleasant events, I looked for some website monitoring tools. There are many out there with lots of options. But none really fit my use case. Plus, none were built in Drupal :).

I have a client dashboard system where my clients manage their account. They can view site analytics, submit support tickets, pay invoices, etc. I wanted to be able to track website downtime and have it available to them. Not only would it be a plus for them, but it could help me identify if issues were isolated to their site, or affecting our entire infrastructure.

Step In Pinger

Pinger is a simple module that leverages the Drupal Queue API, Cron, and drupal_http_request. In a nutshell, you tell pinger to monitor a handful of urls, and it will check each url when cron runs. Over and over again.

Elysia Cron is recommended to help manage cron settings, so you can have pinger_cron() running more frequently than other modules (plus it helps run the Queue).

Pinger saves each response as an entity (so the entity API can be leveraged). It records the http status code, the duration of the request, and the timestamp. Additionally, the information is exposed to views, so you can generate reports of outages, slow responses, etc.

PingCheck.in

I decided to launch PingCheck.in as a hosted version of Pinger. The service will check your website (perform a HTTP GET request) every 5 or 10 minutes (depending on subscription), and send a message to up to 5 different email addresses when it received something other than a 200 OK status.

We have different size plans for different needs. The personal website plan is free. Forever. Additionally, we are offering a 6 month free trial of any paid plan with coupon code "drupal6".

Please test out and review the module yourselves, or signup for the service. Comments and feedback on both are greatly appreciated.

CategoryDrupal PlanetComments Add new comment Your name Comment* About text formatsPlain text
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6>
Supported tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6> Leave this field blank
Categories: Elsewhere

John Goerzen: Richly Blessed

Planet Debian - Fri, 27/12/2013 - 06:16

“It’s wedding week! Wedding week! Wedding week! Wedding week! Oh, also Christmas. Oh dad, it’s wedding week! I can’t believe it! It’s finally here! Wedding week!” – Jacob, age 7, Sunday

“Oh dad, this is the best Christmas EVER!” – Jacob, Wednesday

“Dad, is the wedding TODAY?” – Oliver, age 4, every morning this week

This has certainly been a Christmas like no other. I have never known something to upstage Christmas for Jacob, but apparently a wedding can!

Laura and I got to celebrate our first Christmas together this year — together, of course, with the boys. We enjoyed a wonderful day in the middle of a busy week, filled with play, family togetherness, warmth, and happiness. At one point, while I was helping the boys with their new model train components, Laura was enjoying playing Christmas tunes on the piano. Every time she’d reach the end, Jacob paused, and said, “That was awesome!”, beating me to it.

That’s a few days before Christmas — Jacob and Oliver demanding snow ice cream, and of course who am I to refuse?

Cousins opening presents

After his school Christmas program, Jacob has enjoyed singing. Here he is after the Christmas Eve program, where he excitedly ran up into the choir loft, picked up a hymnal, and pretended to sing.

And, of course, opening of presents at home.

Sometimes I think about how I didn’t know life could get this good. Soon Laura and I will be married, and it will be even better. Truly we have been richly blessed.

Categories: Elsewhere

Russell Coker: Sound Device Order with ALSA

Planet Debian - Fri, 27/12/2013 - 04:35

One problem I have had with my new Dell PowerEdge server/workstation [1] is that sound doesn’t work correctly. When I initially installed it things were OK but after installing a new monitor sound stopped working.

The command “aplay -l” showed the following:
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Speaker [Logitech USB Speaker], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So the HDMI sound hardware (which had no speakers connected) became ALSA card 0 (default playback) and the USB speakers became card 1. It should be possible to convert KDE to use card 1 and then have other programs inherit this, but I wasn’t able to configure that with Debian/Wheezy.

My first attempt at solving this was to blacklist the HDMI and motherboard drivers (as suggested by Lindsay on the LUV mailing list). I added the following to /etc/modprobe.d/hdmi-blacklist.conf:
blacklist snd_hda_codec_hdmi
blacklist snd_hda_intel

Blacklisting the drivers works well enough. But the problem is that I will eventually want to install HDMI speakers to get better quality than the old Logitech portable USB speakers and it would be convenient to have things just work.

Jason white suggested using the module options to specify the ALSA card order. The file /etc/modprobe.d/alsa-base.conf in Debian comes with an entry specifying that the USB driver is never to be card 0, which is exactly what I don’t want. So I commented out the previous option for snd-usb-audio and put in the following ones to replace it:
# make USB 0 and HDMI/Intel anything else
options snd-usb-audio index=0
options snd_hda_codec_hdmi=-2
options snd_hda_intel=-2

Now I get the following from “aplay -l” and both KDE and mplayer will play to the desired card by default:
**** List of PLAYBACK Hardware Devices ****
card 0: Speaker [Logitech USB Speaker], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Categories: Elsewhere

Asheesh Laroia: New job (what running Debian means to me)

Planet Debian - Fri, 27/12/2013 - 03:56

Five weeks ago, I started a new job (Security Engineer, Eventbrite). I accepted the offer on a Friday evening at about 5:30 PM. That evening, my new boss and I traded emails to help me figure out what kind of computer I'd like. Time was of the essence because my start date was very next day, Tuesday.

I wrote about how I value pixel count, and then RAM, and then a speedy disk, and then a speedy CPU. I named a few ThinkPad models that could be good, and with advice from the inimitable danjared, I pointed out that some Dell laptops come pre-installed with Ubuntu (which I could easily swap out for Debian).

On Monday, my boss replied. Given the options that the IT department supports, he picked out the best one by my metrics: a MacBook Pro. The IT department would set up the company-mandated full-disk encryption and anti-virus scanning. If I wanted to run Linux, I could set up BootCamp or a virtualization solution.

As I read the email, my heart nearly stopped. I just couldn't see myself using a Mac.

I thought about it. Does it really matter to me enough to call up my boss and undo an IT request that is already in the works, backpedaling on what I claimed was important to me, opting for brand anti-loyalty to Apple over hardware speed?

Yes, I thought to myself. I am willing to just not work there if I have to use a Mac.

So I called $BOSS, and I asked, "What can we do to not get me a Mac?" It all worked out fine; I use a ThinkPad X1 Carbon running Debian for work now, and it absolutely does everything I need. It does have a slower CPU, fewer pixels, and less RAM, and I am the only person in the San Francisco engineering office not running Mac OS. But it all works.

In the process, I thought it made sense to write up some text to $BOSS. Here is how it goes.

Hi $BOSS,

Thanks for hearing my concerns about having a Mac. It would basically be a fairly serious blow to my self image. It's possible I could rationalize it, but it would take a long time, and I'm not sure it would work.

I don't at all need to start work using the computer I'm going to be using for the weeks afterward. I'm OK with using something temporarily that is whatever is available, Mac or non-Mac; I could happily borrow something out of the equipment closet in the short term if there are plans in the works to replace it with something else that makes me productive in the long term.

For full-disk encryption, there are great solutions for this on Linux.

For anti-virus, it seems Symantec AV is available for Linux <http://www.symantec.com/business/support/index?page=content&id=HOWTO17995>.

It sounds like Apple and possibly Lenovo are the only brands that are available through the IT department, but it is worth mentioning that Dell sells perfectly great laptops with Linux pre-installed, such as the XPS 13. I would perfectly happily use that.

If getting me more RAM is the priority, and the T440s is a bad fit for $COMPANY, then the Lenovo X230 would be a great option, and is noticeably less expensive, and it fits 16GB of RAM.

BootCamp and the like are theoretical possibilities on Macs, but one worry I have is that if there were a configuration issue, it might not be worth me spending work time to have me fix my environment, but instead I would be encouraged for efficiency to use Mac OS, which is well-tested on Apple hardware, and then I would basically hate using my computer, which is a strong emotion, but basically how I would feel.

Another issue (less technical) is that if I took my work machine to the kinds of conferences that I go to, like Debconf, I would find myself in the extremely uncomfortable position of advertising for Apple. I am pretty strongly unexcited about doing that.

Relating to the self-image issue is that it means a lot to me to sort of carry the open source community with me as I do my technical work, even if that technical work is not making more open source software. Feeling part of this world that shares software, and Debian in particular where I have a strong feeling of attachment to the community, even while doing something different, is part of what makes using computers fun for me. So it clashes with that to use Mac OS on my main machine, or to feel like I'm externally indistinguishable from people who don't care about this sort of community.

I am unenthusiastic about making your life harder and looking like a prima donna with my possibly obscure requirements.

I am, however, excited to contribute to $COMPANY!

I hope that helps! Probably nothing you couldn't have guessed in here, but I thought it was worth spelling some of that out. Happy to talk more.

-- Asheesh.
Categories: Elsewhere

Paul Rowell: The darker side of Drupal; Field collections and revisioning/moderation

Planet Drupal - Fri, 27/12/2013 - 02:16

Field collections are awesome, we all know that. When it comes to revisioning it starts to turn sour, go deeper and include workflow moderation and it really turns dark.

Categories: Elsewhere

Clint Adams: A Very Ćevapi Christmas

Planet Debian - Fri, 27/12/2013 - 00:14

Categories: Elsewhere

Randy Fay: Remote Command-Line debugging with PHPStorm for PHP/Drupal (including drush)

Planet Drupal - Thu, 26/12/2013 - 23:05
debuggingPlanet DrupalIntroduction

XDebug with PHPStorm can do step-debugging on remote sessions started from the command line on a remote machine. You just have to set up a couple of environment variables, map the remote code to the local code that PHPStorm has at its disposal, and tunnel the xdebug connection to your workstation.

Note: If you just want to debug a PHP script (or drush command) on the local machine, that's much easier. Just enter PHPStorm's Run/Debug configuration and create a new "PHP Script" configuration.

Overview of Setup
  • We'll create a PHPStorm project that contains all the code we want to debug on the remote machine. This can be done via source control with matching code, by mounting the remote directory to your local machine, or any way you want.
  • Create a mapping from server side directories to PHPStorm-side code (A "Server" configuration in PHPStorm)
  • Use environment variables on the remote machine to tell xdebug what to do with the debugging session
  • Tunnel the Xdebug TCP connection if necessary.
  • Make PHPStorm listen for a connection
  • Create a breakpoint somewhere early in the execution path
  • Run the command-line tool on the remote server.
Step-by-Step
  1. On the remote server install xdebug and set xdebug.remote_enable=1 In your xdebug.ini (or php.ini). For complete details see Remote Drupal/PHP Debugging with Xdebug and PHPStorm.
  2. Open your project/directory in PHPStorm; it must have exactly the same code as is deployed on the remote server. (You can optionally mount the remote source locally and open it in PHPStorm using sshfs or any other technique you want, see notes below.)
  3. If you're debugging drush, you probably need to copy it into your project (you don't have to add it to source control). PHPStorm is quite insistent that executing code must be found in the project.
  4. Create a debug configuration and a "Server" configuration in your project. The Server configuration is used to map code locations from the server to your PHPStorm code. Run->Edit Configurations, Create PHP Web App, Create a server, give the server a name. Click "Use path mappings" and configure the mappings from your project to the remote server's code. (See )
  5. If your remote server cannot directly create a tcp connection to your workstation, you'll have to tunnel port 9000 to your local machine. ssh -R 9000:localhost:9000 your_account@remote_server.example.com - For more details and debugging, see
  6. Click the "Listen for PHP Debug Connections" button in PHPStorm. I call this the "unconditional listen" button, because it makes PHPStorm listen on port 9000 and accept any incoming connection, no matter what the IDE key. See Remote Drupal/PHP Debugging with Xdebug and PHPStorm
  7. In PHPStorm, set a breakpoint somewhere that your PHP script is guaranteed to hit early in its execution. For example, if you're debugging most drush actions, you could put a breakpoint on the first line of drupal_bootstrap() in includes/bootstrap.inc.
  8. If the computer is not reachable from the server, you will need to tunnel the connection from the server to your workstation. ssh -R 9000:localhost:9000 some_user_account@www.example.com For more details and debugging, Remote Drupal/PHP Debugging with Xdebug and PHPStorm
  9. In your command-line shell session on the remote server set the environment variable XDEBUG_CONFIG. For example, export XDEBUG_CONFIG="idekey=PHPSTORM remote_host=172.16.1.1 remote_port=9000" (Note that port 9000 is the default both for xdebug and for PHPStorm.) If you're tunneling the connection then remote_host must be 127.0.0.1. If you're not tunneling, it must be the reachable IP address of the machine where PHPStorm is listening.
  10. export PHP_IDE_CONFIG="serverName=yourservername" - the serverName is the name of the "server" you configured in PHPStorm above, which does the mapping of remote to local paths.
  11. On the command line run the command you want to run. For example drush cc all or php /root/drush/drush.php status
  12. If all goes well you'll stop at the breakpoint. You can step-debug to your heart's content and see variables, etc.
Drush+Drupal-Specific Hints
  • I've had the best luck actually copying drush into my codebase so that its mappings and Drupal's mappings can be in the same directory.
  • Once you have the environment variables set you can either use the "drush" command (which must be in your path) or use "php /path/to/drush/drush.php" with your drush options. Make sure you're using the drush that's mapped as a part of your project.
Notes and resources
  • We set the xdebug.remote_host in the XDEBUG_CONFIG environment variable; it could also have been configured in the xdebug.ini as xdebug.remote_host=myworkstation.example.com. (Note that the default is "localhost", so if you're tunneling the connection you don't actually have to set it.)
  • Full details about remote debugging on xdebug.org
  • Debugging: Make sure that only PHPStorm is listening on port 9000. If something else (most notoriously php-fpm) is listening there, you'll have to sort it out. PHPStorm is happy to listen on another port, see the preferences, and you'll need to change your environment variable to something like export XDEBUG_CONFIG="idekey=PHPSTORM remote_host=172.16.1.1 remote_port=9999
  • You may want to use sshfs or some other technique to mount the remote code to your local machine. sshfs your_account@server.example.com:~/drush /tmp/drush would mount the contents of drush in the remote home directory to /tmp/drush (which must already exist) on your local machine. It must be writeable for PHPStorm to work with it as a project, so you'll have to work that out.
  • The article that taught me everything I know about this is Command-line xdebug on a remote server. Thanks!
Categories: Elsewhere

Mediacurrent: Webinar: Code-per-Node

Planet Drupal - Thu, 26/12/2013 - 22:44

Drupal has many well documented best practices, many of which we've covered here previously. From using Features to export all site configuration, to applying updates on a copy of the site instead of production, to using a modern responsive base theme, there is usually a tried & trusted process for most scenarios that can help keep sites stable, and editorial teams & visitors happy.

Categories: Elsewhere

Greater Los Angeles Drupal (GLAD): Greater Los Angeles Drupal's 2013 Year in Review: Part 2

Planet Drupal - Thu, 26/12/2013 - 22:06

2013 has been a big year and there's so much to share that this is Part 2 in our ongoing series of highlights. (Did you miss Part 1? Read that first.)

This post is a long one, so grab your favorite beverage (or a shawarma) and join us when you're ready.

Highlights from 2013

Drupal Job Fair & Employers Summit
In January, 2013, Droplabs held another Drupal job fair but this time also had its first Drupal Employers Summit. All the companies in the area who had ever hosted a Drupal meetup or other Drupal-related event, had sponsored any of the previous job fairs, or simply asked to attend, were invited.

Half a dozen companies were represented, including CivicActions, Exaltation of Larks, Filter Digital, Princess Cruises, Sensis Agency and Stauffer and they talked into the night about hiring strategies and challenges, the desired skills that candidates should have for various roles, and ideas on how to grow Drupal talent.

Relaunched as Greater Los Angeles Drupal
At our open governance meeting in April, 2013, we voted to rename our group from "Downtown Los Angeles Drupal" to "Greater Los Angeles Drupal" (or just "GLAD", for short). This made sense since our organizers now endeavor to serve the 5 counties in the Greater Los Angeles Area and not only the Downtown Los Angeles region, but the name change led to some debate and vexation from members of a nearby group.

Governance policy enacted after a year of work
GLAD is founded on the values of teamwork, transparency, accountability, and the sharing of assets and resources. Work began on a formal governance policy just 6 days after the group was approved on Drupal Groups, and grew to include definitions of roles, our own code of conduct and a procedure for how to manage and resolve conflicts.

As far as I know, GLAD is the first Drupal user group to draft and implement a governance policy like this that's separate from the Drupal Code of Conduct. Hopefully, this governance policy can serve as an example and help other groups decide whether if a similar policy would be a good fit for them.

GLADCamp 2013 postponed :(
As with the change of name to Greater Los Angeles Drupal, not all of our highlights from 2013 went smoothly. Originally planned as a 3-day megaconference for all things Drupal, our 2013 conference was supposed to be a successor to Drupal Design Camp LA but it fell through when contracts with the venue didn't materialize. This was terribly disappointing, but provided bittersweet lessons for our organizing team.

Module Develoment Boot Camp at Droplabs
In the summer, Droplabs started its free, community-led Module Development Boot Camp. With 12 weeks of drills, exercises and exams, all aimed at training PHP and Drupal programmers the skills they need to write Drupal modules, this is the first event of its kind as far as I know.

Droplabs named world’s “Top Drupal location”
With 62 events dedicated to Drupal, Droplabs was recognized by Drupical as the world's "top Drupal location" between the months of July, 2012, and July, 2013.

Drupal Watchdog magazines for everyone
Are you an an organizer of an open source group or event in Southern California? Would you like a box of Drupal Watchdog magazines to give to your members and attendees? Droplabs announced that it had a very large surplus of Watchdog magazines and that they're just giving them away. They're already making their way as far as San Diego for the upcoming SANDcamp conference.

OneDayCareer.org wins at Stanford
What started out as a barn raising to help attendees of the Module Development Boot Camp get hands-on experience with custom module development, Git, Features and team-based collaboration, the OneDayCareer.org team went on to win at the Technology Entrepreneurship Demo Day at Stanford University, beating out 20,000 other students!

Again, there is simply too much to cover in one post. See you next time in the last part of our series!

Tags: Planet DrupalYear in Review
Categories: Elsewhere

Niels Thykier: Jessie finally has less than 500 RC bugs

Planet Debian - Thu, 26/12/2013 - 19:42

I am very pleased to say that RC bug counter for Jessie finally dropped below 500 RC bugs.  For comparison, we broke the 700 RC bug curve in the start of November, so that is about 200 RC bugs in about 7-8 weeks (or about 25-28 RC bugs per week).

Today, we have about 162 RC bugs on the auto-removal list.  Though, I suspect many of the affected packages have reverse dependencies, so their removal from testing may be up 30 days away.  Nevertheless, by this time in January, we could be looking at no more than 350 RC bugs left for Jessie.

 


Categories: Elsewhere

Worchestra: FaceShift - A reporting tool on top of Drupal to fetch any Facebook page's posts' insights

Planet Drupal - Thu, 26/12/2013 - 19:07

Any Facebook page admin will care to see how their posts are doing, what engagement is it driving and how much did it score from likes, comments, and shares.

If you have been using Facebook Insights heavily you would know that there are is a huge limit when you export Post Level Data (Maximum of 500), so if you use your page heavily you would have more than 500 posts a month.

FaceShift is a tool extract post level report (Post title, link, number of likes, comments, and shares) for each post for a selected month, for any given Facebook page whether it was yours or for a competitor, you simply select the date and the facebook page, and the report will be emailed to you (most likely to your spam folder) in an Excel downlable link.

Give it a try and leave me your feedback

http://faceshift.worchestra.com

Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator