We carried out first-principles calculations to explore the oxidative longitudinal unzipping of single-walled carbon nanotubes (SWCNTs) of different diameters and chiralities. We found that the initial attack leading to nanotube unzipping prefers to occur in the middle region for armchair tubes, and at the tube ends for zigzag tubes. Once the initial attack has taken place, by overcoming an energy barrier whose value decreases with increasing tube diameter, the subsequent breakage of C-C bonds parallel to the ones broken in the former process is barrierless. The energetically preferred unzipping path is parallel to the tube axis for armchair tubes, resulting in straight zigzag-edged graphene nanoribbons. For zigzag tubes, there are two energetically equivalent unzipping directions corresponding to the opening of two types of C-C bonds tilted towards the tube axis, giving rise to helical unzipping paths. This is disadvantageous for the production of straight graphene ribbons. A local curvature modulation procedure is proposed to efficiently control the location of the initial attack and thus the shape of the produced graphene nanoribbons.